Re: [PATCH] hwmon: (mcp9982) Update the interval cache only after successful writes
From: Guenter Roeck
Date: Mon Oct 19 2026 - 16:19:11 EST
On Sun, Oct 18, 2026 at 02:57:50PM +0900, Baek Kyu, Kim wrote:
> mcp9982_write() updates interval_idx before writing the conversion-rate
> register. If the write fails without changing the register, subsequent
> update_interval reads report the requested interval instead of the
> previous setting.
>
> Update interval_idx only after regmap_write() succeeds, leaving the
> previous cached interval in place on error.
>
> Fixes: e2fe950f34e5 ("hwmon: add support for MCP998X")
> Signed-off-by: Baek Kyu, Kim <pocj8ur4in@xxxxxxxxx>
> Acked-by: Duicu Victor <victor.duicu@xxxxxxxxxxxxx>
Applied.
Thanks,
Guenter