public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/2] Introduce dummy regulator consumer
@ 2025-06-07 21:25 Aleksandrs Vinarskis
  2025-06-07 21:25 ` [RFC PATCH v1 1/2] regulator: Add dummy regulator consumer binding Aleksandrs Vinarskis
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Aleksandrs Vinarskis @ 2025-06-07 21:25 UTC (permalink / raw)
  To: Aleksandrs Vinarskis, Mark Brown, linux-kernel, devicetree
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	jens.glathe, konrad.dybcio

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-06-30 13:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-07 21:25 [RFC PATCH v1 0/2] Introduce dummy regulator consumer Aleksandrs Vinarskis
2025-06-07 21:25 ` [RFC PATCH v1 1/2] regulator: Add dummy regulator consumer binding Aleksandrs Vinarskis
2025-06-08 22:33   ` Rob Herring (Arm)
2025-06-07 21:25 ` [RFC PATCH v1 2/2] regulator: Introduce dummy regulator consumer driver Aleksandrs Vinarskis
2025-06-08 22:33 ` [RFC PATCH v1 0/2] Introduce dummy regulator consumer Mark Brown
2025-06-09 20:32   ` Aleksandrs Vinarskis
2025-06-09 20:50     ` Mark Brown
2025-06-09 21:15       ` Aleksandrs Vinarskis
2025-06-10 13:51         ` Mark Brown
2025-06-28  6:14           ` Jens Glathe
2025-06-28 14:35             ` Konrad Dybcio
2025-06-30 13:11               ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox