Skip to content

Commit

Permalink
dt-bindings: input: Convert hid-over-i2c to DT schema
Browse files Browse the repository at this point in the history
Convert the hid-over-i2c binding to DT schema format. The supplies should
probably be specific to a specific device, but it seems they are already
in use otherwise. 'wakeup-source' is added as it was not explicitly
documented.

There's a few warnings for undocumented properties 'vcc-supply' and
'reset-gpios'. Those remain as they probably should have a specific
compatible as well.

Signed-off-by: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
robherring authored and dtor committed Oct 1, 2022
1 parent 2d09ac9 commit 1d666ab
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 46 deletions.
46 changes: 0 additions & 46 deletions Documentation/devicetree/bindings/input/hid-over-i2c.txt

This file was deleted.

83 changes: 83 additions & 0 deletions Documentation/devicetree/bindings/input/hid-over-i2c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/hid-over-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: HID over I2C Devices

maintainers:
- Benjamin Tissoires <[email protected]>
- Jiri Kosina <[email protected]>

description: |+
HID over I2C provides support for various Human Interface Devices over the
I2C bus. These devices can be for example touchpads, keyboards, touch screens
or sensors.
The specification has been written by Microsoft and is currently available here:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspx
If this binding is used, the kernel module i2c-hid will handle the communication
with the device and the generic hid core layer will handle the protocol.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#

properties:
compatible:
oneOf:
- items:
- enum:
- wacom,w9013
- const: hid-over-i2c
- description: Just "hid-over-i2c" alone is allowed, but not recommended.
const: hid-over-i2c

reg:
maxItems: 1

interrupts:
maxItems: 1

hid-descr-addr:
description: HID descriptor address
$ref: /schemas/types.yaml#/definitions/uint32

post-power-on-delay-ms:
description: Time required by the device after enabling its regulators
or powering it on, before it is ready for communication.

touchscreen-inverted-x: true

touchscreen-inverted-y: true

vdd-supply:
description: 3.3V supply

vddl-supply:
description: 1.8V supply

wakeup-source: true

required:
- compatible
- reg
- interrupts

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
hid@2c {
compatible = "hid-over-i2c";
reg = <0x2c>;
hid-descr-addr = <0x0020>;
interrupts = <3 2>;
};
};
...

0 comments on commit 1d666ab

Please sign in to comment.