linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] GPIO joystick driver
@ 2015-02-06  9:32 Hans Holmberg
  2015-02-06  9:32 ` [PATCH 2/2] input: gpio-joy - " Hans Holmberg
       [not found] ` <1423215122-19947-1-git-send-email-hans.holmberg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Hans Holmberg @ 2015-02-06  9:32 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA, Hans Holmberg

This series adds a driver for digital joysticks connected
via GPIOs.

Tested on Rasperry Pi and Minnowboard MAX using evtest.

The DSDT AML-code snippet below illustrates how to configure a joystick
on the Minnowboard MAX, using the new _DSD support in the kernel.


Scope (_SB)
{
        Device (JOY)
        {
            Name (_HID, "PRP0001")
            Name (_CRS, ResourceTemplate () {
               GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                  "\\_SB.GPO2", 0, ResourceConsumer) {1}
               GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                  "\\_SB.GPO2", 0, ResourceConsumer) {0}
               GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                  "\\_SB.GPO0", 0, ResourceConsumer) {95}
               GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                  "\\_SB.GPO0", 0, ResourceConsumer) {94}
               GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                  "\\_SB.GPO2", 0, ResourceConsumer) {2}
            })

            Name (_DSD, Package () {
                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                Package () {
                    Package () {"compatible", "gpio-joy"},
                    Package () {"debounce-interval-ms", 15},
                    Package () {"left-gpio",    Package () {^JOY, 0, 0, 1}},
                    Package () {"right-gpio",   Package () {^JOY, 1, 0, 1}},
                    Package () {"up-gpio",      Package () {^JOY, 2, 0, 1}},
                    Package () {"down-gpio",    Package () {^JOY, 3, 0, 1}},
                    Package () {"button-gpio",  Package () {^JOY, 4, 0, 1}},
               }
            })
        }
}

Best regards,
Hans

Hans Holmberg (2):
  Documentation: Device Tree binding information for gpio-joy driver
  input: gpio-joy - GPIO joystick driver

 .../devicetree/bindings/input/gpio-joy.txt         |  29 +++
 drivers/input/joystick/Kconfig                     |  10 +
 drivers/input/joystick/Makefile                    |   1 +
 drivers/input/joystick/gpio_joy.c                  | 208 +++++++++++++++++++++
 4 files changed, 248 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/gpio-joy.txt
 create mode 100644 drivers/input/joystick/gpio_joy.c

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-02-18  8:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06  9:32 [PATCH 0/2] GPIO joystick driver Hans Holmberg
2015-02-06  9:32 ` [PATCH 2/2] input: gpio-joy - " Hans Holmberg
     [not found]   ` <1423215122-19947-3-git-send-email-hans.holmberg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-06 11:02     ` Mark Rutland
2015-02-07  7:53       ` Holmberg, Hans
     [not found] ` <1423215122-19947-1-git-send-email-hans.holmberg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-06  9:32   ` [PATCH 1/2] Documentation: Device Tree binding information for gpio-joy driver Hans Holmberg
     [not found]     ` <1423215122-19947-2-git-send-email-hans.holmberg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-06 10:53       ` Mark Rutland
2015-02-07  7:50         ` Holmberg, Hans
2015-02-06 15:31   ` [PATCH 0/2] GPIO joystick driver Dmitry Torokhov
     [not found]     ` <1AA6C46C-36D9-4243-9DC5-254A7202D339-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-07  7:35       ` Holmberg, Hans
     [not found]         ` <4B6D6D87A8FB62428BE0A3E38461A1AB18D6AF04-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-07 20:46           ` Dmitry Torokhov
2015-02-09 10:19             ` Holmberg, Hans
2015-02-11  8:49               ` Holmberg, Hans
2015-02-11 18:06                 ` 'Dmitry Torokhov'
2015-02-18  8:42                   ` Holmberg, Hans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).