summaryrefslogtreecommitdiffstats
path: root/include/gpio_keys.h
blob: fc548fabcd37b54847b53a85b507e24e7879fec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef _GPIO_KEYS_H
#define _GPIO_KEYS_H

#include <poller.h>
#include <kfifo.h>

struct gpio_keys_button {
	/* Configuration parameters */
	int code;

	int gpio;
	int active_low;

	/* internal */
	int previous_state;
};

struct gpio_keys_platform_data {
	struct gpio_keys_button *buttons;
	int nbuttons;

	/* optional */
	int fifo_size;

	struct kfifo *recv_fifo;
	struct poller_struct poller;
	struct console_device cdev;
};

#endif