]> Gentwo Git Trees - linux/.git/commit
regulator: core: forward undervoltage events downstream by default
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 1 Oct 2025 10:56:49 +0000 (12:56 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 15 Oct 2025 09:48:58 +0000 (10:48 +0100)
commit433e294c3c5b5d2020085a0e36c1cb47b694690a
treed1db111b31ec19be457ec209f27ded093e00e15d
parent6277a486a7faaa6c87f4bf1d59a2de233a093248
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>
drivers/regulator/core.c
include/linux/regulator/driver.h