From nobody Sun Feb 8 04:34:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62A03C001B0 for ; Thu, 13 Jul 2023 00:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232617AbjGMAZk (ORCPT ); Wed, 12 Jul 2023 20:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233368AbjGMAZa (ORCPT ); Wed, 12 Jul 2023 20:25:30 -0400 Received: from ixit.cz (ip-89-177-23-149.bb.vodafone.cz [89.177.23.149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 182A510EC; Wed, 12 Jul 2023 17:25:28 -0700 (PDT) Received: from newone.lan (unknown [10.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id 4F826160C4E; Thu, 13 Jul 2023 02:25:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1689207926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=o99awW2/5nshzVGu2kPPy6jzqmm9Okff9ZDqEfq4a0M=; b=LQigs0oGR4PjrhwnXTBaI5eGF4ZFONXw6AULqTAO2Pg4atckzbtbgT1U9+8m4hAL5Cr+BV UaGG2vI4AcHEZcHOyoRn/ZaPN+6J+DeP6Dq3oM2TOXaYp6bqHsp0lsDNFjO/s+YJ2mQSrh +MgADUZwLfrUidc1tG9WLm7nc+gAJ8I= From: David Heidelberg To: MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , Linus Walleij Cc: David Heidelberg , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] dt-bindings: extcon: extcon-usb-gpio: convert to yaml format Date: Thu, 13 Jul 2023 02:25:18 +0200 Message-Id: <20230713002519.109392-1-david@ixit.cz> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Signed-off-by: David Heidelberg Acked-by: MyungJoo Ham --- .../bindings/extcon/extcon-usb-gpio.txt | 21 --------- .../bindings/extcon/extcon-usb-gpio.yaml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-usb-gpi= o.txt create mode 100644 Documentation/devicetree/bindings/extcon/extcon-usb-gpi= o.yaml diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b= /Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt deleted file mode 100644 index dfc14f71e81f..000000000000 --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt +++ /dev/null @@ -1,21 +0,0 @@ -USB GPIO Extcon device - -This is a virtual device used to generate USB cable states from the USB ID= pin -connected to a GPIO pin. - -Required properties: -- compatible: Should be "linux,extcon-usb-gpio" - -Either one of id-gpio or vbus-gpio must be present. Both can be present as= well. -- id-gpio: gpio for USB ID pin. See gpio binding. -- vbus-gpio: gpio for USB VBUS pin. - -Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below: - extcon_usb1 { - compatible =3D "linux,extcon-usb-gpio"; - id-gpio =3D <&gpio6 1 GPIO_ACTIVE_HIGH>; - } - - &omap_dwc3_1 { - extcon =3D <&extcon_usb1>; - }; diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml = b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml new file mode 100644 index 000000000000..b345745013a2 --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/extcon/extcon-usb-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB GPIO Extcon device + +maintainers: + - Linus Walleij + +description: + This is a virtual device used to generate USB cable states + from the USB ID pin connected to a GPIO pin. + +properties: + compatible: + const: linux,extcon-usb-gpio + + id-gpio: + description: GPIO for USB ID pin. + + vbus-gpio: + description: GPIO for USB VBUS pin. + +required: + - compatible + +anyOf: + - required: + - id-gpio + - required: + - vbus-gpio + +additionalProperties: false + +examples: + - | + #include + extcon_usb1 { + compatible =3D "linux,extcon-usb-gpio"; + id-gpio =3D <&gpio6 1 GPIO_ACTIVE_HIGH>; + }; + +... --=20 2.40.1