Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-14 Thread Sven Van Asbroeck
Hi Thierry, On Mon, Dec 14, 2020 at 9:28 AM Thierry Reding wrote: > > > Perhaps Clemens and Sven can shed some light into how this driver is > being used. There clearly seem to be people interested in this driver, > so why are there no consumers of this upstream. What's keeping people > from upst

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-14 Thread Sven Van Asbroeck
Hi Thierry, On Mon, Dec 14, 2020 at 9:28 AM Thierry Reding wrote: > > > Perhaps Clemens and Sven can shed some light into how this driver is > being used. There clearly seem to be people interested in this driver, > so why are there no consumers of this upstream. What's keeping people > from upst

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-14 Thread Clemens Gruber
On Mon, Dec 14, 2020 at 03:28:24PM +0100, Thierry Reding wrote: > On Fri, Dec 11, 2020 at 11:34:54AM +0100, Uwe Kleine-König wrote: > > Hello Thierry, > > > > On Fri, Dec 11, 2020 at 09:33:55AM +0100, Thierry Reding wrote: > > > On Thu, Dec 10, 2020 at 09:39:26PM +0100, Uwe Kleine-König wrote: > >

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-14 Thread Thierry Reding
On Fri, Dec 11, 2020 at 11:34:54AM +0100, Uwe Kleine-König wrote: > Hello Thierry, > > On Fri, Dec 11, 2020 at 09:33:55AM +0100, Thierry Reding wrote: > > On Thu, Dec 10, 2020 at 09:39:26PM +0100, Uwe Kleine-König wrote: > > > On Thu, Dec 10, 2020 at 06:10:45PM +0100, Thierry Reding wrote: > > > >

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-11 Thread Uwe Kleine-König
Hello Thierry, On Fri, Dec 11, 2020 at 09:33:55AM +0100, Thierry Reding wrote: > On Thu, Dec 10, 2020 at 09:39:26PM +0100, Uwe Kleine-König wrote: > > On Thu, Dec 10, 2020 at 06:10:45PM +0100, Thierry Reding wrote: > > > Like I said, that's not what I was saying. I was merely saying that if > > >

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-11 Thread Thierry Reding
On Thu, Dec 10, 2020 at 09:39:26PM +0100, Uwe Kleine-König wrote: > Hello Thierry, > > On Thu, Dec 10, 2020 at 06:10:45PM +0100, Thierry Reding wrote: > > Like I said, that's not what I was saying. I was merely saying that if > > there aren't any use-cases that current users rely on that would be

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-10 Thread Sven Van Asbroeck
On Thu, Dec 10, 2020 at 3:54 PM Clemens Gruber wrote: > > After reading your reasoning in this mail and rethinking the whole > situation, I do no longer have any objections to the more complex > solution. (Allowing 0% and 100% duty cycle channels with any period) > > I first thought it would be to

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-10 Thread Clemens Gruber
On Thu, Dec 10, 2020 at 06:10:45PM +0100, Thierry Reding wrote: > On Thu, Dec 10, 2020 at 10:01:24AM +0100, Uwe Kleine-König wrote: > > Hello Thierry, > > > > On Wed, Dec 09, 2020 at 06:02:16PM +0100, Thierry Reding wrote: > > > On Tue, Dec 08, 2020 at 07:26:37PM +0100, Uwe Kleine-König wrote: > >

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-10 Thread Uwe Kleine-König
Hello Thierry, On Thu, Dec 10, 2020 at 06:10:45PM +0100, Thierry Reding wrote: > Like I said, that's not what I was saying. I was merely saying that if > there aren't any use-cases that current users rely on that would be > broken by using this simpler implementation, then I'm okay with it, even >

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-10 Thread Thierry Reding
On Thu, Dec 10, 2020 at 10:01:24AM +0100, Uwe Kleine-König wrote: > Hello Thierry, > > On Wed, Dec 09, 2020 at 06:02:16PM +0100, Thierry Reding wrote: > > On Tue, Dec 08, 2020 at 07:26:37PM +0100, Uwe Kleine-König wrote: > > > Hello Thierry, hello Sven, > > > > > > On Tue, Dec 08, 2020 at 05:57:1

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-10 Thread Uwe Kleine-König
Hello Thierry, On Wed, Dec 09, 2020 at 06:02:16PM +0100, Thierry Reding wrote: > On Tue, Dec 08, 2020 at 07:26:37PM +0100, Uwe Kleine-König wrote: > > Hello Thierry, hello Sven, > > > > On Tue, Dec 08, 2020 at 05:57:12PM +0100, Thierry Reding wrote: > > > On Tue, Dec 08, 2020 at 09:44:42AM -0500,

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-09 Thread Thierry Reding
On Tue, Dec 08, 2020 at 07:26:37PM +0100, Uwe Kleine-König wrote: > Hello Thierry, hello Sven, > > On Tue, Dec 08, 2020 at 05:57:12PM +0100, Thierry Reding wrote: > > On Tue, Dec 08, 2020 at 09:44:42AM -0500, Sven Van Asbroeck wrote: > > > On Tue, Dec 8, 2020 at 4:10 AM Uwe Kleine-König > > > wro

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Clemens Gruber
Hi everyone, On Tue, Dec 08, 2020 at 07:26:37PM +0100, Uwe Kleine-König wrote: > Hello Thierry, hello Sven, > > On Tue, Dec 08, 2020 at 05:57:12PM +0100, Thierry Reding wrote: > > On Tue, Dec 08, 2020 at 09:44:42AM -0500, Sven Van Asbroeck wrote: > > > On Tue, Dec 8, 2020 at 4:10 AM Uwe Kleine-Kö

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Uwe Kleine-König
Hello Sven, On Tue, Dec 08, 2020 at 01:15:10PM -0500, Sven Van Asbroeck wrote: > On Tue, Dec 8, 2020 at 11:57 AM Thierry Reding > wrote: > > > > Is this really that complicated? I sounds to me like the only thing that > > you need is to have some sort of usage count for the prescaler. Whenever >

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Uwe Kleine-König
Hello Thierry, hello Sven, On Tue, Dec 08, 2020 at 05:57:12PM +0100, Thierry Reding wrote: > On Tue, Dec 08, 2020 at 09:44:42AM -0500, Sven Van Asbroeck wrote: > > On Tue, Dec 8, 2020 at 4:10 AM Uwe Kleine-König > > wrote: > > > > > > If this is already in the old code, this probably warrants a s

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Sven Van Asbroeck
On Tue, Dec 8, 2020 at 11:57 AM Thierry Reding wrote: > > Is this really that complicated? I sounds to me like the only thing that > you need is to have some sort of usage count for the prescaler. Whenever > you want to use the prescaler you check that usage count. If it is zero, > then you can ju

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Thierry Reding
On Tue, Dec 08, 2020 at 09:44:42AM -0500, Sven Van Asbroeck wrote: > Uwe, Thierry, > > On Tue, Dec 8, 2020 at 4:10 AM Uwe Kleine-König > wrote: > > > > If this is already in the old code, this probably warrants a separate > > fix, and yes, I consider this a severe bug. (Consider one channel > > d

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Sven Van Asbroeck
Uwe, Thierry, On Tue, Dec 8, 2020 at 4:10 AM Uwe Kleine-König wrote: > > If this is already in the old code, this probably warrants a separate > fix, and yes, I consider this a severe bug. (Consider one channel > driving a motor and reconfiguring an LED modifies the motor's speed.) > I think you

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Thierry Reding
On Tue, Dec 08, 2020 at 11:12:18AM +0100, Clemens Gruber wrote: > Hello Uwe, > > On Tue, Dec 08, 2020 at 10:10:33AM +0100, Uwe Kleine-König wrote: > > Hello Clemens, > > > > On Tue, Dec 08, 2020 at 12:13:44AM +0100, Clemens Gruber wrote: > > > On Mon, Dec 07, 2020 at 11:00:25PM +0100, Uwe Kleine-

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Clemens Gruber
Hello Uwe, On Tue, Dec 08, 2020 at 10:10:33AM +0100, Uwe Kleine-König wrote: > Hello Clemens, > > On Tue, Dec 08, 2020 at 12:13:44AM +0100, Clemens Gruber wrote: > > On Mon, Dec 07, 2020 at 11:00:25PM +0100, Uwe Kleine-König wrote: > > > On Mon, Dec 07, 2020 at 08:36:27PM +0100, Clemens Gruber wr

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Uwe Kleine-König
Hello Sven, On Mon, Dec 07, 2020 at 05:34:58PM -0500, Sven Van Asbroeck wrote: > On Mon, Dec 7, 2020 at 5:00 PM Uwe Kleine-König > wrote: > > > > This is not acceptable, if you have two PWM outputs and a consumer > > modifies one of them the other must change. So if this chip only > > supports a

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-08 Thread Uwe Kleine-König
Hello Clemens, On Tue, Dec 08, 2020 at 12:13:44AM +0100, Clemens Gruber wrote: > On Mon, Dec 07, 2020 at 11:00:25PM +0100, Uwe Kleine-König wrote: > > On Mon, Dec 07, 2020 at 08:36:27PM +0100, Clemens Gruber wrote: > > > The hardware readout may return slightly different values than those > > > th

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Clemens Gruber
Hi Sven, On Mon, Dec 07, 2020 at 06:22:08PM -0500, Sven Van Asbroeck wrote: > Hi Clemens, see below. > > On Mon, Dec 7, 2020 at 2:37 PM Clemens Gruber > wrote: > > > > The switch to the atomic API goes hand in hand with a few fixes to > > previously experienced issues: > > - The duty cycle is no

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Clemens Gruber
On Mon, Dec 07, 2020 at 05:34:58PM -0500, Sven Van Asbroeck wrote: > Hi Uwe, > > On Mon, Dec 7, 2020 at 5:00 PM Uwe Kleine-König > wrote: > > > > This is not acceptable, if you have two PWM outputs and a consumer > > modifies one of them the other must change. So if this chip only > > supports a

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Sven Van Asbroeck
Hi Clemens, see below. On Mon, Dec 7, 2020 at 2:37 PM Clemens Gruber wrote: > > The switch to the atomic API goes hand in hand with a few fixes to > previously experienced issues: > - The duty cycle is no longer lost after disable/enable (previously the > OFF registers were cleared in disable a

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Clemens Gruber
On Mon, Dec 07, 2020 at 11:00:25PM +0100, Uwe Kleine-König wrote: > On Mon, Dec 07, 2020 at 08:36:27PM +0100, Clemens Gruber wrote: > > The switch to the atomic API goes hand in hand with a few fixes to > > previously experienced issues: > > - The duty cycle is no longer lost after disable/enable (

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Sven Van Asbroeck
Hi Uwe, On Mon, Dec 7, 2020 at 5:00 PM Uwe Kleine-König wrote: > > This is not acceptable, if you have two PWM outputs and a consumer > modifies one of them the other must change. So if this chip only > supports a single period length of all channels, the first consumer > enabling a channel defin

Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Uwe Kleine-König
On Mon, Dec 07, 2020 at 08:36:27PM +0100, Clemens Gruber wrote: > The switch to the atomic API goes hand in hand with a few fixes to > previously experienced issues: > - The duty cycle is no longer lost after disable/enable (previously the > OFF registers were cleared in disable and the user was

[PATCH v4 1/4] pwm: pca9685: Switch to atomic API

2020-12-07 Thread Clemens Gruber
The switch to the atomic API goes hand in hand with a few fixes to previously experienced issues: - The duty cycle is no longer lost after disable/enable (previously the OFF registers were cleared in disable and the user was required to call config to restore the duty cycle settings) - If one s