Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2492903iob; Sat, 30 Apr 2022 10:00:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4W2UcDjVZraK1QIZFt7HhcfUSl1+bGQ55+wBKpasL1dwKC8zuCNesJNf44nvdvFvK7Oh6 X-Received: by 2002:a63:846:0:b0:39d:9a9d:1178 with SMTP id 67-20020a630846000000b0039d9a9d1178mr3711214pgi.225.1651338033573; Sat, 30 Apr 2022 10:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651338033; cv=none; d=google.com; s=arc-20160816; b=z4HTb6EmWGH0QZRzU8Gr8opBjOperA79Pci9FkF6QtktZKOqiSCmxaUJcs/7lEFDqv ehw++l5eFyUjLuJOPfGA9wQwX1LK770cLR8fW3XdxqLBYkI6IFOpPqVZoWWaDxnMtvom gnCyjrxb7sRrAWHIlBxQnsZ3kTh5urQXVWt5EVSsUIAmWA+hDxqqoLOzZaZA0S0m52kl pbBV8tAx9fcYJULE1GdOl7ZejSan1ze1ri5oNDOK/OwD2WlNKn48DYrQbmffMepuH5Si NuXsKa0Xjw1w5FNBI7Ipea88MnAPq63JeD+v0OJ1td0R4P5exySN5kPPMEh56x64ZR6z vE1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Nw+YlCrCylKax0rwrziby2pzqjnCzgXqaGAQj14/FEI=; b=L8+S+KYt07R0ho47l05X624UCQrac+Zdyyv5fGDgK3NUKmQwnOGvKs4o9x9V2//fdb jjISL+gwFPdkKRkGdk+70HXUGtD4SxsaBdGVvZ0P1YgKlkjmF7YLqRyBvn4GsN6qgBhq g//pSIyrjDURxRojY/eO9YwYK1tOqtXTjeMhR1Mx9vis4HMJWaslQQJQ4r9Ms0KhUuEi oo5HfBB3Ci7mydUsQxAKQzvXRMVDBaUMxbqWkHIbx//gqn+x6P1t05pPs1Ur+KLrOOQ5 CY/hcq+f18hupspT8ehpwl9K/XFPCf1JPR8yYCmqPtEkPB4cgnPtQQTrfF/Q8alv2qvV t2yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cmoLB6uO; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a170902e54d00b0015d06426f70si10794582plf.249.2022.04.30.10.00.15; Sat, 30 Apr 2022 10:00:33 -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=@chromium.org header.s=google header.b=cmoLB6uO; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233804AbiD2Qem (ORCPT + 99 others); Fri, 29 Apr 2022 12:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbiD2Qek (ORCPT ); Fri, 29 Apr 2022 12:34:40 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 827E1DA6E6 for ; Fri, 29 Apr 2022 09:31:21 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id r13so16449698ejd.5 for ; Fri, 29 Apr 2022 09:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Nw+YlCrCylKax0rwrziby2pzqjnCzgXqaGAQj14/FEI=; b=cmoLB6uO9PxqaqPypwrFW8YGlt7ClatqYTSlq5iyiVXxV1LWJkogwZIjIiBEj/ZTWb Ql4Q1WdT9KBNm9fCsTjjeqtBBYhwi3Ciq7STsT4lGiEvthpET6Bh4xcjHLtOuCNOTEE8 0GPKsSlrX1YwAn0zCgP4wW0NDfcPxDZpALoXA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Nw+YlCrCylKax0rwrziby2pzqjnCzgXqaGAQj14/FEI=; b=qHqdvbDL3GXoGy8FJmZc9AP0touSwWtcACfeT7mJSUdiV1Jhm8+68/aQ7hCPPhMNzS gUmXDS34s2RDX1KDo2B4iTZyvrA7AygT8NXy3SYyMAGIjE+jF6HKr85NX/TX6Fz7ShKT R1oQpMdMb86zYu/Al9ilVcXtHMe1SSitraqeQ3SRhPsVOgIXp6jk0DeZC/6T04/v+vlU 6dilZTqp39qSqlXmcOgoF147+2/neZ6edCm/9n/BeJRKNK+04oyV8z5QLrRIO+HQnAQf TAHXNi0ZRLy+Sj6JM4soiuVqUSPgW+MH0VtVWYm4od8454gvoEa2dsnLcMV9I3YNQP7o wbFw== X-Gm-Message-State: AOAM531dtdxjq6tJgWtSwZh2mF8EFr2R5CDUJky2/H/IaXtqG/a/+QSX x5RGpOa9/sIQwC0Z5wXEdqbOAHfE7o8mB1nB X-Received: by 2002:a17:906:5d04:b0:6db:7262:570e with SMTP id g4-20020a1709065d0400b006db7262570emr170209ejt.8.1651249879838; Fri, 29 Apr 2022 09:31:19 -0700 (PDT) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com. [209.85.128.52]) by smtp.gmail.com with ESMTPSA id v23-20020aa7d657000000b0042617ba639esm3143741edr.40.2022.04.29.09.31.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Apr 2022 09:31:18 -0700 (PDT) Received: by mail-wm1-f52.google.com with SMTP id 1-20020a05600c248100b00393fbf11a05so6315900wms.3 for ; Fri, 29 Apr 2022 09:31:18 -0700 (PDT) X-Received: by 2002:a05:600c:3c99:b0:392:b49c:7b79 with SMTP id bg25-20020a05600c3c9900b00392b49c7b79mr3913552wmb.199.1651249878250; Fri, 29 Apr 2022 09:31:18 -0700 (PDT) MIME-Version: 1.0 References: <20220427203026.828183-1-swboyd@chromium.org> <20220427203026.828183-2-swboyd@chromium.org> In-Reply-To: <20220427203026.828183-2-swboyd@chromium.org> From: Doug Anderson Date: Fri, 29 Apr 2022 09:31:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible To: Stephen Boyd Cc: Dmitry Torokhov , LKML , patches@lists.linux.dev, Krzysztof Kozlowski , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Benson Leung , Guenter Roeck , Hsin-Yi Wang , "Joseph S. Barrera III" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Hi, On Wed, Apr 27, 2022 at 1:30 PM Stephen Boyd wrote: > > If the device is a detachable, this device won't have a matrix keyboard > but it may have some button switches, e.g. volume buttons and power > buttons. Let's add a more specific compatible for this type of device > that indicates to the OS that there are only switches and no matrix > keyboard present. > > Cc: Krzysztof Kozlowski > Cc: Rob Herring > Cc: > Cc: Benson Leung > Cc: Guenter Roeck > Cc: Douglas Anderson > Cc: Hsin-Yi Wang > Cc: "Joseph S. Barrera III" > Signed-off-by: Stephen Boyd > --- > .../bindings/input/google,cros-ec-keyb.yaml | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml > index e8f137abb03c..edc1194d558d 100644 > --- a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml > +++ b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml > @@ -15,14 +15,20 @@ description: | > Google's ChromeOS EC Keyboard is a simple matrix keyboard > implemented on a separate EC (Embedded Controller) device. It provides > a message for reading key scans from the EC. These are then converted > - into keycodes for processing by the kernel. > + into keycodes for processing by the kernel. This device also supports > + switches/buttons like power and volume buttons. > > allOf: > - $ref: "/schemas/input/matrix-keymap.yaml#" > > properties: > compatible: > - const: google,cros-ec-keyb > + oneOf: > + - items: > + - const: google,cros-ec-keyb-switches > + - const: google,cros-ec-keyb > + - items: > + - const: google,cros-ec-keyb nit: if I come back and read this binding later I'm not sure it would be obvious which compatible I should pick. Can we give any description here that indicates that the first choice is for devices that _only_ have buttons and switches (the google,cros-ec-keyb is just for backward compatibility) and the second choice is for devices that have a physical keyboard and _also_ possibly some buttons/switches? I could also imagine people in the future being confused about whether it's allowed to specify matrix properties even for devices that don't have a matrix keyboard. It might be worth noting that it's allowed (to support old drivers that might still be matching against the google,cros-ec-keyb compatible) but not required. > google,needs-ghost-filter: > description: > @@ -50,7 +56,7 @@ examples: > - | > #include > cros-ec-keyb { > - compatible = "google,cros-ec-keyb"; > + compatible = "google,cros-ec-keyb-switches", "google,cros-ec-keyb"; Feels like we should create a second example?