mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ARM: sa1100/assabet: add gpio keys support for right-hand two buttons
Add gpio keys support for the right-hand two buttons on the Assabet, which can be used to wake up the CPU after PM. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
parent
e1b0d97845
commit
17c7f4f7b4
1 changed files with 30 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/gpio/gpio-reg.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/platform_data/sa11x0-serial.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
|
@ -479,6 +480,30 @@ static struct gpiod_lookup_table assabet_cf_vcc_gpio_table = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_button assabet_keys_buttons[] = {
|
||||
{
|
||||
.gpio = 0,
|
||||
.irq = IRQ_GPIO0,
|
||||
.desc = "gpio0",
|
||||
.wakeup = 1,
|
||||
.can_disable = 1,
|
||||
.debounce_interval = 5,
|
||||
}, {
|
||||
.gpio = 1,
|
||||
.irq = IRQ_GPIO1,
|
||||
.desc = "gpio1",
|
||||
.wakeup = 1,
|
||||
.can_disable = 1,
|
||||
.debounce_interval = 5,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct gpio_keys_platform_data assabet_keys_pdata = {
|
||||
.buttons = assabet_keys_buttons,
|
||||
.nbuttons = ARRAY_SIZE(assabet_keys_buttons),
|
||||
.rep = 0,
|
||||
};
|
||||
|
||||
static void __init assabet_init(void)
|
||||
{
|
||||
/*
|
||||
|
@ -533,6 +558,11 @@ static void __init assabet_init(void)
|
|||
|
||||
}
|
||||
|
||||
platform_device_register_resndata(NULL, "gpio-keys", 0,
|
||||
NULL, 0,
|
||||
&assabet_keys_pdata,
|
||||
sizeof(assabet_keys_pdata));
|
||||
|
||||
#ifndef ASSABET_PAL_VIDEO
|
||||
sa11x0_register_lcd(&lq039q2ds54_info);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue