Message ID | 20231130083333.932862-1-wenst@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp236545vqy; Thu, 30 Nov 2023 00:34:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkDliXbJ5EoJz3fT4v3pz5ExngTmKVyKNbpaf8LQgOo69ZwPbnvmZUPJVO5+tfOAFHbG/+ X-Received: by 2002:a17:902:ce84:b0:1cf:c4d3:6db1 with SMTP id f4-20020a170902ce8400b001cfc4d36db1mr16249662plg.8.1701333251075; Thu, 30 Nov 2023 00:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701333251; cv=none; d=google.com; s=arc-20160816; b=cM10rJ1JqEcrpiGN1byLhyjC3Qh6QaGM4yqUnUjFhkG/aMzfTHTCV6/wOxtOYK3caT ePfN/Fvdtz1hltJUbOpJjRWvjo3nVeKNp+yp4Q8vSDUxah5PVYXl4wTkHVJeeeB56NpD nBfuH88Z6DOrCvv6rhb7xJSCdv99jmSaLJz76M+po0JUljZQp/URamHILpz90vpr/fHV j61/Ew+k0nzKwjGkgWj19MOnIm/i8eL1qkY3LOpgC3VHOeBDys9EsKkfo6k9+TWebnyM WcRRVzXvXiNopk5r4iRjBpk6RNI6fp0ZWPAiMSiXRiewX8PJdT03+XAr5mED4qq3iWVh PTYg== 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=EyouFVwGEYxssEwFR57NReaaTx4QlR2tWMXVmiHfDAk=; fh=B2mjw57C5T+nG/7JrW5k/kUlMRp2x9xMQKiPlETdIIE=; b=d5Ckt62Jkf5VRtqxKQJHoDzEcxwLjrAG86s8JkI1j/XeKrwUS/4tbJQ5jYRwwVmwmJ tevS6jjTpqcm4DA5cKGbAHr3uW8a/0B6IovqYRfkkghnpSIzHXLcWuxwGY5xepL0yg3Z CduInjhPeeWTDxAJ/ZHkDU9PQcMrFtZ8Sf0Zh2PmN/lM1mv3wpfvos8J1Fi3RAPDbInh 7tv5ANQZ1qY1p/HUuiLWzBWo1tWbwf3kePOt7c9j0OFpuKiNE35otU4XuU+8DqfY269g iaY+NT2oTbRZKyyQPvTOR04i4PnFeDnzlzTxlTNvfetKPce9vMDflx0BXnpZsECTFT5h S+AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Kha8WSqG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n7-20020a170902d2c700b001cfb6a76794si784660plc.397.2023.11.30.00.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 00:34:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Kha8WSqG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6F77D8029C7A; Thu, 30 Nov 2023 00:34:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344906AbjK3Ido (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Thu, 30 Nov 2023 03:33:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235001AbjK3Idk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Nov 2023 03:33:40 -0500 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6908E10E4 for <linux-kernel@vger.kernel.org>; Thu, 30 Nov 2023 00:33:43 -0800 (PST) Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6d81faeefc4so399242a34.2 for <linux-kernel@vger.kernel.org>; Thu, 30 Nov 2023 00:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701333222; x=1701938022; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EyouFVwGEYxssEwFR57NReaaTx4QlR2tWMXVmiHfDAk=; b=Kha8WSqGjKJU5KXb9t+F6TJf2pd/u3Bty0vSpBwtYQMjv+2A6JgmJId5XhTk3on/hw 5Wy8d/UAWSYg+dx/qPcXCFxjWo27CLwaf1KE6FpOJ+N4gM/idXWV4yBlm/TpqYsshFau abKsIdQdRmnuvJ+DJyRgjtc5gaoAX1bencGCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701333222; x=1701938022; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EyouFVwGEYxssEwFR57NReaaTx4QlR2tWMXVmiHfDAk=; b=JVAy3NC73b5iQPsfQIHTomqSJCzqi0xnENqMOt7Pkar9V1upV/LpS7GiUXPdAhP3ND qWgKlPWtpA1IsP7FLeYTb7RJjF8OxR+5gJ0VnJHd0oHSA6fXWF4O365IdCyCfzZlNt0H +/zr1NZdcl2RcR43emPx3VkGYYEXRWrtkLoOMbZhIZCMcNuZ/NriKrO41sPROVfqs3RJ vdx3Bd1ztr4KnlRCBMSbShn2JJz0GWYwX4SptD8bi0CqxJ3hbUSSfh634crq8Wcz4qIv oIH8s9mwf5tYaDOJrYGxV24XNF3k3pMiIJid6Py37hIIuW6gks62iIl5v5BWyXJ04uW7 sRSw== X-Gm-Message-State: AOJu0Yy5Fxe9lSUEV7QiM8iPIrmjWPGLbZN5cBXkSAxvzcso6dqq9TcU L43SkyoMv/D+79HpVSAuRsiBSQ== X-Received: by 2002:a9d:7f0c:0:b0:6ce:37a2:a93e with SMTP id j12-20020a9d7f0c000000b006ce37a2a93emr25823140otq.3.1701333222791; Thu, 30 Nov 2023 00:33:42 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:7c8f:dafd:65c3:2bcf]) by smtp.gmail.com with ESMTPSA id b8-20020a63cf48000000b005c2967852c5sm712015pgj.30.2023.11.30.00.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 00:33:42 -0800 (PST) From: Chen-Yu Tsai <wenst@chromium.org> To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Benson Leung <bleung@chromium.org>, Guenter Roeck <groeck@chromium.org> Cc: Chen-Yu Tsai <wenst@chromium.org>, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property Date: Thu, 30 Nov 2023 16:33:31 +0800 Message-ID: <20231130083333.932862-1-wenst@chromium.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 00:34:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783977214944433066 X-GMAIL-MSGID: 1783977214944433066 |
Series |
dt-bindings: mfd: cros-ec: Allow interrupts-extended property
|
|
Commit Message
Chen-Yu Tsai
Nov. 30, 2023, 8:33 a.m. UTC
"interrupts-extended" provides a more concise way of describing external
GPIO interrupts.
Allow using this instead of "interrupts" plus "interrupt-parent" for
cros-ec.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
.../devicetree/bindings/mfd/google,cros-ec.yaml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Comments
On 30/11/2023 09:33, Chen-Yu Tsai wrote: > "interrupts-extended" provides a more concise way of describing external > GPIO interrupts. > > Allow using this instead of "interrupts" plus "interrupt-parent" for > cros-ec. > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > --- > .../devicetree/bindings/mfd/google,cros-ec.yaml | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > index e1ca4f297c6d..e514eac9f4fc 100644 > --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > @@ -75,6 +75,9 @@ properties: > interrupts: > maxItems: 1 > > + interrupts-extended: > + maxItems: 1 > + I don't understand why you need it. You already have interrupts there, so this is redundant. I suggest to drop the patch or provide real rationale (which I doubt you can get :) ). Best regards, Krzysztof
On Thu, Nov 30, 2023 at 4:52 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 30/11/2023 09:33, Chen-Yu Tsai wrote: > > "interrupts-extended" provides a more concise way of describing external > > GPIO interrupts. > > > > Allow using this instead of "interrupts" plus "interrupt-parent" for > > cros-ec. > > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > > --- > > .../devicetree/bindings/mfd/google,cros-ec.yaml | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > > index e1ca4f297c6d..e514eac9f4fc 100644 > > --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > > +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > > @@ -75,6 +75,9 @@ properties: > > interrupts: > > maxItems: 1 > > > > + interrupts-extended: > > + maxItems: 1 > > + > > I don't understand why you need it. You already have interrupts there, > so this is redundant. I suggest to drop the patch or provide real > rationale (which I doubt you can get :) ). I'm sorry, I should've included this in the commit message. The other half of the patch gets rid of a DT validation fail when interrupts-extended is used instead of interrupts: .../arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb: ec@0: 'interrupts' is a required property from schema $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# maxItems for interrupts-extended was included for completeness. Maybe it isn't needed? But then how would the validator know how many items should there be when interrupts-extended is used Regards ChenYu
On 01/12/2023 05:37, Chen-Yu Tsai wrote: > On Thu, Nov 30, 2023 at 4:52 PM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 30/11/2023 09:33, Chen-Yu Tsai wrote: >>> "interrupts-extended" provides a more concise way of describing external >>> GPIO interrupts. >>> >>> Allow using this instead of "interrupts" plus "interrupt-parent" for >>> cros-ec. >>> >>> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> >>> --- >>> .../devicetree/bindings/mfd/google,cros-ec.yaml | 9 ++++++++- >>> 1 file changed, 8 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml >>> index e1ca4f297c6d..e514eac9f4fc 100644 >>> --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml >>> +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml >>> @@ -75,6 +75,9 @@ properties: >>> interrupts: >>> maxItems: 1 >>> >>> + interrupts-extended: >>> + maxItems: 1 >>> + >> >> I don't understand why you need it. You already have interrupts there, >> so this is redundant. I suggest to drop the patch or provide real >> rationale (which I doubt you can get :) ). > > I'm sorry, I should've included this in the commit message. > > The other half of the patch gets rid of a DT validation fail when > interrupts-extended is used instead of interrupts: > > .../arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb: ec@0: > 'interrupts' is a required property > from schema $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# > That looks either like a bug in bindings or in dtschema or in your DTS. This patch should not be needed to solve that. Best regards, Krzysztof
On Fri, Dec 01, 2023 at 09:03:09AM +0100, Krzysztof Kozlowski wrote: > On 01/12/2023 05:37, Chen-Yu Tsai wrote: > > On Thu, Nov 30, 2023 at 4:52 PM Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 30/11/2023 09:33, Chen-Yu Tsai wrote: > >>> "interrupts-extended" provides a more concise way of describing external > >>> GPIO interrupts. > >>> > >>> Allow using this instead of "interrupts" plus "interrupt-parent" for > >>> cros-ec. > >>> > >>> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > >>> --- > >>> .../devicetree/bindings/mfd/google,cros-ec.yaml | 9 ++++++++- > >>> 1 file changed, 8 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > >>> index e1ca4f297c6d..e514eac9f4fc 100644 > >>> --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > >>> +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml > >>> @@ -75,6 +75,9 @@ properties: > >>> interrupts: > >>> maxItems: 1 > >>> > >>> + interrupts-extended: > >>> + maxItems: 1 > >>> + > >> > >> I don't understand why you need it. You already have interrupts there, > >> so this is redundant. I suggest to drop the patch or provide real > >> rationale (which I doubt you can get :) ). > > > > I'm sorry, I should've included this in the commit message. > > > > The other half of the patch gets rid of a DT validation fail when > > interrupts-extended is used instead of interrupts: > > > > .../arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb: ec@0: > > 'interrupts' is a required property > > from schema $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# > > > > That looks either like a bug in bindings or in dtschema or in your DTS. > This patch should not be needed to solve that. I'll be commiting a dtschema fix soon. There's quite a few places needing the fixup. Rob
diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index e1ca4f297c6d..e514eac9f4fc 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -75,6 +75,9 @@ properties: interrupts: maxItems: 1 + interrupts-extended: + maxItems: 1 + reset-gpios: maxItems: 1 @@ -199,9 +202,13 @@ allOf: - google,cros-ec-rpmsg - google,cros-ec-uart then: + oneOf: + - required: + - interrupts + - required: + - interrupts-extended required: - reg - - interrupts - if: properties: