From: Mike Looijmans <mike.looijmans@topic.nl>
To: Rob Herring <robh@kernel.org>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
balbi@kernel.org
Subject: Re: [PATCH v2] usb: dwc3: Add support for VBUS power control
Date: Wed, 17 Jun 2020 16:38:11 +0200 [thread overview]
Message-ID: <504080a1-cbc9-f781-04bb-12d5679ba697@topic.nl> (raw)
In-Reply-To: <20200610202255.GA3646369@bogus>
Met vriendelijke groet / kind regards,
Mike Looijmans
System Expert
TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands
T: +31 (0) 499 33 69 69
E: mike.looijmans@topicproducts.com
W: www.topicproducts.com
Please consider the environment before printing this e-mail
On 10-06-2020 22:22, Rob Herring wrote:
> On Wed, Jun 03, 2020 at 02:09:15PM +0200, Mike Looijmans wrote:
>> Support VBUS power control using regulator framework. Enables the regulator
>> while the port is in host mode.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>> ---
>> v2: Add missing devm_regulator_get call which got lost during rebase
>>
>> .../devicetree/bindings/usb/dwc3.txt | 1 +
>> drivers/usb/dwc3/core.c | 34 ++++++++++++++-----
>> drivers/usb/dwc3/core.h | 4 +++
>> drivers/usb/dwc3/drd.c | 6 ++--
>> 4 files changed, 33 insertions(+), 12 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
>> index 9946ff9ba735..56bc3f238e2d 100644
>> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
>> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
>> @@ -37,6 +37,7 @@ Optional properties:
>> - phys: from the *Generic PHY* bindings
>> - phy-names: from the *Generic PHY* bindings; supported names are "usb2-phy"
>> or "usb3-phy".
>> + - vbus-supply: Regulator handle that provides the VBUS power.
> Does the DWC3 block require Vbus to power itself? Doubtful. This
> belongs in a usb-connector node. If the DWC3 driver wants to get the
> Vbus supply, it can fetch it from that node.
>
> Rob
Okay, I've been digging into that. But there's no actual driver that
binds to a "usb-b-connector" compatible, so how do we get to the
vbus-supply from there?
[devm_]regulator_get only accepts a device as argument, and will not
look into child nodes. The only way to get at the vbus of a child node
(or a node linked through a port) would be to hand-code the equivalent
of of_regulator_get(), which will not be acceptable.
Or is it the intention that I write a usb-X-connector device driver
first that handles the vbus?
--
Mike Looijmans
next prev parent reply other threads:[~2020-06-17 14:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 12:09 [PATCH v2] usb: dwc3: Add support for VBUS power control Mike Looijmans
[not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.37aec1ae-7fee-44cb-ae24-a10a151abcb3@emailsignatures365.codetwo.com>
[not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.5c7af9b2-8c7e-406c-b29a-f20ab6b96179@emailsignatures365.codetwo.com>
2020-06-10 20:22 ` Rob Herring
2020-06-11 6:09 ` Mike Looijmans
2020-06-17 14:38 ` Mike Looijmans [this message]
2020-06-17 16:13 ` Rob Herring
2020-06-17 17:28 ` Mike Looijmans
2020-06-19 8:21 ` Mike Looijmans
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=504080a1-cbc9-f781-04bb-12d5679ba697@topic.nl \
--to=mike.looijmans@topic.nl \
--cc=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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