linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Stephen Boyd <swboyd@chromium.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Douglas Anderson <dianders@chromium.org>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	"Joseph S. Barrera III" <joebar@chromium.org>
Subject: Re: [PATCH 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible
Date: Thu, 28 Apr 2022 08:12:47 +0200	[thread overview]
Message-ID: <9248da4f-ca04-82f0-2840-a20797c25d2a@linaro.org> (raw)
In-Reply-To: <20220427203026.828183-2-swboyd@chromium.org>

On 27/04/2022 22:30, 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 <krzk@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: <devicetree@vger.kernel.org>
> Cc: Benson Leung <bleung@chromium.org>
> Cc: Guenter Roeck <groeck@chromium.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Cc: Hsin-Yi Wang <hsinyi@chromium.org>
> Cc: "Joseph S. Barrera III" <joebar@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>  .../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
>  

In such case matrix-keymap properties are not valid, right? The
matrix-keymap should not be referenced, IOW, you need to move allOf
below "required" and add:
if:not:...then: $ref: "/schemas/input/matrix-keymap.yaml

Best regards,
Krzysztof

  reply	other threads:[~2022-04-28  6:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 20:30 [PATCH 0/2] Input: cros-ec-keyb: Better matrixless support Stephen Boyd
2022-04-27 20:30 ` [PATCH 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible Stephen Boyd
2022-04-28  6:12   ` Krzysztof Kozlowski [this message]
2022-04-28  6:24     ` Stephen Boyd
2022-04-28  7:27       ` Krzysztof Kozlowski
2022-04-28 16:01         ` Stephen Boyd
2022-04-29  6:30           ` Krzysztof Kozlowski
2022-04-29  6:31   ` Krzysztof Kozlowski
2022-04-29 16:31   ` Doug Anderson
2022-04-29 16:35     ` Krzysztof Kozlowski
2022-04-29 19:34       ` Stephen Boyd
2022-04-27 20:30 ` [PATCH 2/2] Input: cros-ec-keyb - skip keyboard registration for switches compatible Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9248da4f-ca04-82f0-2840-a20797c25d2a@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=bleung@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=groeck@chromium.org \
    --cc=hsinyi@chromium.org \
    --cc=joebar@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).