Message ID | 1423215122-19947-2-git-send-email-hans.holmberg@intel.com |
---|---|
State | Needs Review / ACK, archived |
Headers | show |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | total: 1 errors, 0 warnings, 0 lines checked |
robh/patch-applied | success |
On Fri, Feb 06, 2015 at 09:32:01AM +0000, Hans Holmberg wrote: > This document describes the Device Tree bindings for the gpio-joy > driver. > > Signed-off-by: Hans Holmberg <hans.holmberg@intel.com> > --- > .../devicetree/bindings/input/gpio-joy.txt | 29 ++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/gpio-joy.txt > > diff --git a/Documentation/devicetree/bindings/input/gpio-joy.txt b/Documentation/devicetree/bindings/input/gpio-joy.txt > new file mode 100644 > index 0000000..ef8ad09 > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/gpio-joy.txt > @@ -0,0 +1,29 @@ > +Device-Tree bindings for input/joystick/gpio_joy.c joystick driver > + > +This driver can be used for connecting i.e. C64 and Atari joysticks. The binding should be for a class of hardware, not for a driver. Please describe the class of hardware the binding represents, and remove references to the Linux driver. > +Required properties: > + - compatible = "gpio-joy"; That does not strike me as a very informative compatible string. At the least, s/joy/joystick/. > + > + - left-gpio : gpio connected to the "left" joystick signal > + - right-gpio : gpio connected to the "right" joystick signal > + - up-gpio : gpio connected to the "up" joystick signal > + - down-gpio : gpio connected to the "down" joystick signal > + - button-gpio : gpio connected to the "button" joystick signal Only one button? Thanks, Mark. > + See OF device-tree gpio specification. > + > +Optional properties: > + - debounce-interval-ms: debounce interval in milliseconds for connected pins > + Default is 10 milliseconds > + > +Example node: > + > +joystick { > + compatible = "gpio-joy"; > + left-gpio = <&gpio 24 GPIO_ACTIVE_LOW>; > + right-gpio = <&gpio 10 GPIO_ACTIVE_LOW>; > + up-gpio = <&gpio 3 GPIO_ACTIVE_LOW>; > + down-gpio = <&gpio 27 GPIO_ACTIVE_LOW>; > + button-gpio = <&gpio 2 GPIO_ACTIVE_LOW>; > +}; > + > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> The binding should be for a class of hardware, not for a driver. Please > describe the class of hardware the binding represents, and remove > references to the Linux driver. Will do. > > > +Required properties: > > + - compatible = "gpio-joy"; > > That does not strike me as a very informative compatible string. At the least, > s/joy/joystick/. You're very right, gpio-joystick is better and as about as specific as it can be I believe. > > + > > + - left-gpio : gpio connected to the "left" joystick signal > > + - right-gpio : gpio connected to the "right" joystick signal > > + - up-gpio : gpio connected to the "up" joystick signal > > + - down-gpio : gpio connected to the "down" joystick signal > > + - button-gpio : gpio connected to the "button" joystick signal > > Only one button? Hmm, yes, but it would make more sense to have sub-nodes defining an arbitrary number of buttons instead, right? Thanks for reviewing! Hans -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/input/gpio-joy.txt b/Documentation/devicetree/bindings/input/gpio-joy.txt new file mode 100644 index 0000000..ef8ad09 --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-joy.txt @@ -0,0 +1,29 @@ +Device-Tree bindings for input/joystick/gpio_joy.c joystick driver + +This driver can be used for connecting i.e. C64 and Atari joysticks. + +Required properties: + - compatible = "gpio-joy"; + + - left-gpio : gpio connected to the "left" joystick signal + - right-gpio : gpio connected to the "right" joystick signal + - up-gpio : gpio connected to the "up" joystick signal + - down-gpio : gpio connected to the "down" joystick signal + - button-gpio : gpio connected to the "button" joystick signal + See OF device-tree gpio specification. + +Optional properties: + - debounce-interval-ms: debounce interval in milliseconds for connected pins + Default is 10 milliseconds + +Example node: + +joystick { + compatible = "gpio-joy"; + left-gpio = <&gpio 24 GPIO_ACTIVE_LOW>; + right-gpio = <&gpio 10 GPIO_ACTIVE_LOW>; + up-gpio = <&gpio 3 GPIO_ACTIVE_LOW>; + down-gpio = <&gpio 27 GPIO_ACTIVE_LOW>; + button-gpio = <&gpio 2 GPIO_ACTIVE_LOW>; +}; +
This document describes the Device Tree bindings for the gpio-joy driver. Signed-off-by: Hans Holmberg <hans.holmberg@intel.com> --- .../devicetree/bindings/input/gpio-joy.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/gpio-joy.txt