2 * GPIO switch definitions
4 * Copyright (C) 2006 Nokia Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
12 #define __ASM_ARCH_OMAP_GPIO_SWITCH_H
14 #include <linux/types.h>
27 #define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
28 #define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
29 #define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
30 #define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
31 #define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
33 struct omap_gpio_switch
{
39 /* Time in ms to debounce when transitioning from
40 * inactive state to active state. */
42 /* Same for transition from active to inactive state. */
45 /* notify board-specific code about state changes */
46 void (* notify
)(void *data
, int state
);
50 /* Call at init time only */
51 extern void omap_register_gpio_switches(const struct omap_gpio_switch
*tbl
,