Blame view
include/linux/gpio_keys.h
1.63 KB
b24413180 License cleanup: ... |
1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
78a56aab1 Input: gpio-keys ... |
2 3 |
#ifndef _GPIO_KEYS_H #define _GPIO_KEYS_H |
b18db3d91 Input: gpio_keys ... |
4 |
struct device; |
542ad4f88 Input: gpio_keys ... |
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
/** * struct gpio_keys_button - configuration parameters * @code: input event code (KEY_*, SW_*) * @gpio: %-1 if this key does not support gpio * @active_low: %true indicates that button is considered * depressed when gpio is low * @desc: label that will be attached to button's gpio * @type: input event type (%EV_KEY, %EV_SW, %EV_ABS) * @wakeup: configure the button as a wake-up source * @debounce_interval: debounce ticks interval in msecs * @can_disable: %true indicates that userspace is allowed to * disable button via sysfs * @value: axis value for %EV_ABS * @irq: Irq number in case of interrupt keys */ |
78a56aab1 Input: gpio-keys ... |
20 |
struct gpio_keys_button { |
542ad4f88 Input: gpio_keys ... |
21 22 |
unsigned int code; int gpio; |
78a56aab1 Input: gpio-keys ... |
23 |
int active_low; |
92a47674f Input: gpio_keys ... |
24 |
const char *desc; |
542ad4f88 Input: gpio_keys ... |
25 26 27 |
unsigned int type; int wakeup; int debounce_interval; |
9e3af04f8 Input: gpio-keys ... |
28 |
bool can_disable; |
542ad4f88 Input: gpio_keys ... |
29 30 |
int value; unsigned int irq; |
78a56aab1 Input: gpio-keys ... |
31 |
}; |
542ad4f88 Input: gpio_keys ... |
32 33 34 35 36 37 38 39 40 41 42 |
/** * struct gpio_keys_platform_data - platform data for gpio_keys driver * @buttons: pointer to array of &gpio_keys_button structures * describing buttons attached to the device * @nbuttons: number of elements in @buttons array * @poll_interval: polling interval in msecs - for polling driver only * @rep: enable input subsystem auto repeat * @enable: platform hook for enabling the device * @disable: platform hook for disabling the device * @name: input device name */ |
78a56aab1 Input: gpio-keys ... |
43 |
struct gpio_keys_platform_data { |
0f78ba96b Input: gpio_keys_... |
44 |
const struct gpio_keys_button *buttons; |
78a56aab1 Input: gpio-keys ... |
45 |
int nbuttons; |
542ad4f88 Input: gpio_keys ... |
46 47 |
unsigned int poll_interval; unsigned int rep:1; |
173bdd746 Input: gpio_keys ... |
48 49 |
int (*enable)(struct device *dev); void (*disable)(struct device *dev); |
542ad4f88 Input: gpio_keys ... |
50 |
const char *name; |
78a56aab1 Input: gpio-keys ... |
51 52 53 |
}; #endif |