Re: [PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-09-20 Thread Thierry Reding
On Mon, Aug 12, 2019 at 11:58:53PM +0200, Uwe Kleine-König wrote: > On Mon, Aug 12, 2019 at 10:50:01PM +0200, Paul Cercueil wrote: > > > > > > Le lun. 12 août 2019 à 7:55, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > > a écrit : > > > On Fri, Aug 09, 2019 at 07:33:24PM +0200, Paul Cercueil wrote: > > >

Re: [PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-08-12 Thread Uwe Kleine-König
On Mon, Aug 12, 2019 at 10:50:01PM +0200, Paul Cercueil wrote: > > > Le lun. 12 août 2019 à 7:55, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > a écrit : > > On Fri, Aug 09, 2019 at 07:33:24PM +0200, Paul Cercueil wrote: > > > > > > > > > Le ven. 9 août 2019 à 19:10, Uwe =?iso-8859-1?q?Kleine-K=F6nig

Re: [PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-08-12 Thread Paul Cercueil
Le lun. 12 août 2019 à 7:55, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : On Fri, Aug 09, 2019 at 07:33:24PM +0200, Paul Cercueil wrote: Le ven. 9 août 2019 à 19:10, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : > On Fri, Aug 09, 2019 at 02:30:30PM +0200, Paul Cercueil wrote: > > T

Re: [PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-08-11 Thread Uwe Kleine-König
On Fri, Aug 09, 2019 at 07:33:24PM +0200, Paul Cercueil wrote: > > > Le ven. 9 août 2019 à 19:10, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > a écrit : > > On Fri, Aug 09, 2019 at 02:30:30PM +0200, Paul Cercueil wrote: > > > The PWM will always start with the inactive part. To counter that, > > > wh

Re: [PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-08-09 Thread Paul Cercueil
Le ven. 9 août 2019 à 19:10, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : On Fri, Aug 09, 2019 at 02:30:30PM +0200, Paul Cercueil wrote: The PWM will always start with the inactive part. To counter that, when PWM is enabled we switch the configured polarity, and use 'period - duty + 1'

Re: [PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-08-09 Thread Uwe Kleine-König
On Fri, Aug 09, 2019 at 02:30:30PM +0200, Paul Cercueil wrote: > The PWM will always start with the inactive part. To counter that, > when PWM is enabled we switch the configured polarity, and use > 'period - duty + 1' as the real duty. Where does the + 1 come from? This looks wrong. (So if duty=0

[PATCH 6/7] pwm: jz4740: Make PWM start with the active part

2019-08-09 Thread Paul Cercueil
The PWM will always start with the inactive part. To counter that, when PWM is enabled we switch the configured polarity, and use 'period - duty + 1' as the real duty. Signed-off-by: Paul Cercueil --- drivers/pwm/pwm-jz4740.c | 22 +- 1 file changed, 13 insertions(+), 9 delet