[RFC/PATCH 0/2] Backlight support

Sascha Hauer s.hauer at pengutronix.de
Fri Oct 7 09:15:08 EDT 2011


Hi Gregory,

On Thu, Oct 06, 2011 at 10:05:07AM +0200, Gregory CLEMENT wrote:
> This patch set is a RFC about a backlight framework. The purpose of
> this framework is mainly to allow to add easily a support for a
> backlight with the possibility of setting brightness directly from the
> barebox shell using the brightness parameter.
> 
> An implementation is provided for i.MX23 by using the PWM. It was
> tested on a custom i.MX23 base board.

Two things that bother me in this series.

First thing is that I wonder if it would be better to not
register a seperate device for backlight. How about a call
like this:

fb_register_backlight(const char *fb,
	void (*set_brightness)(int brightness, void *priv));

The core would only need a function to find the struct device_d
by the corresponding "fbx" string. This way we could add the
brightness variable to the framebuffer and not a seperate device,
so fb0.brightness=50.

The second thing is that the pwm you use for the mxs backlight
is a generic pwm which not necessarily drives a backlight. We
should have a generic pwm api for this. Otherwise we end up
with different drivers for the same pwm.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list