Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp517474rwp; Wed, 12 Jul 2023 17:54:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlEukV+E+t/SJ+UUYSboP9PTtGMWJFk2B4NY7ONpYsN8bx2MkwHsgGOI/N4ZYBN8E9DngQ9G X-Received: by 2002:a17:906:2207:b0:991:b613:9b65 with SMTP id s7-20020a170906220700b00991b6139b65mr17847807ejs.37.1689209656583; Wed, 12 Jul 2023 17:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689209656; cv=none; d=google.com; s=arc-20160816; b=TVa2GRzef9zHfo7Ip+hJmed/F2BH0oGpd6X/ZFvg0JrB/1F8WytysV3+sump2yTdjl CK6ske+M7TZLFuS0VWGtYKOEk5TT++oAtO7NVBSXt2RWoWIrNSkG24y8LdQfx5KWtL3l wSFDYAKeRMI5wFQs7cKep6aqrtf+6V6nucsaJEMaj7vBpTV3jk1BeSwkrp7VsXktpIc0 SrjqBJl8ydM+mKhEgJs1ucmRodb0KnETrpaD9e7As7d8yuG/1DhMcCwtc2XDmGrF2NI8 wGp9o1a5dLSEuows1JjjoBZk8WiurWPG/cUg6/X/EWyWZ4WnavX0uC1RAviJUVmOgm51 m3BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=o99awW2/5nshzVGu2kPPy6jzqmm9Okff9ZDqEfq4a0M=; fh=DVb18fqo17AcmNWol/+uIKn7a0Eo/YOnjqZA1+97/sc=; b=uGYgPc6d37DMGxZzu8H3QknMz3MqyPgEsGY0eNvdCj2w73wxrGDiZRuNkkHgt3Sa89 NMKfx2tF5R+Wsm+wk2IJHIpfY6rUFV5HbSgooVM1IOah6mlLc1XN8BkV8V3vRUxAACqB IOFEUREQFkdEniGVEM9SXt7I5mLRU109Tx0mnuI/coKBLkc8PGK/3M2dV0D82K4Jht5D ONYk1s1G6FkSs+u8Zd2znLf2PhWJqY0U+EuC//CzmYKkO12uo3IWUKKUslT60xVA696q WBIu8P7QP42nAUQqG7wPXgg/mIwx/l82Wrv9W/fn4blaCRTn3dtkDwTdXxWRGi46IkSC cFUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=LQigs0oG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a1709061b0100b00987d66e6d26si6163099ejg.250.2023.07.12.17.53.53; Wed, 12 Jul 2023 17:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=LQigs0oG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232486AbjGMAZj (ORCPT + 99 others); Wed, 12 Jul 2023 20:25:39 -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: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: David Heidelberg --- .../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-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..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 = "linux,extcon-usb-gpio"; + id-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>; + }; + +... -- 2.40.1