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

Sascha Hauer s.hauer at pengutronix.de
Thu Feb 9 08:44:31 EST 2012


On Thu, Feb 09, 2012 at 12:50:17PM +0100, Robert Jarzmik wrote:
> Sascha Hauer <s.hauer at pengutronix.de> writes:
> > Experience shows that the framebuffer shouldn't be enabled on
> > initialization time. If it does you end up with a framebuffer showing
> > a blank screen in the best case. Instead the framebuffer should be
> > enabled explicitely once there is an image on the screen which looks
> > much nicer to the user. That said the following should be removed from
> > the pxafb driver:
> >
> > 	if (pdata->enable_on_load)
> > 		info->fbops->fb_enable(info);
> >
> > Are you ok with that?
> For the pxafb, yes agreed.
> 
> I still see a small issue with the PWM API.
> When I register the pxa-pwm driver, I have :
>  pxa_pwm_probe(struct device_d *dev)
>    -> base = dev_request_mem_region(dev, 0);
>    -> pxa_pwm = xzalloc(...)
>    -> pxa_pwm->name = drv_name(...)
>    -> pxa_pwm->ops = &pxa_pwm_ops,
>    -> pwmchip_add(pxa_pwm)
> 
> As you can see, the "base" is lost, and I have no way to store it in the
> pwm_chip structure.
> 
> Shouldn't the pwm_chip structure have a priv pointer ?

The intention was to put a struct pwm_chip into a struct pxa_pwm_chip
and use container_of.

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