summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c')
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
index 7f981b5d68..c3f1908511 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
@@ -66,10 +66,11 @@ static long mpr121_stack[DEFAULT_STACK_SIZE/sizeof(long)];
66static const char mpr121_thread_name[] = "mpr121"; 66static const char mpr121_thread_name[] = "mpr121";
67static struct event_queue mpr121_queue; 67static struct event_queue mpr121_queue;
68 68
69static void mpr121_irq_cb(int bank, int pin) 69static void mpr121_irq_cb(int bank, int pin, intptr_t user)
70{ 70{
71 (void) bank; 71 (void) bank;
72 (void) pin; 72 (void) pin;
73 (void) user;
73 /* the callback will not be fired until interrupt is enabled back so 74 /* the callback will not be fired until interrupt is enabled back so
74 * the queue will not overflow or contain multiple MPR121_INTERRUPT events */ 75 * the queue will not overflow or contain multiple MPR121_INTERRUPT events */
75 queue_post(&mpr121_queue, MPR121_INTERRUPT, 0); 76 queue_post(&mpr121_queue, MPR121_INTERRUPT, 0);
@@ -107,7 +108,7 @@ static void mpr121_thread(void)
107 if(status & 0x80) touchpad_btns |= BUTTON_PLAY; 108 if(status & 0x80) touchpad_btns |= BUTTON_PLAY;
108 } 109 }
109 /* enable interrupt */ 110 /* enable interrupt */
110 imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb); 111 imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb, 0);
111 } 112 }
112} 113}
113 114
@@ -125,7 +126,7 @@ void button_init_device(void)
125 imx233_pinctrl_acquire(0, 18, "mpr121 int"); 126 imx233_pinctrl_acquire(0, 18, "mpr121 int");
126 imx233_pinctrl_set_function(0, 18, PINCTRL_FUNCTION_GPIO); 127 imx233_pinctrl_set_function(0, 18, PINCTRL_FUNCTION_GPIO);
127 imx233_pinctrl_enable_gpio(0, 18, false); 128 imx233_pinctrl_enable_gpio(0, 18, false);
128 imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb); 129 imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb, 0);
129 /* hold button */ 130 /* hold button */
130 imx233_pinctrl_acquire(0, 4, "hold"); 131 imx233_pinctrl_acquire(0, 4, "hold");
131 imx233_pinctrl_set_function(0, 4, PINCTRL_FUNCTION_GPIO); 132 imx233_pinctrl_set_function(0, 4, PINCTRL_FUNCTION_GPIO);