Re: [PATCH v2] hwmon (max6639): Use regmap

From: Guenter Roeck
Date: Thu May 02 2024 - 14:22:54 EST


On 5/2/24 10:25, Naresh Solanki wrote:
[ ... ]

+ u8 pwm[MAX6639_NDEV]; /* Register value: Duty cycle 0..120 */

pwm caching needs to be dropped as well. It is no longer initialized in
max6639_init_client(), but updated and later used in pwm_store() and
pwm_show(). Looking at the datasheet, the pwm registers are volatile
and should not be cached in the first place.
Yes. I did that but found that the register is write only. i.e.,

Odd. The datasheet says that it is r/w or, rather, that reading it returns
the _current_ pwm value and writing it sets the target pwm value in pwm mode.

What happens when the register is read ?

Thanks,
Guenter