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

Sven Van Asbroeck
2021-01-29T21:25:23Z

Hi Clemens,

On Fri, Jan 29, 2021 at 3:37 PM Clemens Gruber
<clemens.gruber@pqgruber.com> wrote:
>
> Is the driver really responsible for bootloaders that program the chip
> with invalid values?

No, but it's responsible for correcting invalid values. Otherwise the driver
doesn't work.

> The chip comes out of PoR with sane default values. If the bootloader of
> a user messes them up, isn't that a bootloader problem instead of a
> Linux kernel driver problem?

Invalid values are only half the problem. The other half is that two valid
values might produce the same output, e.g.:

LEN_ON = 409, LED_OFF = 1228 and
LED_ON = 419, LED_OFF = 1238
produce the same result. you can't see the difference between the two
when scoping the channel. there are probably more ways to do this,
some might surprise us. It's a tricky chip.