RE: Adding support for configuring polarity in PWM framework.
From: Philip, Avinash
Date: Tue Jul 17 2012 - 01:26:29 EST
On Mon, Jul 16, 2012 at 18:16:13, Lars-Peter Clausen wrote:
> On 07/16/2012 02:23 PM, Philip, Avinash wrote:
>
> >
> > 1. PWM framework API addition.
> > PWM frame work API support.
> > /**
> > * pwm_setpolarity() - change a PWM device Polarity
> > * @pwm: PWM device
> > * @polarity: Configure polarity of PWM
> > *
> > * polarity - false -> "on" time defined by duty ns
> > * - true -> "off' time defined by duty ns.
> > */
>
> Isn't this more about whether we start with a low or a high signal?
No, it is more about the average on time. On time determines the on duration of
the panel power and there by brightness. On one custom board, backlight power
booster gives power output on the OFF time of PWM (hardware connection).
> If it is
> just about the duty time you can easily achieve the same effect by setting
> it to (period_ns - duty_ns).
Yes this is possible. But the PWM hardware we uses supports configuration of
polarity. So I prefer PWM polarity configuration.
Also with polarity configuration support, we can achieve (period_ns - duty_ns),
for PWM devices don't have hardware support. Polarity configuration support
can be used for setting flags, duty cycle can be configured from config
depending on flag.
Thanks
Avinash
>
> - Lars
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/