Skip to content

Commit 1d666ab

Browse files
robherringdtor
authored andcommitted
dt-bindings: input: Convert hid-over-i2c to DT schema
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]>
1 parent 2d09ac9 commit 1d666ab

2 files changed

Lines changed: 83 additions & 46 deletions

File tree

Documentation/devicetree/bindings/input/hid-over-i2c.txt

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/hid-over-i2c.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: HID over I2C Devices
8+
9+
maintainers:
10+
- Benjamin Tissoires <[email protected]>
11+
- Jiri Kosina <[email protected]>
12+
13+
description: |+
14+
HID over I2C provides support for various Human Interface Devices over the
15+
I2C bus. These devices can be for example touchpads, keyboards, touch screens
16+
or sensors.
17+
18+
The specification has been written by Microsoft and is currently available here:
19+
https://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspx
20+
21+
If this binding is used, the kernel module i2c-hid will handle the communication
22+
with the device and the generic hid core layer will handle the protocol.
23+
24+
allOf:
25+
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
26+
27+
properties:
28+
compatible:
29+
oneOf:
30+
- items:
31+
- enum:
32+
- wacom,w9013
33+
- const: hid-over-i2c
34+
- description: Just "hid-over-i2c" alone is allowed, but not recommended.
35+
const: hid-over-i2c
36+
37+
reg:
38+
maxItems: 1
39+
40+
interrupts:
41+
maxItems: 1
42+
43+
hid-descr-addr:
44+
description: HID descriptor address
45+
$ref: /schemas/types.yaml#/definitions/uint32
46+
47+
post-power-on-delay-ms:
48+
description: Time required by the device after enabling its regulators
49+
or powering it on, before it is ready for communication.
50+
51+
touchscreen-inverted-x: true
52+
53+
touchscreen-inverted-y: true
54+
55+
vdd-supply:
56+
description: 3.3V supply
57+
58+
vddl-supply:
59+
description: 1.8V supply
60+
61+
wakeup-source: true
62+
63+
required:
64+
- compatible
65+
- reg
66+
- interrupts
67+
68+
additionalProperties: false
69+
70+
examples:
71+
- |
72+
i2c {
73+
#address-cells = <1>;
74+
#size-cells = <0>;
75+
76+
hid@2c {
77+
compatible = "hid-over-i2c";
78+
reg = <0x2c>;
79+
hid-descr-addr = <0x0020>;
80+
interrupts = <3 2>;
81+
};
82+
};
83+
...

0 commit comments

Comments
 (0)