Re: [PATCH v2] hwmon: (da9052) Tie the tsiref regulator to the hwmon device
From: Guenter Roeck
Date: Thu Dec 03 2026 - 12:25:35 EST
On Thu, Dec 03, 2026 at 03:13:30PM +0400, Arina Kharlamova wrote:
> From: Arina Kharlamova <arina.kharlamova@xxxxxxxxxxxx>
>
> da9052_hwmon_probe() calls devm_regulator_get_enable_read_voltage() on
> the parent MFD device, because the tsiref supply is described in the
> PMIC node. The reference and the enable then belong to the parent and
> are not dropped when the probe fails later or when the hwmon driver is
> unbound. Every new bind enables the regulator once more.
>
> Look the regulator up on the parent, but enable it with the plain
> calls and disable and put it from a devm action of the hwmon device.
>
> Fixes: d72fd5228c9f ("hwmon: (da9052) Use devm_regulator_get_enable_read_voltage()")
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: David Lechner <dlechner@xxxxxxxxxxxx>
> Signed-off-by: Arina Kharlamova <arina.kharlamova@xxxxxxxxxxxx>
Applied.
Thanks,
Guenter