From mboxrd@z Thu Jan 1 00:00:00 1970 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 D426DC7EE2E for ; Mon, 12 Jun 2023 08:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232051AbjFLIai (ORCPT ); Mon, 12 Jun 2023 04:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233740AbjFLIaC (ORCPT ); Mon, 12 Jun 2023 04:30:02 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52E2D1991 for ; Mon, 12 Jun 2023 01:29:22 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5169f920a9dso8366977a12.0 for ; Mon, 12 Jun 2023 01:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686558559; x=1689150559; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gsnHpIL0gMBUBdAQKZ2SqRGf+mIF2ab1KdkyACTk5zY=; b=IYCp3o9Yf+5H82G/i4/6kNCO5btgqpB7Maxiu447zdbiEXTSY3ws7MLx8GEOxIfaDZ QTwLfMNtnYCq9Psx2hsUawFWp7xsCxHfSmLZx9gLRdMCMlwK3xh5x9wAoSXt5E4Qx8PE Be1YNAMGdhf2wRP1nVi67psGQ5IQiTDSGbiPz8gAUcILOPHVxxngYCsciYFdc2xxf2b/ 5LIKe1n8JmnArct8kx6X/pa9VlRmjoDfAk5aRZgL2Ea6HTo51MHCVMhX786WfuLzndbu 0fffvo7fZ+qH1gIZiivaeK4IfilNQ7NSUmUF62LffxIpftzNuodOYhkNLvQXvxNmzjCh dqEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686558559; x=1689150559; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gsnHpIL0gMBUBdAQKZ2SqRGf+mIF2ab1KdkyACTk5zY=; b=duVU6qfhPpNc4b3HECDouDI5tjFrhM05KK5+LTSEY69dzdlFVSvZs6uv15P8oVWJmO 2oLrR7WKeJjjWz0MVkSt5pw8DF2s2NkKLvRndbfG6MknJRev936hvE0YaKlcYkAakzRi DBRu2Vw69krDPF7kP2M8X0kB9H6PHJz/Zxnq1it0A5QBJPTf7NgS1hXVc49AT4tgL1Xq 1ZI9Tl55WqFejJAmjRlm0/T6DijfEfX7mZPi/xKZwO+goc6vVg4DdHMUvGwmfgNTBlD1 RDR4610CKXEgcnottCwj5WeGLxAZAED3RWVqIo+ciIy9tQj8s1jDwsg6GD3x3s6HAPgl t4NA== X-Gm-Message-State: AC+VfDznPgtPFi9Qsdx26xOl0QWlZjYOLKFwHxQCmVd0jCFhQLnWfb44 PrcyDwgyK4bjejuAVAYTBoNZoA== X-Google-Smtp-Source: ACHHUZ6Q+a1N0q7NwKFJlA9Qqt1cuwduPcLwp2Ngzcbiu+4Sq+3r2FGCOunAVh6N8Xr2giVJlMHYag== X-Received: by 2002:a05:6402:270d:b0:514:8fdb:6354 with SMTP id y13-20020a056402270d00b005148fdb6354mr5483679edd.18.1686558559205; Mon, 12 Jun 2023 01:29:19 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id i13-20020a50fc0d000000b0050bc6d0e880sm4745009edr.61.2023.06.12.01.29.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 01:29:18 -0700 (PDT) Message-ID: <5217a54e-353b-bd48-68fa-d2104accfeb9@linaro.org> Date: Mon, 12 Jun 2023 10:29:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH 1/3] dt-bindings: extcon-usb-gpio: convert to DT schema format Content-Language: en-US To: Alexander Stein , MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?Q?Beno=c3=aet_Cousson?= , Tony Lindgren , Shawn Guo , Sascha Hauer , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno , Andy Gross , Bjorn Andersson , Konrad Dybcio , Heiko Stuebner Cc: Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org References: <20230608081153.441455-1-alexander.stein@ew.tq-group.com> From: Krzysztof Kozlowski In-Reply-To: <20230608081153.441455-1-alexander.stein@ew.tq-group.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 08/06/2023 10:11, Alexander Stein wrote: > Convert the binding to DT schema format. Change the GPIO properties to new > naming convention using -gpios as well. > > Signed-off-by: Alexander Stein > --- > .../bindings/extcon/extcon-usb-gpio.txt | 21 -------- > .../bindings/extcon/extcon-usb-gpio.yaml | 52 +++++++++++++++++++ > 2 files changed, 52 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 dfc14f71e81fb..0000000000000 > --- 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 0000000000000..3a71d848dc7a8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml > @@ -0,0 +1,52 @@ > +# 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. > + > +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: oneOf instead > + - required: > + - id-gpios > + - required: > + - vbus-gpios > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + extcon_usb1 { No underscores, generic node names, so just "extcon-usb" > + compatible = "linux,extcon-usb-gpio"; > + id-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>; > + vbus-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; > + }; > + > + usb-controller { > + extcon = <&extcon_usb1>; > + }; Drop controller, no need to add consumers in a provider's binding. Best regards, Krzysztof