RE: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-24 Thread Philip, Avinash
On Tue, Jul 24, 2012 at 01:22:49, Thierry Reding wrote: On Mon, Jul 23, 2012 at 03:05:26PM +, Philip, Avinash wrote: On Mon, Jul 23, 2012 at 18:38:25, Thierry Reding wrote: On Mon, Jul 23, 2012 at 12:51:11PM +, Philip, Avinash wrote: On Mon, Jul 23, 2012 at 14:00:32, Thierry

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-24 Thread Thierry Reding
On Mon, Jul 23, 2012 at 10:15:07PM +0200, Lars-Peter Clausen wrote: On 07/23/2012 10:30 AM, Thierry Reding wrote: On Wed, Jul 18, 2012 at 06:24:13PM +0530, Philip, Avinash wrote: [...] diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 21d076c..2e4e960 100644 ---

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-24 Thread Lars-Peter Clausen
On 07/24/2012 08:51 AM, Thierry Reding wrote: How about the following? /** * enum pwm_polarity - polarity of a PWM signal * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty- * cycle, followed by a low signal for the remainder of the pulse * period *

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-24 Thread Thierry Reding
On Tue, Jul 24, 2012 at 10:25:17AM +0200, Lars-Peter Clausen wrote: On 07/24/2012 08:51 AM, Thierry Reding wrote: How about the following? /** * enum pwm_polarity - polarity of a PWM signal * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty- * cycle, followed

RE: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-24 Thread Philip, Avinash
On Tue, Jul 24, 2012 at 13:56:24, Thierry Reding wrote: On Tue, Jul 24, 2012 at 10:25:17AM +0200, Lars-Peter Clausen wrote: On 07/24/2012 08:51 AM, Thierry Reding wrote: How about the following? /** * enum pwm_polarity - polarity of a PWM signal * @PWM_POLARITY_NORMAL: a

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-23 Thread Thierry Reding
On Wed, Jul 18, 2012 at 06:24:13PM +0530, Philip, Avinash wrote: Duty cycle inversion of PWM wave should achieved through PWM polarity inversion. Also polarity of PWM wave should configurable from slave drivers, Actually, I don't think that duty cycle inversion *should* be achieved through

RE: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-23 Thread Philip, Avinash
On Mon, Jul 23, 2012 at 14:00:32, Thierry Reding wrote: On Wed, Jul 18, 2012 at 06:24:13PM +0530, Philip, Avinash wrote: Duty cycle inversion of PWM wave should achieved through PWM polarity inversion. Also polarity of PWM wave should configurable from slave drivers, Actually, I don't

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-23 Thread Thierry Reding
On Mon, Jul 23, 2012 at 12:51:11PM +, Philip, Avinash wrote: On Mon, Jul 23, 2012 at 14:00:32, Thierry Reding wrote: On Wed, Jul 18, 2012 at 06:24:13PM +0530, Philip, Avinash wrote: [...] + + if (test_bit(PWMF_ENABLED, pwm-flags)) { + dev_err(pwm-chip-dev, +

RE: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-23 Thread Philip, Avinash
On Mon, Jul 23, 2012 at 18:38:25, Thierry Reding wrote: On Mon, Jul 23, 2012 at 12:51:11PM +, Philip, Avinash wrote: On Mon, Jul 23, 2012 at 14:00:32, Thierry Reding wrote: On Wed, Jul 18, 2012 at 06:24:13PM +0530, Philip, Avinash wrote: [...] + + if

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-23 Thread Thierry Reding
On Mon, Jul 23, 2012 at 03:05:26PM +, Philip, Avinash wrote: On Mon, Jul 23, 2012 at 18:38:25, Thierry Reding wrote: On Mon, Jul 23, 2012 at 12:51:11PM +, Philip, Avinash wrote: On Mon, Jul 23, 2012 at 14:00:32, Thierry Reding wrote: On Wed, Jul 18, 2012 at 06:24:13PM +0530,

Re: [PATCH] PWM: Add support for configuring polarity of PWM

2012-07-23 Thread Lars-Peter Clausen
On 07/23/2012 10:30 AM, Thierry Reding wrote: On Wed, Jul 18, 2012 at 06:24:13PM +0530, Philip, Avinash wrote: [...] diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 21d076c..2e4e960 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -21,6 +21,16 @@ void

[PATCH] PWM: Add support for configuring polarity of PWM

2012-07-18 Thread Philip, Avinash
Duty cycle inversion of PWM wave should achieved through PWM polarity inversion. Also polarity of PWM wave should configurable from slave drivers, Configure polarity 1. PWM_POLARITY_NORMAL - duty ns defines ON period of PWM wave 2. PWM_POLARITY_INVERSE - duty ns defines OFF period of PWM wave.