From d1ce827a9cc11ffdfec77b7fec9b73a8020a308d Mon Sep 17 00:00:00 2001 From: Javier Carrasco Date: Wed, 14 Oct 2026 19:34:06 +0200 Subject: [PATCH] hwmon: chipcap2: enable IRQ processing when regulator is already enabled cc2_enable() returns early when the regulator is already enabled. This can happen if a previous regulator_disable() failed or if the regulator was configured as always-on. In this case, process_irqs remains false, causing the ready interrupt to be ignored. Subsequent operations waiting for the ready completion then time out. Set process_irqs before returning when the regulator is already enabled, so that the driver continues to process ready interrupts. Fixes: 3af350929e75 ("hwmon: Add support for Amphenol ChipCap 2") Cc: stable@vger.kernel.org Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20261014-chipcap2_locks-v3-7-27ebfc2c5b9e@gmail.com Signed-off-by: Guenter Roeck --- drivers/hwmon/chipcap2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c index 654f6420da7a..837b1830f2e4 100644 --- a/drivers/hwmon/chipcap2.c +++ b/drivers/hwmon/chipcap2.c @@ -120,8 +120,10 @@ static int cc2_enable(struct cc2_data *data) int ret; /* exclusive regulator, check in case a disable failed */ - if (regulator_is_enabled(data->regulator)) + if (regulator_is_enabled(data->regulator)) { + data->process_irqs = true; return 0; + } /* clear any pending completion */ try_wait_for_completion(&data->complete);