From d9bdffd2102404e8ea5f71c5b88dad890984164d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 4 Mar 2009 23:27:15 -0800 Subject: Input: add driver for S1 button of rb532 Mikrotik's Routerboard 532 has two builtin buttons, from which one triggers a hardware reset. The other one is accessible through GPIO pin 1. Sadly, this pin is being multiplexed with UART0 input, so enabling it as interrupt source (as implied by the gpio-keys driver) is not possible unless UART0 has been turned off. The later one though is a rather bad idea as the Routerboard is an embedded device with only a single serial port, so it's almost always used as serial console device. This patch adds a driver based on INPUT_POLLDEV, which disables the UART and reconfigures GPIO pin 1 temporarily while reading the button state. This procedure works fine and has been tested as part of another, unpublished driver for this device. Signed-off-by: Phil Sutter Signed-off-by: Dmitry Torokhov --- drivers/input/misc/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/input/misc/Kconfig') diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 806d2e66d249..203abac1e23e 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -238,4 +238,16 @@ config INPUT_GPIO_ROTARY_ENCODER To compile this driver as a module, choose M here: the module will be called rotary_encoder. +config INPUT_RB532_BUTTON + tristate "Mikrotik Routerboard 532 button interface" + depends on MIKROTIK_RB532 + depends on GPIOLIB && GENERIC_GPIO + select INPUT_POLLDEV + help + Say Y here if you want support for the S1 button built into + Mikrotik's Routerboard 532. + + To compile this driver as a module, choose M here: the + module will be called rb532_button. + endif -- cgit v1.2.3