From patchwork Thu Jul 13 00:25:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Heidelberg X-Patchwork-Id: 119451 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1511799vqm; Wed, 12 Jul 2023 17:54:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8r9I9dvh7S4gfiKlA8BpA71EHNJQsjPSRkKwtA7WUFvJ37FIZs7wI/f3jEhEFHE6uHBPZ X-Received: by 2002:a17:906:80ca:b0:992:1653:3406 with SMTP id a10-20020a17090680ca00b0099216533406mr16424326ejx.73.1689209674054; Wed, 12 Jul 2023 17:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689209674; cv=none; d=google.com; s=arc-20160816; b=kF2FSra+cY+Idj2fTBO/KEvQmhYktajgvAExWSBXDPEllc6EBhexOr3UHXrSDiZu+u duNBIrADMOV7XpucvGdn9O4yoX7v8DMM09f/NaujwuK0QHJcrqvoWbN0f5n2eaRX++hg raNvXjlC7HJUOKm+9615BHZ6C6EpuJiVLPg56jB3qRXt1yWnsoJLAYnTkzXPIV3Abyqf /G8GbCQ6AVjtxOiEJG2kUSeOLDZ68ne8Ji8xuRmLvky8J7MnXhtJU5c1MOG+e2bUjCly Kcawe02RFYz0WVY3JhXvF1Ucf8DssmNwYGnBg8JRWY/u1hqGRsBHhKh9Teb7qLVKw7iv 5yaA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a1709064a4b00b0098e3e818952si6012075ejv.326.2023.07.12.17.54.10; Wed, 12 Jul 2023 17:54:34 -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 S232557AbjGMAZj (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771264723172142875 X-GMAIL-MSGID: 1771264723172142875 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-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>; + }; + +...