summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/export/mc13783.h7
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/gpio-target.h5
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/mc13783-target.h9
-rw-r--r--firmware/target/arm/imx31/gpio-imx31.h9
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
#define MC13783_ICHRG_1064MA (0xc << 3) /* 967 1064 1170 */
#define MC13783_ICHRG_1152MA (0xd << 3) /* 1048 1152 1268 */
#define MC13783_ICHRG_1596MA (0xe << 3) /* 1450 1596 1755 */
- #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */
+ #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */
#define MC13783_ICHRGTR (0x7 << 7) /* Min Nom Max */
#define MC13783_ICHRGTR_POS (7)
#define MC13783_ICHRGTR_0MA (0x0 << 7) /* 0 0 0 */
@@ -1340,11 +1340,12 @@ struct mc13783_event
{ \
static const struct mc13783_event __tbl[] = {
+#define MC13783_EVENT_VECTOR_CB(__name) void MC13783_EVENT_CB_##__name(void)
+
#define MC13783_EVENT_VECTOR(__name, __sense) \
{ .id = MC13783_INT_ID_##__name, \
.sense = (__sense), \
- .callback = ({ void MC13783_EVENT_CB_##__name(void); \
- MC13783_EVENT_CB_##__name; }) },
+ .callback = (MC13783_EVENT_CB_##__name) },
#define MC13783_EVENT_VECTOR_TBL_END() \
}; \
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 @@
#ifdef DEFINE_GPIO_VECTOR_TABLE
+GPIO_EVENT_VECTOR_CB(GPIO1_31);
+#if CONFIG_TUNER
+GPIO_EVENT_VECTOR_CB(GPIO1_27);
+#endif
+
GPIO_VECTOR_TBL_START()
/* mc13783 keeps the PRIINT high (no low pulse) if other unmasked
* 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 =
0, /* SPI clock - no wait states */
};
+MC13783_EVENT_VECTOR_CB(ADCDONE);
+#if CONFIG_RTC
+MC13783_EVENT_VECTOR_CB(1HZ);
+#endif
+MC13783_EVENT_VECTOR_CB(ONOFD1);
+MC13783_EVENT_VECTOR_CB(SE1);
+MC13783_EVENT_VECTOR_CB(USB);
+MC13783_EVENT_VECTOR_CB(ONOFD2);
+
/* Gigabeat S definitions for static MC13783 event registration */
MC13783_EVENT_VECTOR_TBL_START()
/* 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
{ \
static const struct gpio_event __tbl[] = {
+#define GPIO_EVENT_VECTOR_CB(__name) void __name##_EVENT_CB(void)
+
#define GPIO_EVENT_VECTOR(__name, __sense) \
- { .id = (__name##_ID), \
- .sense = (__sense), \
- .callback = ({ void __name##_EVENT_CB(void); \
- __name##_EVENT_CB; }) },
+ { .id = (__name##_ID), \
+ .sense = (__sense), \
+ .callback = (__name##_EVENT_CB) },
#define GPIO_VECTOR_TBL_END() \
}; \