RE: [PATCH v2 03/11] dt-bindings: input: Convert da906{1,2,3} onkey to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Conor Dooley,

> Subject: Re: [PATCH v2 03/11] dt-bindings: input: Convert da906{1,2,3}
> onkey to json-schema
> 
> On Sat, Dec 02, 2023 at 07:25:27PM +0000, Biju Das wrote:
> > diff --git
> > a/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml
> > b/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml
> > new file mode 100644
> > index 000000000000..34f2e00cf045
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml
> > @@ -0,0 +1,61 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/input/dlg,da9062-onkey.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Dialog DA9061/62/63 OnKey Module
> > +
> > +maintainers:
> > +  - Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > +
> > +description: |
> > +  This module is part of the DA9061/DA9062/DA9063. For more details
> > +about entire
> > +  DA9062 and DA9061 chips see
> > +Documentation/devicetree/bindings/mfd/da9062.txt
> > +  For DA906{1,2,3} see
> > +Documentation/devicetree/bindings/mfd/dlg,da9063.yaml
> > +
> > +  This module provides the KEY_POWER event.
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - dlg,da9062-onkey
> > +              - dlg,da9063-onkey
> > +      - items:
> > +          - enum:
> > +              - dlg,da9061-onkey
> > +          - const: dlg,da9062-onkey # da9062-onkey fallback
> 
> Same comments here.

Agreed, it will be like

    oneOf:
      - items:
          - enum:
              - dlg,da9062-onkey
              - dlg,da9063-onkey
      - items:
          - const: dlg,da9061-onkey
          - const: dlg,da9062-onkey

> 
> Cheers,
> Conor.
> 
> > +  dlg,disable-key-power:
> > +    type: boolean
> > +    description:
> > +      Disable power-down using a long key-press. If this entry exists
> > +      the OnKey driver will remove support for the KEY_POWER key press
> > +      when triggered using a long press of the OnKey.
> > +
> > +required:
> > +  - compatible
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    i2c {
> > +      #address-cells = <1>;
> > +      #size-cells = <0>;
> > +      pmic@58 {
> > +        compatible = "dlg,da9063";
> > +        reg = <0x58>;
> > +        interrupt-parent = <&gpio6>;
> > +        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> > +        interrupt-controller;
> > +
> > +        onkey {
> > +          compatible = "dlg,da9063-onkey";
> > +          dlg,disable-key-power;
> > +        };
> > +      };
> > +    };

For consistency, I have updated the example similar to watchdog. Same case for thermal.

examples:
  - |
    onkey {
      compatible = "dlg,da9063-onkey";
      dlg,disable-key-power;
    };

Cheers,
Biju





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux