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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C364C433EF for ; Thu, 4 Nov 2021 07:32:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA4F561183 for ; Thu, 4 Nov 2021 07:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbhKDHfE (ORCPT ); Thu, 4 Nov 2021 03:35:04 -0400 Received: from mx.socionext.com ([202.248.49.38]:14433 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbhKDHfE (ORCPT ); Thu, 4 Nov 2021 03:35:04 -0400 Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 04 Nov 2021 16:32:25 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id C8BA7203F6D9; Thu, 4 Nov 2021 16:32:25 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Thu, 4 Nov 2021 16:32:25 +0900 Received: from yuzu2.css.socionext.com (yuzu2 [172.31.9.57]) by iyokan2.css.socionext.com (Postfix) with ESMTP id 51CA9B62AB; Thu, 4 Nov 2021 16:32:25 +0900 (JST) Received: from [10.212.183.139] (unknown [10.212.183.139]) by yuzu2.css.socionext.com (Postfix) with ESMTP id E0ED1B6291; Thu, 4 Nov 2021 16:32:24 +0900 (JST) Subject: Re: [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration To: Rob Herring Cc: Linus Walleij , Masami Hiramatsu , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1635385599-17778-1-git-send-email-hayashi.kunihiko@socionext.com> From: Kunihiko Hayashi Message-ID: <138d4e8f-b63e-8118-2d66-23384af9cc6d@socionext.com> Date: Thu, 4 Nov 2021 16:32:24 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 2021/11/03 5:57, Rob Herring wrote: > On Thu, Oct 28, 2021 at 10:46:39AM +0900, Kunihiko Hayashi wrote: >> In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of >> pinctrl that defines pinmux and pincfg, however, there are no rules about >> that in dt-bindings. >> >> 'make dtbs_check' results an error with the following message: >> >> pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ... >> ... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+' >> >> To avoid this issue, add the rules of pinmux and pincfg in each child node >> and grandchild node. >> >> Signed-off-by: Kunihiko Hayashi >> --- >> Changes since v1: >> - Replace additionalProperties with unevaluatedProperties >> - Add additionalProperties for child and grandchild nodes >> >> .../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++- >> 1 file changed, 49 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml > b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> index a804d9bc1602..7e504e003181 100644 >> --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> @@ -26,10 +26,58 @@ properties: >> - socionext,uniphier-pxs3-pinctrl >> - socionext,uniphier-nx1-pinctrl >> >> +additionalProperties: >> + type: object >> + >> +patternProperties: >> + "^.*$": >> + if: >> + type: object >> + then: >> + allOf: > > All of the above should be: > > additionalProperties: > type: object > allOf: > ... I see. I'll rewrite it instead of "patternProperties". > >> + - $ref: pincfg-node.yaml# >> + - $ref: pinmux-node.yaml# >> + >> + properties: >> + phandle: true >> + function: true >> + groups: true >> + pins: true >> + bias-pull-up: true >> + bias-pull-down: true >> + bias-pull-pin-default: true >> + drive-strength: true >> + >> + additionalProperties: >> + type: object >> + >> + patternProperties: >> + "^.*$": >> + if: >> + type: object >> + then: >> + allOf: >> + - $ref: pincfg-node.yaml# >> + - $ref: pinmux-node.yaml# >> + >> + properties: >> + phandle: true >> + function: true >> + groups: true >> + pins: true >> + bias-pull-up: true >> + bias-pull-down: true >> + bias-pull-pin-default: true >> + drive-strength: true >> + >> + unevaluatedProperties: false >> + >> + unevaluatedProperties: false >> + >> required: >> - compatible >> >> -additionalProperties: false >> +unevaluatedProperties: false > > Drop +unevaluatedProperties. I understand that "additionalProperties" has already been used at the top level, so this "unevaluatedProperties" is unnecessary. For the same reason, "unevaluatedProperties" at the child node is also unnecessary. I think "unevaluatedProperties" at the grandchild node should be left because the grandchild node doesn't have "additionalProperties". additionalProperties: type: object allOf: ... additionalProperties: type: object allOf: ... unevaluatedProperties: false [X] [X] Thank you, --- Best Regards Kunihiko Hayashi 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40AFBC433F5 for ; Thu, 4 Nov 2021 07:34:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB6FF61166 for ; Thu, 4 Nov 2021 07:34:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DB6FF61166 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CHKP0wRinnneetPuwpT6Sj/nxM65LCjOdg8dTvVrEjA=; b=sNz1rZ5mz/ngXIgr7Sfxv8i01c w0VmluZWtPNm49FRjQmjbXWhqTSIQIG52Xx7/NzlziMvtK5km/tsD4wySU7cD0X8I0zha5NmlH8T4 TTc6z4iuSrPu9RM2ptcUJxe6gsW/Sey4sJOPhcSLgJtmYrJsHHmpJA5im3S3UKT2NWAIdJm+6SrMH 2rhyONUaMXLNsNXu2suYIbM4QqQi17253uoi8Dnmsk5gUy5ogbHODpkX739eGB9/0uP6StuYBaeJ0 OBn7pI5Cai62lVpzgvmrkh5xSDZs3j564BV/WNfWEkOVCBvjEfMfWIoE0SQO47HBmC+KLDrRDT62j yRIC0fFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1miXEn-008Cn7-3w; Thu, 04 Nov 2021 07:32:41 +0000 Received: from mx.socionext.com ([202.248.49.38]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1miXEc-008ClH-Ba for linux-arm-kernel@lists.infradead.org; Thu, 04 Nov 2021 07:32:32 +0000 Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 04 Nov 2021 16:32:25 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id C8BA7203F6D9; Thu, 4 Nov 2021 16:32:25 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Thu, 4 Nov 2021 16:32:25 +0900 Received: from yuzu2.css.socionext.com (yuzu2 [172.31.9.57]) by iyokan2.css.socionext.com (Postfix) with ESMTP id 51CA9B62AB; Thu, 4 Nov 2021 16:32:25 +0900 (JST) Received: from [10.212.183.139] (unknown [10.212.183.139]) by yuzu2.css.socionext.com (Postfix) with ESMTP id E0ED1B6291; Thu, 4 Nov 2021 16:32:24 +0900 (JST) Subject: Re: [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration To: Rob Herring Cc: Linus Walleij , Masami Hiramatsu , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1635385599-17778-1-git-send-email-hayashi.kunihiko@socionext.com> From: Kunihiko Hayashi Message-ID: <138d4e8f-b63e-8118-2d66-23384af9cc6d@socionext.com> Date: Thu, 4 Nov 2021 16:32:24 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211104_003230_597127_D2377C2E X-CRM114-Status: GOOD ( 23.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/11/03 5:57, Rob Herring wrote: > On Thu, Oct 28, 2021 at 10:46:39AM +0900, Kunihiko Hayashi wrote: >> In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of >> pinctrl that defines pinmux and pincfg, however, there are no rules about >> that in dt-bindings. >> >> 'make dtbs_check' results an error with the following message: >> >> pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ... >> ... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+' >> >> To avoid this issue, add the rules of pinmux and pincfg in each child node >> and grandchild node. >> >> Signed-off-by: Kunihiko Hayashi >> --- >> Changes since v1: >> - Replace additionalProperties with unevaluatedProperties >> - Add additionalProperties for child and grandchild nodes >> >> .../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++- >> 1 file changed, 49 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml > b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> index a804d9bc1602..7e504e003181 100644 >> --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> @@ -26,10 +26,58 @@ properties: >> - socionext,uniphier-pxs3-pinctrl >> - socionext,uniphier-nx1-pinctrl >> >> +additionalProperties: >> + type: object >> + >> +patternProperties: >> + "^.*$": >> + if: >> + type: object >> + then: >> + allOf: > > All of the above should be: > > additionalProperties: > type: object > allOf: > ... I see. I'll rewrite it instead of "patternProperties". > >> + - $ref: pincfg-node.yaml# >> + - $ref: pinmux-node.yaml# >> + >> + properties: >> + phandle: true >> + function: true >> + groups: true >> + pins: true >> + bias-pull-up: true >> + bias-pull-down: true >> + bias-pull-pin-default: true >> + drive-strength: true >> + >> + additionalProperties: >> + type: object >> + >> + patternProperties: >> + "^.*$": >> + if: >> + type: object >> + then: >> + allOf: >> + - $ref: pincfg-node.yaml# >> + - $ref: pinmux-node.yaml# >> + >> + properties: >> + phandle: true >> + function: true >> + groups: true >> + pins: true >> + bias-pull-up: true >> + bias-pull-down: true >> + bias-pull-pin-default: true >> + drive-strength: true >> + >> + unevaluatedProperties: false >> + >> + unevaluatedProperties: false >> + >> required: >> - compatible >> >> -additionalProperties: false >> +unevaluatedProperties: false > > Drop +unevaluatedProperties. I understand that "additionalProperties" has already been used at the top level, so this "unevaluatedProperties" is unnecessary. For the same reason, "unevaluatedProperties" at the child node is also unnecessary. I think "unevaluatedProperties" at the grandchild node should be left because the grandchild node doesn't have "additionalProperties". additionalProperties: type: object allOf: ... additionalProperties: type: object allOf: ... unevaluatedProperties: false [X] [X] Thank you, --- Best Regards Kunihiko Hayashi _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel