lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29cc62aa-2995-ea96-0e7e-242f9ddaa87e@linaro.org>
Date:   Thu, 28 Apr 2022 09:27:52 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Stephen Boyd <swboyd@...omium.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        Benson Leung <bleung@...omium.org>,
        Guenter Roeck <groeck@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        "Joseph S. Barrera III" <joebar@...omium.org>
Subject: Re: [PATCH 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches
 only compatible

On 28/04/2022 08:24, Stephen Boyd wrote:
> Quoting Krzysztof Kozlowski (2022-04-27 23:12:47)
>> 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@...nel.org>
>>> Cc: Rob Herring <robh+dt@...nel.org>
>>> Cc: <devicetree@...r.kernel.org>
>>> Cc: Benson Leung <bleung@...omium.org>
>>> Cc: Guenter Roeck <groeck@...omium.org>
>>> Cc: Douglas Anderson <dianders@...omium.org>
>>> Cc: Hsin-Yi Wang <hsinyi@...omium.org>
>>> Cc: "Joseph S. Barrera III" <joebar@...omium.org>
>>> Signed-off-by: Stephen Boyd <swboyd@...omium.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
>>
> 
> Eventually that sounds doable, but for the time being I want to merely
> add this new compatible in front of the original compatible so that
> updated DTBs still work with older kernels, i.e. the switches still get
> registered because the driver works with the original
> google,cros-ec-keyb compatible. 

The bindings here do not invalidate (break) existing DTBs. Old DTBs can
work in old way, we talk only about binding.

> Given that none of the properties are
> required for google,cros-ec-keyb it didn't seem necessary to make having
> the google,cros-ec-keyb-switches compatible deny the existence of the
> matrix-keymap properties.

Maybe I misunderstood the commit msg. Are the
"google,cros-ec-keyb-switches" devices coming with matrix keyboard or
not? I mean physically.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ