Re: About rounding in the clk framework [Was: Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation]

2020-12-21 Thread Uwe Kleine-König
Hello, On Tue, Apr 14, 2020 at 11:24:12AM +0200, Uwe Kleine-König wrote: > Hello Stephen, hello Michael, > > On Wed, Feb 12, 2020 at 08:29:11AM +0100, Uwe Kleine-König wrote: > > Can you please explain what is the reason why clk_round_rate_up/down() > > is a bad idea? Would it help to create a

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-10-21 Thread Paul Cercueil
Hi, Le mer., août 14, 2019 at 19:32, Uwe Kleine-König a écrit : Hello Paul, On Wed, Aug 14, 2019 at 06:10:35PM +0200, Paul Cercueil wrote: Le mar. 13 août 2019 à 16:09, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : > On Tue, Aug 13, 2019 at 02:47:28PM +0200, Paul Cercueil wrote: > > Le

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-14 Thread Uwe Kleine-König
Hello Paul, On Wed, Aug 14, 2019 at 06:10:35PM +0200, Paul Cercueil wrote: > Le mar. 13 août 2019 à 16:09, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : > > On Tue, Aug 13, 2019 at 02:47:28PM +0200, Paul Cercueil wrote: > > > Le mar. 13 août 2019 à 14:33, Uwe Kleine-König a écrit : > > > > On

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-14 Thread Paul Cercueil
Hi Uwe, Le mar. 13 août 2019 à 16:09, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : Hello Paul, On Tue, Aug 13, 2019 at 02:47:28PM +0200, Paul Cercueil wrote: Le mar. 13 août 2019 à 14:33, Uwe Kleine-König a écrit : > On Tue, Aug 13, 2019 at 01:01:06PM +0200, Paul Cercueil wrote: > >

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-13 Thread Uwe Kleine-König
Hello Paul, On Tue, Aug 13, 2019 at 02:47:28PM +0200, Paul Cercueil wrote: > Le mar. 13 août 2019 à 14:33, Uwe Kleine-König a écrit : > > On Tue, Aug 13, 2019 at 01:01:06PM +0200, Paul Cercueil wrote: > > > Well, you said that I shouln't rely on the fact that clk_round_rate() will > > > round

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-13 Thread Paul Cercueil
Le mar. 13 août 2019 à 14:33, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : Hello Paul, On Tue, Aug 13, 2019 at 01:01:06PM +0200, Paul Cercueil wrote: Le mar. 13 août 2019 à 7:27, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : > [adding Stephen Boyd to Cc] > > On Tue, Aug 13, 2019 at

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-13 Thread Uwe Kleine-König
Hello Paul, On Tue, Aug 13, 2019 at 01:01:06PM +0200, Paul Cercueil wrote: > Le mar. 13 août 2019 à 7:27, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > a écrit : > > [adding Stephen Boyd to Cc] > > > > On Tue, Aug 13, 2019 at 12:16:23AM +0200, Paul Cercueil wrote: > > > Le lun. 12 août 2019 à 23:48,

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-13 Thread Paul Cercueil
Le mar. 13 août 2019 à 7:27, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : Hello Paul, [adding Stephen Boyd to Cc] On Tue, Aug 13, 2019 at 12:16:23AM +0200, Paul Cercueil wrote: Le lun. 12 août 2019 à 23:48, Uwe Kleine-König a écrit : > On Mon, Aug 12, 2019 at 10:43:10PM +0200, Paul

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-12 Thread Uwe Kleine-König
Hello Paul, [adding Stephen Boyd to Cc] On Tue, Aug 13, 2019 at 12:16:23AM +0200, Paul Cercueil wrote: > Le lun. 12 août 2019 à 23:48, Uwe Kleine-König a écrit : > > On Mon, Aug 12, 2019 at 10:43:10PM +0200, Paul Cercueil wrote: > > > Le lun. 12 août 2019 à 8:15, Uwe Kleine-König a écrit : > > >

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-12 Thread Paul Cercueil
[Re-send my message in plain text, as it was bounced by the lists - sorry about that] Le lun. 12 août 2019 à 23:48, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : Hello Paul, On Mon, Aug 12, 2019 at 10:43:10PM +0200, Paul Cercueil wrote: Le lun. 12 août 2019 à 8:15, Uwe

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-12 Thread Uwe Kleine-König
Hello Paul, On Mon, Aug 12, 2019 at 10:43:10PM +0200, Paul Cercueil wrote: > Le lun. 12 août 2019 à 8:15, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > a écrit : > > On Fri, Aug 09, 2019 at 07:14:45PM +0200, Paul Cercueil wrote: > > > Le ven. 9 août 2019 à 19:05, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > >

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-12 Thread Paul Cercueil
Le lun. 12 août 2019 à 8:15, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : Hello Paul, On Fri, Aug 09, 2019 at 07:14:45PM +0200, Paul Cercueil wrote: Le ven. 9 août 2019 à 19:05, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : > On Fri, Aug 09, 2019 at 02:30:28PM +0200, Paul Cercueil

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-12 Thread Uwe Kleine-König
Hello Paul, On Fri, Aug 09, 2019 at 07:14:45PM +0200, Paul Cercueil wrote: > Le ven. 9 août 2019 à 19:05, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= > a écrit : > > On Fri, Aug 09, 2019 at 02:30:28PM +0200, Paul Cercueil wrote: > > > The previous algorithm hardcoded details about how the TCU clocks >

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-09 Thread Paul Cercueil
Le ven. 9 août 2019 à 19:05, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= a écrit : On Fri, Aug 09, 2019 at 02:30:28PM +0200, Paul Cercueil wrote: The previous algorithm hardcoded details about how the TCU clocks work. The new algorithm will use clk_round_rate to find the perfect clock rate

Re: [PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-09 Thread Uwe Kleine-König
On Fri, Aug 09, 2019 at 02:30:28PM +0200, Paul Cercueil wrote: > The previous algorithm hardcoded details about how the TCU clocks work. > The new algorithm will use clk_round_rate to find the perfect clock rate > for the PWM channel. > > Signed-off-by: Paul Cercueil > Tested-by: Mathieu

[PATCH 4/7] pwm: jz4740: Improve algorithm of clock calculation

2019-08-09 Thread Paul Cercueil
The previous algorithm hardcoded details about how the TCU clocks work. The new algorithm will use clk_round_rate to find the perfect clock rate for the PWM channel. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Tested-by: Artur Rojek --- drivers/pwm/pwm-jz4740.c | 60