diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-16 19:32:21 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-17 00:29:24 +0200 |
commit | 8f351d6e212e3b726a9d9020ed8a4119bb68e77e (patch) | |
tree | d4ab979baf0c6e56b90a3df5c2ace9cfb924cc47 /firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | |
parent | 918a06a12ad633a29634f3249990ba04ce9fb00b (diff) | |
download | rockbox-8f351d6e212e3b726a9d9020ed8a4119bb68e77e.tar.gz rockbox-8f351d6e212e3b726a9d9020ed8a4119bb68e77e.zip |
imx233: enhance pinctrl irq with user pointer
Change-Id: I191704299487598a853af4df5aebbbf8a7134a34
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c')
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | 7 |
1 files changed, 4 insertions, 3 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); |