diff options
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c index cfbb7fcc4c..64d156407e 100644 --- a/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c | |||
@@ -22,18 +22,23 @@ | |||
22 | #include "system.h" | 22 | #include "system.h" |
23 | #include "gpio-imx31.h" | 23 | #include "gpio-imx31.h" |
24 | 24 | ||
25 | extern int mc13783_event(void); | 25 | /* Gigabeat S definitions for static GPIO event registration */ |
26 | 26 | ||
27 | static const struct gpio_event gpio1_events = | 27 | /* Describes single events for each GPIO1 pin */ |
28 | static const struct gpio_event gpio1_events[] = | ||
28 | { | 29 | { |
29 | .line = MC13783_GPIO_LINE, | 30 | [MC13783_EVENT_ID-GPIO1_EVENT_FIRST] = |
30 | .sense = GPIO_SENSE_RISING, | 31 | { |
31 | .callback = mc13783_event, | 32 | .mask = 1 << MC13783_GPIO_LINE, |
33 | .sense = GPIO_SENSE_RISING, | ||
34 | .callback = mc13783_event, | ||
35 | } | ||
32 | }; | 36 | }; |
33 | 37 | ||
38 | /* Describes the events attached to GPIO1 port */ | ||
34 | const struct gpio_event_list gpio1_event_list = | 39 | const struct gpio_event_list gpio1_event_list = |
35 | { | 40 | { |
36 | .priority = 7, | 41 | .ints_priority = 7, |
37 | .count = 1, | 42 | .count = ARRAYLEN(gpio1_events), |
38 | .events = &gpio1_events, | 43 | .events = gpio1_events, |
39 | }; | 44 | }; |