All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] backlight support for sh_mobile_lcdcfb
@ 2011-02-10 15:22 Alexandre Courbot
  2011-02-14 17:43 ` Magnus Damm
  2011-02-15  3:23 ` Alexandre Courbot
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Courbot @ 2011-02-10 15:22 UTC (permalink / raw)
  To: linux-sh

These patches add initial support for per-channel GPIO-controlled backlights to the sh_mobile_lcdcfb driver. A backlight device for the ecovec24 board is also provided.

Backlight support is directly integrated into the lcdcfb driver, because external usage seems unlikely and this facilitates integration with the fb backlight support. However, it should be be easy to split it into another driver if needed.

This series should be considered a first draft, since some points could probably be improved. In particular, the gpio is not acquired by the driver since board support code (at least for ecovec24) request it during early setup and do not seem to release it.

Alexandre Courbot (2):
  fbdev: sh_mobile_lcdcfb: add backlight support
  sh: mach-ecovec24: support for main lcd backlight

 arch/sh/boards/mach-ecovec24/setup.c |    6 +++
 drivers/video/Kconfig                |    1 +
 drivers/video/sh_mobile_lcdcfb.c     |   73 ++++++++++++++++++++++++++++++++++
 drivers/video/sh_mobile_lcdcfb.h     |    2 +
 include/video/sh_mobile_lcdc.h       |    7 +++
 5 files changed, 89 insertions(+), 0 deletions(-)

-- 
1.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/2] backlight support for sh_mobile_lcdcfb
  2011-02-10 15:22 [PATCH 0/2] backlight support for sh_mobile_lcdcfb Alexandre Courbot
@ 2011-02-14 17:43 ` Magnus Damm
  2011-02-15  3:23 ` Alexandre Courbot
  1 sibling, 0 replies; 3+ messages in thread
From: Magnus Damm @ 2011-02-14 17:43 UTC (permalink / raw)
  To: linux-sh

Hi Alexandre,

On Fri, Feb 11, 2011 at 12:22 AM, Alexandre Courbot <gnurou@gmail.com> wrote:
> These patches add initial support for per-channel GPIO-controlled backlights to the sh_mobile_lcdcfb driver. A backlight device for the ecovec24 board is also provided.

Thanks for your patches. They look surprisingly clean and nice!

The patches are mainly concerned with the Ecovec24 board - which makes
sense since that's the board you have - and you've done a good job
splitting out the code into driver changes and board specific stuff.

I'd like to use the driver portion of your code on other platforms,
but for that to work your code needs to be updated to fit other boards
as well. Mainly, not all boards control their back light with GPIO
pins. For instance, have a look at linux-2.6 git commit
170c7ab58f41c526c54e9dd04044857d5d73f9e6.

Please think about how to rework the code to allow both GPIO pins and
other types of back light control. I would simply go with some board
callbacks, but perhaps there is some overlap with the existing ones.

Cheers,

/ magnus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/2] backlight support for sh_mobile_lcdcfb
  2011-02-10 15:22 [PATCH 0/2] backlight support for sh_mobile_lcdcfb Alexandre Courbot
  2011-02-14 17:43 ` Magnus Damm
@ 2011-02-15  3:23 ` Alexandre Courbot
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2011-02-15  3:23 UTC (permalink / raw)
  To: linux-sh

Hi Magnus, thanks for your feedback!

> I'd like to use the driver portion of your code on other platforms,
> but for that to work your code needs to be updated to fit other boards
> as well. Mainly, not all boards control their back light with GPIO
> pins. For instance, have a look at linux-2.6 git commit
> 170c7ab58f41c526c54e9dd04044857d5d73f9e6.

Indeed, I overlooked the board_cfg struct. We could have additional
backlight intensity get/set callbacks there that would mostly work
like the generic_bl driver.

> Please think about how to rework the code to allow both GPIO pins and
> other types of back light control. I would simply go with some board
> callbacks, but perhaps there is some overlap with the existing ones.

display_on and display_off callbacks currently control the backlight,
but they also turn power off when it is possible (for instance on
ap325rxa). So they could probably not be replaced by backlight
intensity settings alone. However, since backlight control will be
transferred to the LCDC driver, it should be removed from these
callbacks once the backlight device is used for the sake of
consistency.

I will try and come with a new patch sometime tomorrow!

Alex.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-15  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 15:22 [PATCH 0/2] backlight support for sh_mobile_lcdcfb Alexandre Courbot
2011-02-14 17:43 ` Magnus Damm
2011-02-15  3:23 ` Alexandre Courbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.