@@ -42,7 +42,7 @@ struct gpio_buttons_dev {
};
static void gpio_buttons_check_state(struct input_dev *input,
- struct gpio_button *button,
+ struct gpio_keys_button *button,
struct gpio_button_data *bdata)
{
int state;
@@ -71,7 +71,7 @@ static void gpio_buttons_poll(struct input_polled_dev *dev)
int i, threshold;
for (i = 0; i < bdev->pdata->nbuttons; i++) {
- struct gpio_button *button = &pdata->buttons[i];
+ struct gpio_keys_button *button = &pdata->buttons[i];
struct gpio_button_data *bdata = &bdev->data[i];
threshold = round_up(button->debounce_interval,
@@ -132,7 +132,7 @@ static int __devinit gpio_buttons_probe(struct platform_device *pdev)
input->id.version = 0x0100;
for (i = 0; i < pdata->nbuttons; i++) {
- struct gpio_button *button = &pdata->buttons[i];
+ struct gpio_keys_button *button = &pdata->buttons[i];
unsigned int gpio = button->gpio;
unsigned int type = button->type ?: EV_KEY;
@@ -15,17 +15,10 @@
#ifndef _GPIO_BUTTONS_H_
#define _GPIO_BUTTONS_H_
-struct gpio_button {
- int gpio; /* GPIO line number */
- int active_low;
- char *desc; /* button description */
- int type; /* input event type (EV_KEY, EV_SW) */
- int code; /* input event code (KEY_*, SW_*) */
- int debounce_interval; /* debounce ticks interval in msecs */
-};
+#include <linux/gpio_keys.h>
struct gpio_buttons_platform_data {
- struct gpio_button *buttons;
+ struct gpio_keys_button *buttons;
int nbuttons; /* number of buttons */
int poll_interval; /* polling interval */
};