Skip to contentSkip to conversation

Input: mcs_touchkey: add device tree binding document

PATCH In review Beomho Seo 2 participants 2 messages May 21, 2014

Subsystems (3)
lore
Share & tools
lore

Beomho Seo

author
#0 lore raw

PATCH 2/2 Input: mcs_touchkey: add device tree binding document

This patch add simple device tree bindings to
MELFAS MCS5000/5080 controller.

---
 .../devicetree/bindings/input/mcs-touchkey.txt     |   25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/mcs-touchkey.txt
Documentation/devicetree/bindings/input/mcs-touchkey.txt new file +25 -0
new file mode 100644
index 0000000..8364799
@@ -0,0 +1,25 @@
+* mcs_touchkey MELFAS MCS5000/5080 controller
+
+Required properties:
+- compatible: must be "mcs5000_touchkey" or "mcs5080_touchkey"
+- reg : I2C address of the chip
+- interrupts: interrupt to which the chip is connected
+- key_maxval: size of keycode table
+- code: key code for this device
+
+Example:
+
+	i2c_touch_key: i2c-gpio-0 {
+	       /* ... */
+
+	       touch_key@20 {
+		       compatible = "mcs5080_touchkey";
+		       reg = <0x20>;
+		       interrupt-patrent = <gpj0>;
+		       key_maxval = <2>;
+		       linux, code = <0x0000009e
+			              0x000000a9>;
+	       };
+
+	       /* ... */
+	};
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 15 lines · Beomho Seo

This patch add simple device tree bindings to
MELFAS MCS5000/5080 controller.

---
 .../devicetree/bindings/input/mcs-touchkey.txt     |   25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/mcs-touchkey.txt
Documentation/devicetree/bindings/input/mcs-touchkey.txt new file +0 -0
new file mode 100644
index 0000000..8364799

Documentation/devicetree/bindings/input/mcs-touchkey.txt line 4

Quoted 4 lines
Documentation/devicetree/bindings/input/mcs-touchkey.txt new file +4 -0
@@ -0,0 +1,25 @@
+* mcs_touchkey MELFAS MCS5000/5080 controller
+
+Required properties:
+- compatible: must be "mcs5000_touchkey" or "mcs5080_touchkey"

NAK. These should be in "$VENDOR,$DEVICE" format (e.g. "melfas,mcs5000").

It looks like "melfas" is already used, but is undocumented. Please add it to vendor-prefixes.txt.

Documentation/devicetree/bindings/input/mcs-touchkey.txt line 7

Quoted 3 lines
Documentation/devicetree/bindings/input/mcs-touchkey.txt new file +3 -0
+- reg : I2C address of the chip
+- interrupts: interrupt to which the chip is connected
+- key_maxval: size of keycode table

Surely this is already implicit in the size of the linux,code property data?

This is superfluous and broken. Please get rid of it.

Documentation/devicetree/bindings/input/mcs-touchkey.txt line 8

Quoted 1 line
Documentation/devicetree/bindings/input/mcs-touchkey.txt new file +1 -0
+- code: key code for this device

This doesn't match the example or driver. If this is a standard property, please refer to a definition of the format.

Documentation/devicetree/bindings/input/mcs-touchkey.txt line 21

Quoted 13 lines
Documentation/devicetree/bindings/input/mcs-touchkey.txt new file +13 -0
+
+Example:
+
+	i2c_touch_key: i2c-gpio-0 {
+	       /* ... */
+
+	       touch_key@20 {
+		       compatible = "mcs5080_touchkey";
+		       reg = <0x20>;
+		       interrupt-patrent = <gpj0>;
+		       key_maxval = <2>;
+		       linux, code = <0x0000009e
+			              0x000000a9>;

Random spacing?

Please bracket individual list elements.

Cheers,
Mark.