public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
To: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	jens.glathe@oldschoolsolutions.biz,
	konrad.dybcio@oss.qualcomm.com
Subject: [RFC PATCH v1 0/2] Introduce dummy regulator consumer
Date: Sat,  7 Jun 2025 23:25:37 +0200	[thread overview]
Message-ID: <20250607212654.126412-1-alex.vinarskis@gmail.com> (raw)

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


             reply	other threads:[~2025-06-07 21:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07 21:25 Aleksandrs Vinarskis [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250607212654.126412-1-alex.vinarskis@gmail.com \
    --to=alex.vinarskis@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jens.glathe@oldschoolsolutions.biz \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox