Re: [PATCH v6 2/7] pwm: pca9685: Support hardware readout

2021-03-29 Thread Uwe Kleine-König
On Mon, Mar 29, 2021 at 07:11:53PM +0200, Clemens Gruber wrote: > On Mon, Mar 29, 2021 at 06:54:29PM +0200, Uwe Kleine-König wrote: > > On Mon, Mar 29, 2021 at 02:57:02PM +0200, Clemens Gruber wrote: > > > [...] > > > + /* Calculate (chip-wide) period from prescale value */ > > > + regmap_read(pca-

Re: [PATCH v6 2/7] pwm: pca9685: Support hardware readout

2021-03-29 Thread Clemens Gruber
On Mon, Mar 29, 2021 at 06:54:29PM +0200, Uwe Kleine-König wrote: > On Mon, Mar 29, 2021 at 02:57:02PM +0200, Clemens Gruber wrote: > > Implements .get_state to read-out the current hardware state. > > > > The hardware readout may return slightly different values than those > > that were set in ap

Re: [PATCH v6 2/7] pwm: pca9685: Support hardware readout

2021-03-29 Thread Uwe Kleine-König
On Mon, Mar 29, 2021 at 02:57:02PM +0200, Clemens Gruber wrote: > Implements .get_state to read-out the current hardware state. > > The hardware readout may return slightly different values than those > that were set in apply due to the limited range of possible prescale and > counter register val

Re: [PATCH v6 2/7] pwm: pca9685: Support hardware readout

2021-03-29 Thread Clemens Gruber
Hi Uwe, On Mon, Mar 29, 2021 at 05:51:40PM +0200, Uwe Kleine-König wrote: > Hello Clemens, > > On Mon, Mar 29, 2021 at 02:57:02PM +0200, Clemens Gruber wrote: > > The hardware readout may return slightly different values than those > > that were set in apply due to the limited range of possible p

Re: [PATCH v6 2/7] pwm: pca9685: Support hardware readout

2021-03-29 Thread Uwe Kleine-König
Hello Clemens, On Mon, Mar 29, 2021 at 02:57:02PM +0200, Clemens Gruber wrote: > The hardware readout may return slightly different values than those > that were set in apply due to the limited range of possible prescale and > counter register values. This is fine and for most hardware that's not

[PATCH v6 2/7] pwm: pca9685: Support hardware readout

2021-03-29 Thread Clemens Gruber
Implements .get_state to read-out the current hardware state. The hardware readout may return slightly different values than those that were set in apply due to the limited range of possible prescale and counter register values. Also note that although the datasheet mentions 200 Hz as default fre