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

2020-11-25 Thread Sven Van Asbroeck
On Wed, Nov 25, 2020 at 2:46 PM Sven Van Asbroeck wrote: > > Then if you have time && motivation left, enable regmap cache. In a follow-up patch, after we arrived at a correctly working driver.

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

2020-11-25 Thread Sven Van Asbroeck
On Wed, Nov 25, 2020 at 12:28 PM Clemens Gruber wrote: > > What's the lesser evil in your opinion, always returning 0 duty and > disabled for the ALL channel or caching it? > I would definitely suggest returning a pwm_state consisting of all zeroes for the "all led" channel, instead of caching st

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

2020-11-25 Thread Clemens Gruber
Hi Sven, On Wed, Nov 25, 2020 at 10:04:32AM -0500, Sven Van Asbroeck wrote: > On Wed, Nov 25, 2020 at 3:35 AM Clemens Gruber > wrote: > > > > > > > > The datasheet I found for this chip indicates that every ALL_LED_XXX > > > register > > > is write-only. Those registers cannot be read back from

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

2020-11-25 Thread Sven Van Asbroeck
On Wed, Nov 25, 2020 at 3:35 AM Clemens Gruber wrote: > > > > > The datasheet I found for this chip indicates that every ALL_LED_XXX > > register > > is write-only. Those registers cannot be read back from the chip. > > > > Datasheet "Rev. 4 - 16 April 2015" > > Thanks, good catch! Would you agre

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

2020-11-25 Thread Clemens Gruber
On Wed, Nov 25, 2020 at 09:35:08AM +0100, Clemens Gruber wrote: > On Tue, Nov 24, 2020 at 10:49:27PM -0500, Sven Van Asbroeck wrote: > > Hi Clemens, I checked the patch against the datasheet register definitions. > > More constructive feedback below. > > > > On Tue, Nov 24, 2020 at 1:10 PM Clemens

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

2020-11-25 Thread Clemens Gruber
On Tue, Nov 24, 2020 at 10:49:27PM -0500, Sven Van Asbroeck wrote: > Hi Clemens, I checked the patch against the datasheet register definitions. > More constructive feedback below. > > On Tue, Nov 24, 2020 at 1:10 PM Clemens Gruber > wrote: > > > > The switch to the atomic API goes hand in hand w

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

2020-11-24 Thread Sven Van Asbroeck
Hi Clemens, I checked the patch against the datasheet register definitions. More constructive feedback below. On Tue, Nov 24, 2020 at 1:10 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 long

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

2020-11-24 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