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 822DEC77B7A for ; Tue, 13 Jun 2023 06:49:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238415AbjFMGtD (ORCPT ); Tue, 13 Jun 2023 02:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233159AbjFMGtC (ORCPT ); Tue, 13 Jun 2023 02:49:02 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5A1E6B for ; Mon, 12 Jun 2023 23:49:00 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-977e7d6945aso924190666b.2 for ; Mon, 12 Jun 2023 23:49:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686638939; x=1689230939; 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=JByW78XRxwt99QO8bpQ4dJ/f+SnJIwQTPeLVoUbaf6E=; b=CUH5io/2NXK9bJPrQ4CKLbyiev/+CzqQvIpxpYkdcdhl8VKlJAtIAR3zbZeeDJhwUo PmPCw4FMiDLSLeHE8jfh8vP0EJlCropcNp61+eZu8GixJ/X8b24NFSe0xwlge9s9ZmPV iWDfhWMG+TROBBgM+luWc8nFxaUlrI4uhLqNL5pQ7LGr55lHcq2xrI0rLO/xCpqGEVDi IQA4F+G5QfiB1peiDeR9gVwkO/ZhOsd24gsGjdHZdcOhBKmxXVgCK39J/kNwqcXHpcSY g6pTwqiHmIi9nGLeNJniSOH2UiJ5QKC29S1YYNqGPQUNeZweulAQIazq6K1aNmMPXIIt Qy/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686638939; x=1689230939; 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=JByW78XRxwt99QO8bpQ4dJ/f+SnJIwQTPeLVoUbaf6E=; b=LgDat2xzaRdlAebeSz54yOIEPxHReOnKajTOb+iLgxZ4Sw/DduG7ROOY/QXLY5z551 OwPBBFWCnCnoUfKu0EQWDSbrzYIx0C00+Y0Mf0FsXUWf0lq6Ja7xReSE9KxRvaMdY/jS vGgpBx8gc7MLvF+VgTlfv+ThVt28qUlzuu+vNL4Qam9fgY0IfGqT0tfdhnynXtoFGv9g /4rfvrzNr11EDmm+OV9sXpErhogGC1k9UTqQm9VADcnCH27ZkszRNIIpVpIaQFCh/yaC 1vE/UZrVdtIwLZuOizBSixJdGwGWFTgPL9uvRcjz8W8F0hqx4UHi5FryypSmni1E0axA WWsg== X-Gm-Message-State: AC+VfDxYarz0pQGirMKwMBpTHAAQvwCsIHSPc1cs/6+Tespo+tNXlW77 SBgHlkxJlD9cGxQtRpxBbicCDw== X-Google-Smtp-Source: ACHHUZ5/M9JVbjysecegMnbOiZeUTZSN0jbLGBBwN5EOdmZ+O/uJf1KT064tupN6w0UPiJ5xdqKdyw== X-Received: by 2002:a17:906:dc90:b0:969:faf3:7dba with SMTP id cs16-20020a170906dc9000b00969faf37dbamr12740249ejc.52.1686638939343; Mon, 12 Jun 2023 23:48:59 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id s15-20020a170906960f00b009783791b1a1sm6211872ejx.121.2023.06.12.23.48.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 23:48:58 -0700 (PDT) Message-ID: <5064f8aa-7aff-bf51-212c-e4d7e465b36a@linaro.org> Date: Tue, 13 Jun 2023 08:48:57 +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] dt-bindings: pinctrl: qcom,pmic-mpp: Fix schema for "qcom,paired" Content-Language: en-US To: Rob Herring , Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Linus Walleij , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230418150606.1528107-1-robh@kernel.org> <9543f619-88fa-8e54-6e9a-4334750e51b4@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 09/06/2023 23:34, Rob Herring wrote: > On Fri, Apr 21, 2023 at 1:48 PM Rob Herring wrote: >> >> On Wed, Apr 19, 2023 at 2:56 PM Krzysztof Kozlowski >> wrote: >>> >>> On 18/04/2023 17:06, Rob Herring wrote: >>>> The "qcom,paired" schema is all wrong. First, it's a list rather than an >>>> object(dictionary). Second, it is missing a required type. The meta-schema >>>> normally catches this, but schemas under "$defs" was not getting checked. >>>> A fix for that is pending. >>>> >>>> Signed-off-by: Rob Herring >>>> --- >>>> Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 5 +++-- >>>> 1 file changed, 3 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml >>>> index 9412b9362328..4c3e9ff82105 100644 >>>> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml >>>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml >>>> @@ -144,8 +144,9 @@ $defs: >>>> enum: [0, 1, 2, 3, 4, 5, 6, 7] >>>> >>>> qcom,paired: >>>> - - description: >>>> - Indicates that the pin should be operating in paired mode. >>>> + type: boolean >>>> + description: >>>> + Indicates that the pin should be operating in paired mode. >>> >>> Current Linux implementation uses it as a generic pinconf param >>> pinconf_generic_params which is parsed by: >>> >>> pinconf_generic_parse_dt_config() -> parse_dt_cfg() -> >>> of_property_read_u32() >>> >>> >>> The pinctrl-spmi-mpp.c driver, using this schema, treat it as a bool, >>> but I still wonder how the code will parse bool with >>> of_property_read_u32(). Maybe it should be uint32 with value of 0 and 1? >> >> That should be an error because the length is too short so it should >> go with some default from the code. >> >> Looks like there is no user, though no property could mean keep the >> default/bootloader setting. Can you sort out which type is really >> desired here and hopefully we can get rid of the other type. It's not >> the first case of pinctrl properties with multiple types, but we don't >> really need more. > > Still an issue here. Please sort out what functionality QCom wants here. > > dtschema (main br) will now throw a warning on it. I think we can go with your patch, after double checking my previous concerns are not relevant here - driver reads it as bool just like other bool properties. Best regards, Krzysztof