Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Janorkar, Mayuresh" <mayur@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: RE: [PATCH v3 4/4] OMAP: DSS: Add picodlp panel driver
Date: Tue, 10 May 2011 14:14:29 +0300	[thread overview]
Message-ID: <1305026069.2045.27.camel@deskari> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB033DB0868E@dbde02.ent.ti.com>

On Tue, 2011-05-10 at 15:57 +0530, Janorkar, Mayuresh wrote:

> > It is better to request and initialize the GPIOs in the board file. The
> > reason for this is that the PicoDLP device should be off if it's not
> > used, or if the driver is not even compiled in. So the board file should
> > make sure that the GPIOs are in such state that the device is off.
> 
> The board file has only init. There is no exit.
> So if I request gpios in init once, I could not find a place to free them.

If the GPIOs are not shared, and they go only to picodlp, there's not
really any need to free them. They are not a shared resource, and they
can be kept reserved for picodlp all the time.

> Is it a good idea to request gpios in platform_enable and free them in platform_disable?

No, that wouldn't fix the problem.

For example, consider a case where the kernel is compiled without
picodlp driver. So platform_enable/disable is never called, and the
GPIOs are never requested or initialized. This means that depending on
the values of the GPIOs, the picodlp could be always on, consuming
power.

So my suggestion is to request all the GPIOs in the board file, in
display init, and initialize the GPIOs to some sane value so that the
picodlp is off. Then pass the two GPIOs to the picodlp driver, which can
then use the GPIOs, and handle the two other GPIOs in the board file in
platform_enable/disable. 

 Tomi



  reply	other threads:[~2011-05-10 11:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 15:18 [PATCH v3 0/7] picodlp projector driver Mayuresh Janorkar
2011-05-09 15:18 ` [PATCH 1/4] OMAP: DSS: Adding a header file for picodlp data Mayuresh Janorkar
2011-05-09 15:18 ` [PATCH v3 2/4] OMAP: DSS: Adding a picodlp header file Mayuresh Janorkar
2011-05-09 15:18 ` [PATCH v3 3/4] OMAP4: DSS: Adding a picodlp in OMAP4430 SDP board file Mayuresh Janorkar
2011-05-09 15:18 ` [PATCH v3 4/4] OMAP: DSS: Add picodlp panel driver Mayuresh Janorkar
2011-05-10  9:33   ` Tomi Valkeinen
2011-05-10 10:27     ` Janorkar, Mayuresh
2011-05-10 11:14       ` Tomi Valkeinen [this message]
2011-05-10 12:04         ` Janorkar, Mayuresh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305026069.2045.27.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mayur@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox