diff options
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus')
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | 7 | ||||
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c index 6373038d2e..612ec39fb9 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | |||
@@ -222,10 +222,11 @@ static int touchpad_read_device(void) | |||
222 | return touchpad_btns; | 222 | return touchpad_btns; |
223 | } | 223 | } |
224 | 224 | ||
225 | static void rmi_attn_cb(int bank, int pin) | 225 | static void rmi_attn_cb(int bank, int pin, intptr_t user) |
226 | { | 226 | { |
227 | (void) bank; | 227 | (void) bank; |
228 | (void) pin; | 228 | (void) pin; |
229 | (void) user; | ||
229 | /* the callback will not be fired until interrupt is enabled back so | 230 | /* the callback will not be fired until interrupt is enabled back so |
230 | * the queue will not overflow or contain multiple RMI_INTERRUPT events */ | 231 | * the queue will not overflow or contain multiple RMI_INTERRUPT events */ |
231 | queue_post(&rmi_queue, RMI_INTERRUPT, 0); | 232 | queue_post(&rmi_queue, RMI_INTERRUPT, 0); |
@@ -271,7 +272,7 @@ static void rmi_thread(void) | |||
271 | touchpad_btns = 0; | 272 | touchpad_btns = 0; |
272 | 273 | ||
273 | /* enable interrupt */ | 274 | /* enable interrupt */ |
274 | imx233_pinctrl_setup_irq(0, 27, true, true, false, &rmi_attn_cb); | 275 | imx233_pinctrl_setup_irq(0, 27, true, true, false, &rmi_attn_cb, 0); |
275 | } | 276 | } |
276 | } | 277 | } |
277 | 278 | ||
@@ -328,7 +329,7 @@ void button_init_device(void) | |||
328 | imx233_pinctrl_acquire(0, 27, "touchpad int"); | 329 | imx233_pinctrl_acquire(0, 27, "touchpad int"); |
329 | imx233_pinctrl_set_function(0, 27, PINCTRL_FUNCTION_GPIO); | 330 | imx233_pinctrl_set_function(0, 27, PINCTRL_FUNCTION_GPIO); |
330 | imx233_pinctrl_enable_gpio(0, 27, false); | 331 | imx233_pinctrl_enable_gpio(0, 27, false); |
331 | imx233_pinctrl_setup_irq(0, 27, true, true, false, &rmi_attn_cb); | 332 | imx233_pinctrl_setup_irq(0, 27, true, true, false, &rmi_attn_cb, 0); |
332 | /* Volume down */ | 333 | /* Volume down */ |
333 | imx233_pinctrl_acquire(1, 30, "volume down"); | 334 | imx233_pinctrl_acquire(1, 30, "volume down"); |
334 | imx233_pinctrl_set_function(1, 30, PINCTRL_FUNCTION_GPIO); | 335 | imx233_pinctrl_set_function(1, 30, PINCTRL_FUNCTION_GPIO); |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c index 80c9d9149a..ba62ebf59c 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | |||
@@ -113,10 +113,11 @@ static struct semaphore rds_sema; | |||
113 | static uint32_t rds_stack[DEFAULT_STACK_SIZE / sizeof(uint32_t)]; | 113 | static uint32_t rds_stack[DEFAULT_STACK_SIZE / sizeof(uint32_t)]; |
114 | 114 | ||
115 | /* RDS GPIO interrupt handler */ | 115 | /* RDS GPIO interrupt handler */ |
116 | static void stc_rds_callback(int bank, int pin) | 116 | static void stc_rds_callback(int bank, int pin, intptr_t user) |
117 | { | 117 | { |
118 | (void) bank; | 118 | (void) bank; |
119 | (void) pin; | 119 | (void) pin; |
120 | (void) user; | ||
120 | 121 | ||
121 | semaphore_release(&rds_sema); | 122 | semaphore_release(&rds_sema); |
122 | } | 123 | } |
@@ -132,7 +133,7 @@ static void NORETURN_ATTR rds_thread(void) | |||
132 | if(si4700_rds_read_raw(rds_data) && rds_process(rds_data)) | 133 | if(si4700_rds_read_raw(rds_data) && rds_process(rds_data)) |
133 | si4700_rds_set_event(); | 134 | si4700_rds_set_event(); |
134 | /* renable callback */ | 135 | /* renable callback */ |
135 | imx233_pinctrl_setup_irq(2, 27, true, true, false, &stc_rds_callback); | 136 | imx233_pinctrl_setup_irq(2, 27, true, true, false, &stc_rds_callback, 0); |
136 | } | 137 | } |
137 | } | 138 | } |
138 | 139 | ||
@@ -145,11 +146,11 @@ void si4700_rds_powerup(bool on) | |||
145 | imx233_pinctrl_set_function(2, 27, PINCTRL_FUNCTION_GPIO); | 146 | imx233_pinctrl_set_function(2, 27, PINCTRL_FUNCTION_GPIO); |
146 | imx233_pinctrl_enable_gpio(2, 27, false); | 147 | imx233_pinctrl_enable_gpio(2, 27, false); |
147 | /* pin is set to 0 when an RDS packet has arrived */ | 148 | /* pin is set to 0 when an RDS packet has arrived */ |
148 | imx233_pinctrl_setup_irq(2, 27, true, true, false, &stc_rds_callback); | 149 | imx233_pinctrl_setup_irq(2, 27, true, true, false, &stc_rds_callback, 0); |
149 | } | 150 | } |
150 | else | 151 | else |
151 | { | 152 | { |
152 | imx233_pinctrl_setup_irq(2, 27, false, false, false, NULL); | 153 | imx233_pinctrl_setup_irq(2, 27, false, false, false, NULL, 0); |
153 | imx233_pinctrl_release(2, 27, "tuner stc/rds"); | 154 | imx233_pinctrl_release(2, 27, "tuner stc/rds"); |
154 | } | 155 | } |
155 | } | 156 | } |