On Wed, Mar 4, 2020 at 9:01 PM Prashant Malani <pmalani@xxxxxxxxxxxx> wrote: > > Convert the usb-connector.txt bindings file to YAML format. This allows > it to be used in dt_bindings_check verification. This patch was > born out of a patch series for the addition of a Type C connector > class port driver[1]. > > An attempt has been made to maintain the same documentation text and > example structure as was in the .txt file, but wherever needed > modifications have been made to satisfy dt_bindings_check. > > Also, update all references to usb-connector.txt to now use > usb-connector.yaml. > > [1]: https://lkml.org/lkml/2020/2/19/1232 > > Signed-off-by: Prashant Malani <pmalani@xxxxxxxxxxxx> > --- > > Changes in v2: > - Added type references for some properties. > - Removed pinctrl properties. > - Updated power-role, try-power-role and data-role properties to be in > valid schema format. > - Added OF graph data bus binding property according to reviewer > suggestions. > > .../connector/samsung,usb-connector-11pin.txt | 2 +- > .../bindings/connector/usb-connector.txt | 135 ------------ > .../bindings/connector/usb-connector.yaml | 203 ++++++++++++++++++ > .../devicetree/bindings/usb/fcs,fusb302.txt | 2 +- > .../devicetree/bindings/usb/generic.txt | 2 +- > .../devicetree/bindings/usb/mediatek,mtu3.txt | 2 +- > .../devicetree/bindings/usb/mediatek,musb.txt | 2 +- > .../bindings/usb/richtek,rt1711h.txt | 2 +- > .../devicetree/bindings/usb/ti,hd3ss3220.txt | 2 +- > .../devicetree/bindings/usb/typec-tcpci.txt | 2 +- > .../devicetree/bindings/usb/usb-conn-gpio.txt | 4 +- > 11 files changed, 213 insertions(+), 145 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/connector/usb-connector.txt > create mode 100644 Documentation/devicetree/bindings/connector/usb-connector.yaml > diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > new file mode 100644 > index 0000000000000..b386e2880405c > --- /dev/null > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > @@ -0,0 +1,203 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/connector/usb-connector.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: USB Connector > + > +maintainers: > + - linux-usb@xxxxxxxxxxxxxxx Person please. You can put me if no one else. > +description: > + A USB connector node represents a physical USB connector. It should be a child > + of a USB interface controller. > + > +properties: > + compatible: > + enum: > + - usb-a-connector > + - usb-b-connector > + - usb-c-connector > + > + label: > + description: Symbolic name for the connector. > + > + type: > + description: Size of the connector, should be specified in case of USB-A, > + USB-B non-fullsize connectors. > + $ref: /schemas/types.yaml#definitions/string Needs to be under an 'allOf' or the enum is ignored. Rob