Message ID | 20220417021633.56127-2-samuel@sholland.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Pine64 PinePhone keyboard support | expand |
On 17/04/2022 04:16, Samuel Holland wrote: (...) > +properties: > + compatible: > + const: pine64,pinephone-keyboard > + > + reg: > + const: 0x15 > + > + interrupts: > + maxItems: 1 > + > + vbat-supply: > + description: Supply for the keyboard MCU > + > + wakeup-source: true > + > + i2c-bus: Generic node names, so just "i2c". > + $ref: /schemas/i2c/i2c-controller.yaml# > + > +required: > + - compatible > + - reg > + - interrupts > + > +unevaluatedProperties: false You do not include any other schema at this level, so this should be additionalProperties:false. > + > +examples: > + - | > + #include <dt-bindings/input/input.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + keyboard@15 { > + compatible = "pine64,pinephone-keyboard"; > + reg = <0x15>; > + interrupt-parent = <&r_pio>; > + interrupts = <0 12 IRQ_TYPE_EDGE_FALLING>; /* PL12 */ > + > + i2c-bus { > + #address-cells = <1>; > + #size-cells = <0>; > + > + charger@75 { > + reg = <0x75>; > + }; > + }; > + }; > + }; Best regards, Krzysztof
On Sat, 16 Apr 2022 21:16:29 -0500, Samuel Holland wrote: > Add devicetree support for the PinePhone keyboard case, which provides a > matrix keyboard interface and a proxied I2C bus. > > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > > Changes in v2: > - Drop keymap DT properties > - Add vbat-supply property > > .../input/pine64,pinephone-keyboard.yaml | 66 +++++++++++++++++++ > 1 file changed, 66 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml: 'additionalProperties' is a required property hint: A schema without a "$ref" to another schema must define all properties and use "additionalProperties" from schema $id: http://devicetree.org/meta-schemas/base.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml: ignoring, error in schema: Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.example.dtb:0:0: /example-0/i2c/keyboard@15: failed to match any schema with compatible: ['pine64,pinephone-keyboard'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/ This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
diff --git a/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml b/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml new file mode 100644 index 000000000000..0732bd2dab9c --- /dev/null +++ b/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/pine64,pinephone-keyboard.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Pine64 PinePhone keyboard device tree bindings + +maintainers: + - Samuel Holland <samuel@sholland.org> + +description: + A keyboard accessory is available for the Pine64 PinePhone and PinePhone Pro. + It connects via I2C, providing a raw scan matrix, a flashing interface, and a + subordinate I2C bus for communication with a battery charger IC. + +properties: + compatible: + const: pine64,pinephone-keyboard + + reg: + const: 0x15 + + interrupts: + maxItems: 1 + + vbat-supply: + description: Supply for the keyboard MCU + + wakeup-source: true + + i2c-bus: + $ref: /schemas/i2c/i2c-controller.yaml# + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/input/input.h> + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + keyboard@15 { + compatible = "pine64,pinephone-keyboard"; + reg = <0x15>; + interrupt-parent = <&r_pio>; + interrupts = <0 12 IRQ_TYPE_EDGE_FALLING>; /* PL12 */ + + i2c-bus { + #address-cells = <1>; + #size-cells = <0>; + + charger@75 { + reg = <0x75>; + }; + }; + }; + };
Add devicetree support for the PinePhone keyboard case, which provides a matrix keyboard interface and a proxied I2C bus. Signed-off-by: Samuel Holland <samuel@sholland.org> --- Changes in v2: - Drop keymap DT properties - Add vbat-supply property .../input/pine64,pinephone-keyboard.yaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml