Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1060662rdg; Fri, 11 Aug 2023 08:30:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhFLuOGuEVb/WevjjGZQof0lYLb7k/p/CE1zTpNVoWCHR7Iv9G1cYA17XAD0AQyATaj2G3 X-Received: by 2002:a05:6512:3d0d:b0:4fe:1f27:8856 with SMTP id d13-20020a0565123d0d00b004fe1f278856mr1994360lfv.7.1691767858402; Fri, 11 Aug 2023 08:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691767858; cv=none; d=google.com; s=arc-20160816; b=DA+UGTW8X8YOz4romWGN/RRTrink5s1/i3sRsvmbvCf9rUmYUyKZB1EneeBwwWOqIH fNzxQDidmi+VS8jp9BFiH8LRFW6nPdrA3skvkehLy9gch3DG0jAcrcKaU0Eh1hi2T0Y3 IlEu1BmgeP85P/w/d/mTD6NJbo0pEFV4qKQV0jJd/w626ERZxMxTfWp0Fp2K+2QLu+Ls MHvht3jIhBweAnvDV5hwVroKumZ5AyLlO67AGamRcAMHHBOb0B+KN3bTLn1fM3xPOTbX bEdxmxRWILJ1ArJPMOXWSu+2+KN7x9q83phN042qZx+qXo98eKNxxvR9O9CfvoyuPTgL 4TLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PsH7pQpr+jS29umYVkmVUSj6L7rGZKZ/O5ikThMaFKM=; fh=ffkt2U3bMIcm1vwWqzlOT7cBccMkw4OM5Po4LceB6U8=; b=aLA85Dz1pt08DIXvSVdmHKhb5TDKqUdbLllNyy9+/Oh+5hB28pvmDWgrAMt9gvVNsA 0e037hV6IIgwvFagq2zKD/grGcap9dtydrpzPkue1rSl00npVNw9Hn8T3nA1BimvD2B1 chszmuMzmBcbWeJ8nONvE9zWM0ZOKkiDRyRBiwgx1nmV2xwmlE+SYY+70xgdO99HoJXC cGRgW8jLFN8dk5csqPcVEMOZZt7E7MNV/szYzEOndapiqtrtIDqJK27qqP2feae995uP 7fF7j3N3S2fJqHkV7wUaAEaOnmZs/Nz4PbuYmUyFhfC5uNaf7omTagPerFAbofcOIyIz Y3dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C80Js42W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020aa7d28a000000b00523caf5cea7si1171437edq.520.2023.08.11.08.30.32; Fri, 11 Aug 2023 08:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C80Js42W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235472AbjHKPK5 (ORCPT + 99 others); Fri, 11 Aug 2023 11:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbjHKPK4 (ORCPT ); Fri, 11 Aug 2023 11:10:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 501AC171F; Fri, 11 Aug 2023 08:10:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB76F636C8; Fri, 11 Aug 2023 15:10:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB5B2C433C8; Fri, 11 Aug 2023 15:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691766655; bh=6tHNIakzOZTnV2MOtkXv7C8ojWN7aUtx68pmKRMzzRc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C80Js42W/FnbCqP9zx+wVB425khcAuZo+ePYydFT3XnUBVXkKTkTYEEQPbiTD3Chs DuxqrCw5rzCcRMry/bmGEu6N6V04XWeDyVzVKzDVy+Z90LHh+RnIhrCXUPwNHYxHFh Hn4cKtxo66ri9PDrVH2kNPn+x2kqzNqst0R6656MC+FFRDUcYBQWN/oRmYJq/YZnhG 8FzR8m7Tz9lDbxd7aRr5wkLI+LGAUmJCHEgS3gljKaMeZ8Wf5dfvacadNgTEr5hSms zu9PAGzIX6ntgztRShFxr2DJ5KfOOxGeUl4FhJS8aBar9cRNEVBniHtP2nY6Wm1Zm4 lDpOg7EYcjKDA== Received: (nullmailer pid 3474643 invoked by uid 1000); Fri, 11 Aug 2023 15:10:48 -0000 Date: Fri, 11 Aug 2023 09:10:48 -0600 From: Rob Herring To: Tony Lindgren Cc: Dmitry Torokhov , Krzysztof Kozlowski , Conor Dooley , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq Message-ID: <20230811151048.GA3452914-robh@kernel.org> References: <20230811110432.3968-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230811110432.3968-1-tony@atomide.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2023 at 02:04:31PM +0300, Tony Lindgren wrote: > Allow configuring optional dedicated wakeirq that some SoCs have. > Let's use the interrupt naming "irq" and "wakeup" that we already have > in use for some drivers and subsystems like i2c. > > Signed-off-by: Tony Lindgren > --- > .../devicetree/bindings/input/gpio-keys.yaml | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml > --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml > +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml > @@ -31,7 +31,17 @@ patternProperties: > maxItems: 1 > > interrupts: > - maxItems: 1 > + description: > + Optional interrupts if different from the gpio interrupt > + maxItems: 2 > + > + interrupt-names: > + description: > + Optional interrupt names, can be used to specify a separate > + dedicated wake-up interrupt > + items: > + -const: irq > + -const: wakeup Also need a space after '-'. > > label: > description: Descriptive name of the key. > @@ -130,6 +140,9 @@ examples: > label = "GPIO Key UP"; > linux,code = <103>; > gpios = <&gpio1 0 1>; > + interrupts-extended = <&intc_wakeup 0 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "wakeup"; That's not what your schema allows. You need: minItems: 1 items: - enum: [ irq, wakeup ] - const: wakeup (repeating 'wakeup' is disallowed globally for ".*-names".) > + wakeup-source; Of course with this, a single interrupt is the wake-up source and doesn't need a name. So you could define that 'interrupt-names' is only used when there are 2 interrupts. In that case, the schema is right and the example is wrong. Rob