diff options
author | Tony Lindgren <tony@atomide.com> | 2009-10-20 12:40:47 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-10-20 12:40:47 -0400 |
commit | ce491cf85466c3377228c5a852ea627ec5136956 (patch) | |
tree | 3396aa3dc80ac30de662b59218d3bf788d105996 /arch/arm/plat-omap/include/plat/gpio-switch.h | |
parent | 3eff851b9dc1e84aa0822772e0be9afb0c973585 (diff) |
omap: headers: Move remaining headers from include/mach to include/plat
Move the remaining headers under plat-omap/include/mach
to plat-omap/include/plat. Also search and replace the
files using these headers to include using the right path.
This was done with:
#!/bin/bash
mach_dir_old="arch/arm/plat-omap/include/mach"
plat_dir_new="arch/arm/plat-omap/include/plat"
headers=$(cd $mach_dir_old && ls *.h)
omap_dirs="arch/arm/*omap*/ \
drivers/video/omap \
sound/soc/omap"
other_files="drivers/leds/leds-ams-delta.c \
drivers/mfd/menelaus.c \
drivers/mfd/twl4030-core.c \
drivers/mtd/nand/ams-delta.c"
for header in $headers; do
old="#include <mach\/$header"
new="#include <plat\/$header"
for dir in $omap_dirs; do
find $dir -type f -name \*.[chS] | \
xargs sed -i "s/$old/$new/"
done
find drivers/ -type f -name \*omap*.[chS] | \
xargs sed -i "s/$old/$new/"
for file in $other_files; do
sed -i "s/$old/$new/" $file
done
done
for header in $(ls $mach_dir_old/*.h); do
git mv $header $plat_dir_new/
done
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/gpio-switch.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpio-switch.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/gpio-switch.h b/arch/arm/plat-omap/include/plat/gpio-switch.h new file mode 100644 index 000000000000..10da0e07c0cf --- /dev/null +++ b/arch/arm/plat-omap/include/plat/gpio-switch.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * GPIO switch definitions | ||
3 | * | ||
4 | * Copyright (C) 2006 Nokia Corporation | ||
5 | * | ||
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. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H | ||
12 | #define __ASM_ARCH_OMAP_GPIO_SWITCH_H | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | |||
16 | /* Cover: | ||
17 | * high -> closed | ||
18 | * low -> open | ||
19 | * Connection: | ||
20 | * high -> connected | ||
21 | * low -> disconnected | ||
22 | * Activity: | ||
23 | * high -> active | ||
24 | * low -> inactive | ||
25 | * | ||
26 | */ | ||
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 | ||
32 | |||
33 | struct omap_gpio_switch { | ||
34 | const char *name; | ||
35 | s16 gpio; | ||
36 | unsigned flags:4; | ||
37 | unsigned type:4; | ||
38 | |||
39 | /* Time in ms to debounce when transitioning from | ||
40 | * inactive state to active state. */ | ||
41 | u16 debounce_rising; | ||
42 | /* Same for transition from active to inactive state. */ | ||
43 | u16 debounce_falling; | ||
44 | |||
45 | /* notify board-specific code about state changes */ | ||
46 | void (* notify)(void *data, int state); | ||
47 | void *notify_data; | ||
48 | }; | ||
49 | |||
50 | /* Call at init time only */ | ||
51 | extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl, | ||
52 | int count); | ||
53 | |||
54 | #endif | ||