[RFC PATCH v1 0/2] Introduce dummy regulator consumer

Aleksandrs Vinarskis
2025-06-07T21:26:59Z

Introduce a very simple dummy consumer driver. Designed to consume
a single regulator 'vdd', the driver will power-on on probe and PM
suspend (if supported), power-off on remove and PM resume (if enabled).

There are two main reasons for this driver:
1. Create a pseudo-consumer in place of real devices which are not or
cannot be described in the device-tree. Examples would be integrated
USB UVC camera (present on some arm64 laptops) or dedicated keyboard
backlight regulator (hypothetical). Instead of leaving regulator
without consumer and `regulator-always-on` property, one could bind
to dummy consumer to save some power during suspend.
2. A great development tool.

Tested on Asus Zenbook A14 with webcamera indicator LED imitating vreg
enable pin.

Aleksandrs Vinarskis (2):
regulator: Add dummy regulator consumer binding
regulator: Introduce dummy regulator consumer driver

.../bindings/regulator/dummy-consumer.yaml | 39 +++++++++
drivers/regulator/Kconfig | 9 ++
drivers/regulator/Makefile | 1 +
drivers/regulator/dummy-consumer.c | 85 +++++++++++++++++++
4 files changed, 134 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/dummy-consumer.yaml
create mode 100644 drivers/regulator/dummy-consumer.c

--
2.45.2