Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Sascha Hauer
On Wed, Apr 09, 2014 at 09:22:50AM +0200, Thierry Reding wrote: > On Wed, Apr 09, 2014 at 08:12:09AM +0200, Sascha Hauer wrote: > > On Tue, Apr 08, 2014 at 01:43:22PM -0700, Tim Kryger wrote: > > > On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann > > > wrote: > > > > Thierry Reding wrote: > > >

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Thierry Reding
On Wed, Apr 09, 2014 at 08:12:09AM +0200, Sascha Hauer wrote: > On Tue, Apr 08, 2014 at 01:43:22PM -0700, Tim Kryger wrote: > > On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann > > wrote: > > > Thierry Reding wrote: > > > > >> No. You cannot emulate polarity inversion in software. > > >> > > >

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Thierry Reding
On Wed, Apr 09, 2014 at 08:04:50AM +0200, Lothar Waßmann wrote: > Hi, > > Tim Kryger wrote: > > On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann > > wrote: > > > > > > > > > Thierry Reding wrote: > > > > > > > No. You cannot emulate polarity inversion in software. > > > > > > > Why not? > > > > >

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Sascha Hauer
On Tue, Apr 08, 2014 at 01:43:22PM -0700, Tim Kryger wrote: > On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann > wrote: > > Thierry Reding wrote: > > >> No. You cannot emulate polarity inversion in software. > >> > > Why not? > > > > duty_ns = period_ns - duty_ns; > > Since I made the same

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Lothar Waßmann
Hi, Tim Kryger wrote: > On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann > wrote: > > > > > > Thierry Reding wrote: > > > > > No. You cannot emulate polarity inversion in software. > > > > > Why not? > > > > duty_ns = period_ns - duty_ns; > > > > Since I made the same mistake, I will pass along

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Lothar Waßmann
Hi, Tim Kryger wrote: On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann l...@karo-electronics.dewrote: Thierry Reding wrote: No. You cannot emulate polarity inversion in software. Why not? duty_ns = period_ns - duty_ns; Since I made the same mistake, I will pass along

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Sascha Hauer
On Tue, Apr 08, 2014 at 01:43:22PM -0700, Tim Kryger wrote: On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann l...@karo-electronics.de wrote: Thierry Reding wrote: No. You cannot emulate polarity inversion in software. Why not? duty_ns = period_ns - duty_ns; Since I made the same

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Thierry Reding
On Wed, Apr 09, 2014 at 08:04:50AM +0200, Lothar Waßmann wrote: Hi, Tim Kryger wrote: On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann l...@karo-electronics.dewrote: Thierry Reding wrote: No. You cannot emulate polarity inversion in software. Why not? duty_ns =

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Thierry Reding
On Wed, Apr 09, 2014 at 08:12:09AM +0200, Sascha Hauer wrote: On Tue, Apr 08, 2014 at 01:43:22PM -0700, Tim Kryger wrote: On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann l...@karo-electronics.de wrote: Thierry Reding wrote: No. You cannot emulate polarity inversion in software.

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-09 Thread Sascha Hauer
On Wed, Apr 09, 2014 at 09:22:50AM +0200, Thierry Reding wrote: On Wed, Apr 09, 2014 at 08:12:09AM +0200, Sascha Hauer wrote: On Tue, Apr 08, 2014 at 01:43:22PM -0700, Tim Kryger wrote: On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann l...@karo-electronics.de wrote: Thierry Reding

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-08 Thread Tim Kryger
On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann wrote: > Thierry Reding wrote: >> No. You cannot emulate polarity inversion in software. >> > Why not? > > duty_ns = period_ns - duty_ns; Since I made the same mistake, I will pass along the pointer Thierry gave me. In include/linux/pwm.h the

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-08 Thread Tim Kryger
On Mon, Apr 7, 2014 at 10:02 PM, Lothar Waßmann l...@karo-electronics.de wrote: Thierry Reding wrote: No. You cannot emulate polarity inversion in software. Why not? duty_ns = period_ns - duty_ns; Since I made the same mistake, I will pass along the pointer Thierry gave me. In

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-07 Thread Lothar Waßmann
Hi, Thierry Reding wrote: > On Wed, Apr 02, 2014 at 07:53:50AM +0200, Sascha Hauer wrote: > > On Fri, Mar 28, 2014 at 09:48:58AM +0100, Lothar Waßmann wrote: > [...] > > > @@ -183,8 +173,11 @@ static void of_pwmchip_add(struct pwm_chip *chip) > > > return; > > > > > > if

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-07 Thread Thierry Reding
On Wed, Apr 02, 2014 at 07:53:50AM +0200, Sascha Hauer wrote: > On Fri, Mar 28, 2014 at 09:48:58AM +0100, Lothar Waßmann wrote: [...] > > @@ -183,8 +173,11 @@ static void of_pwmchip_add(struct pwm_chip *chip) > > return; > > > > if (!chip->of_xlate) { > > -

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-07 Thread Thierry Reding
On Wed, Apr 02, 2014 at 07:53:50AM +0200, Sascha Hauer wrote: On Fri, Mar 28, 2014 at 09:48:58AM +0100, Lothar Waßmann wrote: [...] @@ -183,8 +173,11 @@ static void of_pwmchip_add(struct pwm_chip *chip) return; if (!chip-of_xlate) { - chip-of_xlate =

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-07 Thread Lothar Waßmann
Hi, Thierry Reding wrote: On Wed, Apr 02, 2014 at 07:53:50AM +0200, Sascha Hauer wrote: On Fri, Mar 28, 2014 at 09:48:58AM +0100, Lothar Waßmann wrote: [...] @@ -183,8 +173,11 @@ static void of_pwmchip_add(struct pwm_chip *chip) return; if (!chip-of_xlate) { -

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-01 Thread Sascha Hauer
On Fri, Mar 28, 2014 at 09:48:58AM +0100, Lothar Waßmann wrote: > Change the pwm chip driver registration, so that a chip driver that > supports polarity inversion can still be used with DTBs that don't > provide the 'PWM_POLARITY' flag. > > This is done to provide polarity inversion support for

Re: [PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-04-01 Thread Sascha Hauer
On Fri, Mar 28, 2014 at 09:48:58AM +0100, Lothar Waßmann wrote: Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY' flag. This is done to provide polarity inversion support for the

[PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-03-28 Thread Lothar Waßmann
Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY' flag. This is done to provide polarity inversion support for the pwm-imx driver without having to modify all existing DTS files.

[PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-03-28 Thread Lothar Waßmann
Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY' flag. This is done to provide polarity inversion support for the pwm-imx driver without having to modify all existing DTS files.

[PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-03-19 Thread Lothar Waßmann
Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY' flag. This is done to provide polarity inversion support for the pwm-imx driver without having to modify all existing DTS files.

[PATCHv3 1/3] pwm: make the PWM_POLARITY flag in DTB optional

2014-03-19 Thread Lothar Waßmann
Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY' flag. This is done to provide polarity inversion support for the pwm-imx driver without having to modify all existing DTS files.