Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2021-03-27 Thread Clemens Gruber
Hi Thierry, On Mon, Mar 22, 2021 at 08:58:35AM +0100, Thierry Reding wrote: > On Thu, Dec 17, 2020 at 12:10:10PM -0500, Sven Van Asbroeck wrote: > > On Thu, Dec 17, 2020 at 11:48 AM Clemens Gruber > > wrote: > > > > > > I can initialize the values to 0 of course and check the file for other > >

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2021-03-22 Thread Thierry Reding
On Thu, Dec 17, 2020 at 12:10:10PM -0500, Sven Van Asbroeck wrote: > On Thu, Dec 17, 2020 at 11:48 AM Clemens Gruber > wrote: > > > > I can initialize the values to 0 of course and check the file for other > > places with missing initializations. > > > > Or would it be better to check the return

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2021-03-04 Thread Clemens Gruber
Hi Uwe, On Mon, Mar 01, 2021 at 10:44:07PM +0100, Uwe Kleine-König wrote: > Hello Clemens, > > On Tue, Dec 15, 2020 at 10:22:22PM +0100, Clemens Gruber wrote: > > + if (state->polarity != PWM_POLARITY_NORMAL) > > + return -EOPNOTSUPP; > > We agreed on -EINVAL for that one since

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2021-03-04 Thread Clemens Gruber
Hi Uwe, On Mon, Mar 01, 2021 at 10:41:15PM +0100, Uwe Kleine-König wrote: > On Thu, Dec 17, 2020 at 12:10:10PM -0500, Sven Van Asbroeck wrote: > > On Thu, Dec 17, 2020 at 11:48 AM Clemens Gruber > > wrote: > > > > > > I can initialize the values to 0 of course and check the file for other > > >

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2021-03-01 Thread Uwe Kleine-König
Hello Clemens, On Tue, Dec 15, 2020 at 10:22:22PM +0100, Clemens Gruber wrote: > + if (state->polarity != PWM_POLARITY_NORMAL) > + return -EOPNOTSUPP; We agreed on -EINVAL for that one since 2b1c1a5d5148. Other than that the patch looks ok (but note I only looked quickly). Best

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2021-03-01 Thread Uwe Kleine-König
On Thu, Dec 17, 2020 at 12:10:10PM -0500, Sven Van Asbroeck wrote: > On Thu, Dec 17, 2020 at 11:48 AM Clemens Gruber > wrote: > > > > I can initialize the values to 0 of course and check the file for other > > places with missing initializations. > > > > Or would it be better to check the return

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2020-12-17 Thread Sven Van Asbroeck
On Thu, Dec 17, 2020 at 11:48 AM Clemens Gruber wrote: > > I can initialize the values to 0 of course and check the file for other > places with missing initializations. > > Or would it be better to check the return codes of regmap_read/write in > such cases? I'm not sure. I think that checking

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2020-12-17 Thread Clemens Gruber
Hi Sven, On Wed, Dec 16, 2020 at 10:58:07PM -0500, Sven Van Asbroeck wrote: > Hi Clemens, this looks compact, simple and neat. I like it a lot !! Thanks! > > Few very minor nits below. > > On Wed, Dec 16, 2020 at 7:53 AM Clemens Gruber > wrote: > > > > The switch to the atomic API goes hand

Re: [PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2020-12-16 Thread Sven Van Asbroeck
Hi Clemens, this looks compact, simple and neat. I like it a lot !! Few very minor nits below. On Wed, Dec 16, 2020 at 7:53 AM 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

[PATCH v5 1/7] pwm: pca9685: Switch to atomic API

2020-12-15 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