From patchwork Mon Jul 24 10:39:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 705977 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 A2FDEC001E0 for ; Mon, 24 Jul 2023 10:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232072AbjGXKkQ (ORCPT ); Mon, 24 Jul 2023 06:40:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbjGXKkP (ORCPT ); Mon, 24 Jul 2023 06:40:15 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EAAE12D; Mon, 24 Jul 2023 03:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1690195190; x=1721731190; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PSvqA5J0i6lEso9p1BnKC3rml2XscdCkdUBi4lcX+O8=; b=ptn0HG9yFPKH76/ZOBNb6KcSzo7ccXeHfuT82ESJjnI232ArLiUQPPcY XKLoY1eihUbmTqenEC/uEs3vwZJu+bcugNvWinPJnXX1lOHNQWD2/hvaq k6YZ40wjRV3MkBBSeCJG2rALpsRIvTVrztdcxBEQvyamcmo7g0NHzgfGh 8ftXcVsJay32jOr/mpP9IJP3UZpzzmUhIPoti+7Ug0SduZNmahwHQ3ZTN gbMX+vUha7sVzqFEA43dGRHjKsIIG4+mSIvuPvxV9Q9wO8/9asQ8HAOCt EsjJuF2U0t2m6Fm5GoAZm9JyhxKx3cHcVEXhUTpsPd9Yxcmjkza3SOkLC w==; X-IronPort-AV: E=Sophos;i="6.01,228,1684792800"; d="scan'208";a="32078482" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 24 Jul 2023 12:39:18 +0200 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (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 vtuxmail01.tq-net.de (Postfix) with ESMTPSA id A958F280084; Mon, 24 Jul 2023 12:39:17 +0200 (CEST) From: Alexander Stein To: MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , =?utf-8?q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Matthias Brugger , AngeloGioacchino Del Regno , Andy Gross , Bjorn Andersson , Konrad Dybcio , Heiko Stuebner Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring Subject: [PATCH v4 1/6] dt-bindings: extcon-usb-gpio: convert to DT schema format Date: Mon, 24 Jul 2023 12:39:08 +0200 Message-Id: <20230724103914.1779027-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230724103914.1779027-1-alexander.stein@ew.tq-group.com> References: <20230724103914.1779027-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Convert the binding to DT schema format. Change the GPIO properties to new naming convention using -gpios as well. Signed-off-by: Alexander Stein Reviewed-by: Rob Herring --- .../bindings/extcon/extcon-usb-gpio.txt | 21 -------- .../bindings/extcon/extcon-usb-gpio.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt create mode 100644 Documentation/devicetree/bindings/extcon/extcon-usb-gpio.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 = "linux,extcon-usb-gpio"; - id-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>; - } - - &omap_dwc3_1 { - extcon = <&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..136f865b8781 --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml @@ -0,0 +1,51 @@ +# 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: + - Alexander Stein + +description: + This is a virtual device used to generate USB cable states from the + USB ID pin connected to a GPIO pin. + Deprecated, use USB connector node instead. + +deprecated: true + +properties: + compatible: + const: linux,extcon-usb-gpio + + id-gpios: + description: An input gpio for USB ID pin. + maxItems: 1 + + vbus-gpios: + description: An input gpio for USB VBus pin, used to detect presence of + VBUS 5V. + maxItems: 1 + +required: + - compatible + +anyOf: + - required: + - id-gpios + - required: + - vbus-gpios + +additionalProperties: false + +examples: + - | + #include + + extcon-usb1 { + compatible = "linux,extcon-usb-gpio"; + id-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>; + vbus-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; + };