From: Mark Brown <broonie@kernel.org>
To: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
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: Re: [RFC PATCH v1 0/2] Introduce dummy regulator consumer
Date: Tue, 10 Jun 2025 14:51:36 +0100 [thread overview]
Message-ID: <6fcbedb3-eb41-449f-9b6d-10699153c9dc@sirena.org.uk> (raw)
In-Reply-To: <CAMcHhXoioEJH+KnLYbXmnt5eyGT-tXg0-CzLQpvj=8Jy5sGXuw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3527 bytes --]
On Mon, Jun 09, 2025 at 11:15:09PM +0200, Aleksandrs Vinarskis wrote:
> On Mon, 9 Jun 2025 at 22:50, Mark Brown <broonie@kernel.org> wrote:
> > I don't see why not, and this can also be approached from the controller
> > side - it's providing a USB bus which includes power as part of the
> > specification. That's just a question of where the binding happens
> > though.
> That would be another option. Could you elaborate on this, please?
> If I understand you correctly, you mean to extend controller binding
> (and driver) to take in an additional supply? If yes - I'm afraid that
Yes.
> will be hard to justify to USB controller folks - as per my
> understanding bindings (and device's driver) shall describe the
> physical specification of the device, and in this case the root
> controller does not in fact provide powered rail(s), nor a way to
> control it - its an external addition controlled by SoC's GPIO for a
> specific device, so it shall be described as such. Perhaps Konrad
> could share his view on this?
There's also the potential that there isn't a single 5V supply for the
bus, depending on the system design.
> > I'm also not clear what the relevance is here? If we have a dummy
> > consumer we're still going to need to work out how to instantiate it -
> > that's the same problem no matter what's getting instantiated. A dummy
> > consumer is a userspace interface, not a firmware interface.
> Ah perhaps I should have shared more examples, my bad.
> Currently suggested solution, which in my opinion is not scalable:
> * Add VID/PID (of every camera, iff known) to onboard usb driver [1]
> * Define in DT as:
> ```
> camera {
> compatible = "usb5986,1198";
>
> vdd-supply = <&vreg_cam_5p0>;
> };
That's what I'd understood.
> Proposed solution with dummy regulator consumer:
> * No need to explicitly set VID/PID. Define in DT as:
> ```
> camera {
> compatible = "regulator-dummy-consumer";
>
> vdd-supply = <&vreg_cam_5p0>;
> };
> ```
This is clearly not describing the hardware and therefore not a good fit
for DT.
> > > Having to add VID/PID for every device that does not in fact need a
> > > dedicated driver has another issue - it was just confirmed that Lenovo
> > > Ideapad 5 uses a similar setup with USB UVC webcam, but of course
> > > VID/PID are different. That would require yet another driver change.
> > We already need relatively large sets of quirks because laptops have
> > firmwares built for Windows which is happy to enumerate things based on
> > DMI information even when there is a perfectly good enumerable interface
> > that could describe things directly, never mind the bits that aren't
> > enumerable. This doesn't seem particularly different.
> But how would we approach the lack of particular information, in this
> case all possible VID/PID for an embedded camera? VID/PID was
> identified by checking the actual device, which does not rule out OEM
> switching camera SKU on the next batch, same way they do with other
> peripherals.
I'm not saying this a particularly great or pleasant solution, just that
it's where things are at. You're trying to solve an OS problem with a
firmware description which is a bit of a mismatch, ideally the firmware
descriptions would be better but that's just not how ACPI laptops work
unfortunately.
It does seem a lot easier to just mark the supplies as always on if
there's no integration with an actual client driver TBH.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-06-10 13:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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
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 [this message]
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=6fcbedb3-eb41-449f-9b6d-10699153c9dc@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alex.vinarskis@gmail.com \
--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
all inboxes | Powered by JetHome®