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 9FF05C433FE for ; Thu, 6 Oct 2022 20:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229437AbiJFUUd (ORCPT ); Thu, 6 Oct 2022 16:20:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbiJFUUc (ORCPT ); Thu, 6 Oct 2022 16:20:32 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2454CB03DF for ; Thu, 6 Oct 2022 13:20:29 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id g1so4354334lfu.12 for ; Thu, 06 Oct 2022 13:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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; bh=lg2Ge2pvHw2Yt9X+k22wjzhBKqpfRYyWZvz0jY249f8=; b=oOEiiJtt+3NlVVoliUJoMJyab7ex+cGfsnDUh7SWRUoAQwY/uRs27ebDTjkwwAdDDb JvNvNIXnZh8NN8d3BvxJ6DuLcH57cym4PlK/jCtD2DelwJYx+cuGdzaQFZKN/yw9XDpc VsZXQMYcWgEu7v52XPWTjApc0bZFNkxWBrhCf5I+dxQq+oXIJCAYaA403w5q5KMEflkz NDWhsF0rQqJaU/p+UfW6YyJZodu9TGJouqq2aos2zUtBQ9WcBNXx956EecclO0w6Di6u iQH+OqZVhJDEqzS7t7bUufGe35OKboBnqpt/qSkaaw5eNK77/EflgR1da5T8+GOb/gee X4Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=lg2Ge2pvHw2Yt9X+k22wjzhBKqpfRYyWZvz0jY249f8=; b=0TV4S7eFL3hR3DTKRRBY/7X+lwxlGnjvL6mT0JINu/dn1eBfcv7xynhlca1yqJTou8 tDT8gUCMnlJpMaEQrDtR/2pKb3kP3a47EReR61srtcXAJm004pGvB7cWWHZrA06fxeZ9 gAKCB43reNt9F/XO+4ZgR9bF36FLL9JP2HenwLwoCQ7JTSaE2B+ex39myvl4Ipq5ZnWq qDXqeTCsGw6dwmvjSEydUM93GjafyQmTR7ahFQc4yq3kK3rgPIjt/pxfZ5Bbg9wWoyuw ZiTNT3KVuwRG+Sbqa7mX8sM80OxkP590+gIjD5yyNcLtXeZZz8yCcarRCka+z/y3GyFA /VjA== X-Gm-Message-State: ACrzQf3ZpOHfXwv+nKsPo59SDW16d6YQ1sM3Wkm36UE84iV+Lz3ePZBl TWDM9h4A0woyHrYuf1WCaabfAA== X-Google-Smtp-Source: AMsMyM4wI342OUVOiJD/jCc9cO7qtnA8UniyTPwaHsw6EbTnMr5bYpdTUqU3j3CpDbNMDC/NL/rXNw== X-Received: by 2002:ac2:4424:0:b0:4a2:4b01:8458 with SMTP id w4-20020ac24424000000b004a24b018458mr670092lfl.84.1665087627020; Thu, 06 Oct 2022 13:20:27 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id k1-20020a2eb741000000b0026a92616cd2sm12077ljo.35.2022.10.06.13.20.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Oct 2022 13:20:26 -0700 (PDT) Message-ID: Date: Thu, 6 Oct 2022 22:20:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 1/6] dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema Content-Language: en-US To: neil.armstrong@linaro.org, Konrad Dybcio , Andy Gross , Lee Jones , Bjorn Andersson , Linus Walleij , Mark Brown , Krzysztof Kozlowski , Rob Herring , Liam Girdwood Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org References: <20221005-mdm9615-pinctrl-yaml-v1-0-0cbc006e2a30@linaro.org> <20221005-mdm9615-pinctrl-yaml-v1-1-0cbc006e2a30@linaro.org> <8213587e-681a-a948-42a6-2b1632b47ac0@linaro.org> <5a669cee-55b2-f5cb-56f2-279003d08578@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <5a669cee-55b2-f5cb-56f2-279003d08578@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 06/10/2022 18:20, Neil Armstrong wrote: > Hi, > > On 06/10/2022 13:09, Krzysztof Kozlowski wrote: >> On 06/10/2022 11:57, Neil Armstrong wrote: >>> Convert the MDM9515 pinctrl bindings to dt-schema. >>> >>> Signed-off-by: Neil Armstrong >>> --- >>> .../bindings/pinctrl/qcom,mdm9615-pinctrl.txt | 161 --------------------- >>> .../bindings/pinctrl/qcom,mdm9615-pinctrl.yaml | 101 +++++++++++++ >>> 2 files changed, 101 insertions(+), 161 deletions(-) >>> >> >> Thank you for your patch. There is something to discuss/improve. >> >>> - }; >>> - }; >>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml >>> new file mode 100644 >>> index 000000000000..6a5966fc0098 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml >>> @@ -0,0 +1,101 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/pinctrl/qcom,mdm9615-pinctrl.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Qualcomm Technologies, Inc. MDM9615 TLMM block >>> + >>> +maintainers: >>> + - Bjorn Andersson >>> + >>> +description: | >> >> No need for | > > Ack > >> >>> + This binding describes the Top Level Mode Multiplexer block found in the >>> + MDM9615 platform. >> >> Instead: "Top Level Mode Multiplexer pin controller node in Qualcomm >> MDM9615 SoC." >> >> I see this pattern is coming from other file, so I will fix all of them. > > Ack, wil use this. > >> >>> + >>> +allOf: >>> + - $ref: "pinctrl.yaml#" >> >> Drop it, it's included from tlmm-common > > Ack > >> >>> + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# >>> + >>> +properties: >>> + compatible: >>> + const: qcom,mdm9615-pinctrl >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + interrupts: true >>> + interrupt-controller: true >>> + '#interrupt-cells': true >>> + gpio-controller: true >>> + '#gpio-cells': true >>> + gpio-ranges: true >>> + >>> +required: >>> + - compatible >>> + - reg >>> + >>> +additionalProperties: false >>> + >>> +patternProperties: >>> + '-state$': >> >> Use " as quotes > > Ack > >> >>> + oneOf: >>> + - $ref: "#/$defs/qcom-mdm9615-pinctrl-state" >>> + - patternProperties: >>> + "-pins$": >>> + $ref: "#/$defs/qcom-mdm9615-pinctrl-state" > > Interesting, if I add this subnode (that should be valid): > gsbi3-state { > pins = "gpio8", "gpio9", "gpio10", "gpio11"; > function = "gsbi3"; > drive-strength = <8>; > bias-disable; > }; > > then I get the following warning from dt_bindings_check: First, your block for using defs/qcom-mdm9615-pinctrl-state is not exactly like it should be, e.g. it misses additionalProperties: false. Maybe it misses few things more. Please use one of my latest patches as example, e.g. https://lore.kernel.org/linux-devicetree/20221006144518.256956-1-krzysztof.kozlowski@linaro.org/T/#t > > Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.example.dtb: pinctrl@1000000: gsbi3-state: More than one condition true in oneOf schema: > {'oneOf': [{'$ref': '#/$defs/qcom-mdm9615-pinctrl-state'}, > {'patternProperties': {'-pins$': {'$ref': '#/$defs/qcom-mdm9615-pinctrl-state'}, > 'pinctrl-[0-9]+': True}, > 'properties': {'$nodename': True, > 'phandle': True, > 'pinctrl-names': True, > 'secure-status': True, > 'status': True}}]} > From schema: /Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml > > And I don't understand why, the nodename should not match "-pins$" nor "pinctrl-[0-9]+'... Hm, dunno... You have a trailing coma in enum with functions - maybe remove it? I looked briefly between your patch and mine for sm8150 and could not find differences except that additionalProperties and coma. Best regards, Krzysztof