[PATCH] drivers/pwm: add PXA pulse width modulator controller

Robert Jarzmik robert.jarzmik at free.fr
Wed Feb 8 10:26:21 EST 2012


Robert Jarzmik <robert.jarzmik at free.fr> writes:

> Sascha Hauer <s.hauer at pengutronix.de> writes:
>
>> Hi Robert,
>>
>> Why not implement it as a regular driver? If we ever want to implement
>> a commandline control of the pwms via pwm0.dutyns=xx we'll need
>> a struct device.
>
> This is because in my own case, I need pwm to be registered before other devices
> are probed. The trouble (in my case) is that for drivers/video/pxa.c, I have the
> following call path :
>  - pxafb_probe()
>    -> pxafb_enable_controller()
>      -> pxafb_backlight_power()
>        -> mioa701_lcd_backlight()
>           => 	struct pwm_device *pwm0 = pwm_request("pxa_pwm0");
> 		pwm_enable(pwm0);
> 		pwm_config(pwm0, 2000 * 1024, 4000 * 1024);
>
> I'm a bit afraid that the pxafb driver will be probed first, before pwm_pxa, and
> therefore the backlight setting won't work. I haven't found a clean way to
> specify this dependency.

Sascha, ping ?

Do you have a way to specify the dependency, and do you want me to adapt the
driver ?

Cheers.

--
Robert



More information about the barebox mailing list