diff options
-rw-r--r-- | firmware/export/mc13783.h | 7 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/gpio-target.h | 5 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/mc13783-target.h | 9 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gpio-imx31.h | 9 |
4 files changed, 23 insertions, 7 deletions
diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h index d427830786..83edd31904 100644 --- a/firmware/export/mc13783.h +++ b/firmware/export/mc13783.h | |||
@@ -1067,7 +1067,7 @@ enum mc13783_regs_enum | |||
1067 | #define MC13783_ICHRG_1064MA (0xc << 3) /* 967 1064 1170 */ | 1067 | #define MC13783_ICHRG_1064MA (0xc << 3) /* 967 1064 1170 */ |
1068 | #define MC13783_ICHRG_1152MA (0xd << 3) /* 1048 1152 1268 */ | 1068 | #define MC13783_ICHRG_1152MA (0xd << 3) /* 1048 1152 1268 */ |
1069 | #define MC13783_ICHRG_1596MA (0xe << 3) /* 1450 1596 1755 */ | 1069 | #define MC13783_ICHRG_1596MA (0xe << 3) /* 1450 1596 1755 */ |
1070 | #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */ | 1070 | #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */ |
1071 | #define MC13783_ICHRGTR (0x7 << 7) /* Min Nom Max */ | 1071 | #define MC13783_ICHRGTR (0x7 << 7) /* Min Nom Max */ |
1072 | #define MC13783_ICHRGTR_POS (7) | 1072 | #define MC13783_ICHRGTR_POS (7) |
1073 | #define MC13783_ICHRGTR_0MA (0x0 << 7) /* 0 0 0 */ | 1073 | #define MC13783_ICHRGTR_0MA (0x0 << 7) /* 0 0 0 */ |
@@ -1340,11 +1340,12 @@ struct mc13783_event | |||
1340 | { \ | 1340 | { \ |
1341 | static const struct mc13783_event __tbl[] = { | 1341 | static const struct mc13783_event __tbl[] = { |
1342 | 1342 | ||
1343 | #define MC13783_EVENT_VECTOR_CB(__name) void MC13783_EVENT_CB_##__name(void) | ||
1344 | |||
1343 | #define MC13783_EVENT_VECTOR(__name, __sense) \ | 1345 | #define MC13783_EVENT_VECTOR(__name, __sense) \ |
1344 | { .id = MC13783_INT_ID_##__name, \ | 1346 | { .id = MC13783_INT_ID_##__name, \ |
1345 | .sense = (__sense), \ | 1347 | .sense = (__sense), \ |
1346 | .callback = ({ void MC13783_EVENT_CB_##__name(void); \ | 1348 | .callback = (MC13783_EVENT_CB_##__name) }, |
1347 | MC13783_EVENT_CB_##__name; }) }, | ||
1348 | 1349 | ||
1349 | #define MC13783_EVENT_VECTOR_TBL_END() \ | 1350 | #define MC13783_EVENT_VECTOR_TBL_END() \ |
1350 | }; \ | 1351 | }; \ |
diff --git a/firmware/target/arm/imx31/gigabeat-s/gpio-target.h b/firmware/target/arm/imx31/gigabeat-s/gpio-target.h index 543b25f244..9204e6cd9d 100644 --- a/firmware/target/arm/imx31/gigabeat-s/gpio-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/gpio-target.h | |||
@@ -28,6 +28,11 @@ | |||
28 | 28 | ||
29 | #ifdef DEFINE_GPIO_VECTOR_TABLE | 29 | #ifdef DEFINE_GPIO_VECTOR_TABLE |
30 | 30 | ||
31 | GPIO_EVENT_VECTOR_CB(GPIO1_31); | ||
32 | #if CONFIG_TUNER | ||
33 | GPIO_EVENT_VECTOR_CB(GPIO1_27); | ||
34 | #endif | ||
35 | |||
31 | GPIO_VECTOR_TBL_START() | 36 | GPIO_VECTOR_TBL_START() |
32 | /* mc13783 keeps the PRIINT high (no low pulse) if other unmasked | 37 | /* mc13783 keeps the PRIINT high (no low pulse) if other unmasked |
33 | * interrupts become active when clearing them or if a source being | 38 | * interrupts become active when clearing them or if a source being |
diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h b/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h index 4bb148e36c..e656e4e08f 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h | |||
@@ -42,6 +42,15 @@ static struct spi_node mc13783_spi = | |||
42 | 0, /* SPI clock - no wait states */ | 42 | 0, /* SPI clock - no wait states */ |
43 | }; | 43 | }; |
44 | 44 | ||
45 | MC13783_EVENT_VECTOR_CB(ADCDONE); | ||
46 | #if CONFIG_RTC | ||
47 | MC13783_EVENT_VECTOR_CB(1HZ); | ||
48 | #endif | ||
49 | MC13783_EVENT_VECTOR_CB(ONOFD1); | ||
50 | MC13783_EVENT_VECTOR_CB(SE1); | ||
51 | MC13783_EVENT_VECTOR_CB(USB); | ||
52 | MC13783_EVENT_VECTOR_CB(ONOFD2); | ||
53 | |||
45 | /* Gigabeat S definitions for static MC13783 event registration */ | 54 | /* Gigabeat S definitions for static MC13783 event registration */ |
46 | MC13783_EVENT_VECTOR_TBL_START() | 55 | MC13783_EVENT_VECTOR_TBL_START() |
47 | /* ADC conversion complete */ | 56 | /* ADC conversion complete */ |
diff --git a/firmware/target/arm/imx31/gpio-imx31.h b/firmware/target/arm/imx31/gpio-imx31.h index 86ca964f94..e02896f4c3 100644 --- a/firmware/target/arm/imx31/gpio-imx31.h +++ b/firmware/target/arm/imx31/gpio-imx31.h | |||
@@ -166,11 +166,12 @@ struct gpio_event | |||
166 | { \ | 166 | { \ |
167 | static const struct gpio_event __tbl[] = { | 167 | static const struct gpio_event __tbl[] = { |
168 | 168 | ||
169 | #define GPIO_EVENT_VECTOR_CB(__name) void __name##_EVENT_CB(void) | ||
170 | |||
169 | #define GPIO_EVENT_VECTOR(__name, __sense) \ | 171 | #define GPIO_EVENT_VECTOR(__name, __sense) \ |
170 | { .id = (__name##_ID), \ | 172 | { .id = (__name##_ID), \ |
171 | .sense = (__sense), \ | 173 | .sense = (__sense), \ |
172 | .callback = ({ void __name##_EVENT_CB(void); \ | 174 | .callback = (__name##_EVENT_CB) }, |
173 | __name##_EVENT_CB; }) }, | ||
174 | 175 | ||
175 | #define GPIO_VECTOR_TBL_END() \ | 176 | #define GPIO_VECTOR_TBL_END() \ |
176 | }; \ | 177 | }; \ |