diff mbox series

[v4,8/9] dt-bindings: usb: generic: Add role-switch-default-host binding

Message ID 20191028215919.83697-9-john.stultz@linaro.org
State New
Headers show
Series Prereqs for HiKey960 USB support | expand

Commit Message

John Stultz Oct. 28, 2019, 9:59 p.m. UTC
Add binding to configure the default role the controller
assumes is host mode when the usb role is USB_ROLE_NONE.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
CC: ShuFan Lee <shufan_lee@richtek.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Yu Chen <chenyu56@huawei.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jun Li <lijun.kernel@gmail.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Jack Pham <jackp@codeaurora.org>
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>

Signed-off-by: John Stultz <john.stultz@linaro.org>

---
 Documentation/devicetree/bindings/usb/generic.txt | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.17.1

Comments

John Stultz Oct. 29, 2019, 6:26 p.m. UTC | #1
On Tue, Oct 29, 2019 at 2:23 AM Felipe Balbi <balbi@kernel.org> wrote:
> John Stultz <john.stultz@linaro.org> writes:

>

> > Add binding to configure the default role the controller

> > assumes is host mode when the usb role is USB_ROLE_NONE.

> >

...
> > + - role-switch-default-host: boolean, indicating if usb-role-switch is enabled

> > +                     the device default operation mode of controller while

> > +                     usb role is USB_ROLE_NONE is host mode. If this is not

> > +                     set or false, it will be assumed the default is device

> > +                     mode.

>

> Do we also need a role-switch-default-peripheral? Would it be better to

> have a single role-switch-default property which accepts "host" or

> "peripheral" arguments?


I guess the standard default is peripheral, so this differentiated
from that, but I agree it might be more forward thinking to let it
specify a type argument in case there is another option in the future.

I'll rework this.

Thanks again for the review and feedback!
-john
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/generic.txt b/Documentation/devicetree/bindings/usb/generic.txt
index cf5a1ad456e6..013782fde293 100644
--- a/Documentation/devicetree/bindings/usb/generic.txt
+++ b/Documentation/devicetree/bindings/usb/generic.txt
@@ -34,6 +34,11 @@  Optional properties:
 			the USB data role (USB host or USB device) for a given
 			USB connector, such as Type-C, Type-B(micro).
 			see connector/usb-connector.txt.
+ - role-switch-default-host: boolean, indicating if usb-role-switch is enabled
+			the device default operation mode of controller while
+			usb role is USB_ROLE_NONE is host mode. If this is not
+			set or false, it will be assumed the default is device
+			mode.
 
 This is an attribute to a USB controller such as: