summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2025-10-01 13:56:49 +0300
committerMark Brown <broonie@kernel.org>2025-10-15 12:48:58 +0300
commit433e294c3c5b5d2020085a0e36c1cb47b694690a (patch)
treed1db111b31ec19be457ec209f27ded093e00e15d /include/linux
parent6277a486a7faaa6c87f4bf1d59a2de233a093248 (diff)
downloadlinux-433e294c3c5b5d2020085a0e36c1cb47b694690a.tar.xz
regulator: core: forward undervoltage events downstream by default
Forward critical supply events downstream so consumers can react in time. An under-voltage event on an upstream rail may otherwise never reach end devices (e.g. eMMC). Register a notifier on a regulator's supply when the supply is resolved, and forward only REGULATOR_EVENT_UNDER_VOLTAGE to the consumer's notifier chain. Event handling is deferred to process context via a workqueue; the consumer rdev is lifetime-pinned and the rdev lock is held while calling the notifier chain. The notifier is unregistered on regulator teardown. No DT/UAPI changes. Behavior applies to all regulators with a supply. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20251001105650.2391477-1-o.rempel@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regulator/driver.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4a216fdba354..978cf593b662 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -658,6 +658,9 @@ struct regulator_dev {
spinlock_t err_lock;
int pw_requested_mW;
+
+ /* regulator notification forwarding */
+ struct notifier_block supply_fwd_nb;
};
/*