Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: extcon: convert extcon-usb-gpio.txt to yaml format

Convert binding doc extcon-usb-gpio.txt to yaml format to fix below
warning:
arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dtb: /extcon-usb0:
failed to match any schema with compatible: ['linux,extcon-usb-gpio']

Additional change:
- rename id-gpio to id-gpios
- rename vbus-gpio to vbus-gpios

Link: https://lore.kernel.org/lkml/20240812201754.3830198-1-Frank.Li@nxp.com/
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Frank Li and committed by
Chanwoo Choi
79a31ce0 38f6c92e

+37 -21
-21
Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
··· 1 - USB GPIO Extcon device 2 - 3 - This is a virtual device used to generate USB cable states from the USB ID pin 4 - connected to a GPIO pin. 5 - 6 - Required properties: 7 - - compatible: Should be "linux,extcon-usb-gpio" 8 - 9 - Either one of id-gpio or vbus-gpio must be present. Both can be present as well. 10 - - id-gpio: gpio for USB ID pin. See gpio binding. 11 - - vbus-gpio: gpio for USB VBUS pin. 12 - 13 - Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below: 14 - extcon_usb1 { 15 - compatible = "linux,extcon-usb-gpio"; 16 - id-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>; 17 - } 18 - 19 - &omap_dwc3_1 { 20 - extcon = <&extcon_usb1>; 21 - };
+37
Documentation/devicetree/bindings/extcon/linux,extcon-usb-gpio.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/extcon/linux,extcon-usb-gpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: USB GPIO Extcon device 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + This is a virtual device used to generate USB cable states from the USB ID pin 14 + connected to a GPIO pin. 15 + 16 + properties: 17 + compatible: 18 + const: linux,extcon-usb-gpio 19 + 20 + id-gpios: 21 + description: gpio for USB ID pin. See gpio binding. 22 + vbus-gpios: 23 + description: gpio for USB VBUS pin. 24 + 25 + required: 26 + - compatible 27 + 28 + additionalProperties: false 29 + 30 + examples: 31 + - | 32 + #include <dt-bindings/gpio/gpio.h> 33 + 34 + extcon_usb1 { 35 + compatible = "linux,extcon-usb-gpio"; 36 + id-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>; 37 + };