[PATCH] arm/mach-pxa: add pulse width modulator controller

Robert Jarzmik robert.jarzmik at free.fr
Fri Jan 27 11:07:04 EST 2012


Sascha Hauer <s.hauer at pengutronix.de> writes:

> On Thu, Jan 26, 2012 at 08:55:28PM +0100, Robert Jarzmik wrote:
>> Add PXA embedded pulse width modulator support. The PWM can
>> generate signals from 49.6kHz to 1.625MHz.
>> 
>> Signed-off-by: Robert Jarzmik <robert.jarzmik at free.fr>
>> ---
>
> [...]
>
>> +
>> +	/* NOTE: the clock to PWM has to be enabled first
>> +	 * before writing to the registers
>> +	 */
>
> Does this mean that pwm_enable() has to be called prior to pxm_config()?
Yes.

> I think we should rather have a real pwm API.
So do I.

> The following Kernel patch could be easily adopted and the overhead is
> acceptable I think.
Would you adapt it or do you want me to do it ?

> The problem is that once we let PXA implement pwm functions we cannot support
> other pwms in the same binary. On i.MX for example we have dedicated PWM
> controllers which most people use, but some others use a pwm internal to the
> framebuffer controller.
True. That's a good reason to have your framework implemented. I don't think the
rework of my patch on top of the framework will take me a lot of time.

Cheers.

--
Robert



More information about the barebox mailing list