summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/creative-zenxfi3
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-05-22 22:59:06 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-05-22 23:01:03 +0200
commit3166ca80ef602116272b884c4625956011b8f6bd (patch)
tree00b6cb155b6ce90406e5f021a00fe88e84050bdd /firmware/target/arm/imx233/creative-zenxfi3
parent4126dd1c53d8768bc98729fb1f79758eee11283d (diff)
downloadrockbox-3166ca80ef602116272b884c4625956011b8f6bd.tar.gz
rockbox-3166ca80ef602116272b884c4625956011b8f6bd.tar.bz2
rockbox-3166ca80ef602116272b884c4625956011b8f6bd.zip
zenxfi3: acquire button and mpr121 interrupt pins
Change-Id: I7d002ce7fed08ee949335ef838014a6885ffaf5e
Diffstat (limited to 'firmware/target/arm/imx233/creative-zenxfi3')
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
index 174ddc217c..19816025c6 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
@@ -122,9 +122,22 @@ void button_init_device(void)
create_thread(mpr121_thread, mpr121_stack, sizeof(mpr121_stack), 0,
mpr121_thread_name IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU));
/* enable interrupt */
+ imx233_pinctrl_acquire_pin(0, 18, "mpr121 int");
imx233_set_pin_function(0, 18, PINCTRL_FUNCTION_GPIO);
imx233_enable_gpio_output(0, 18, false);
imx233_setup_pin_irq(0, 18, true, true, false, &mpr121_irq_cb);
+ /* hold button */
+ imx233_pinctrl_acquire_pin(0, 4, "hold");
+ imx233_set_pin_function(0, 4, PINCTRL_FUNCTION_GPIO);
+ imx233_enable_gpio_output(0, 4, false);
+ /* volume down button */
+ imx233_pinctrl_acquire_pin(0, 7, "volume down");
+ imx233_set_pin_function(0, 7, PINCTRL_FUNCTION_GPIO);
+ imx233_enable_gpio_output(0, 7, false);
+ /* volume up button */
+ imx233_pinctrl_acquire_pin(0, 8, "volume up");
+ imx233_set_pin_function(0, 8, PINCTRL_FUNCTION_GPIO);
+ imx233_enable_gpio_output(0, 8, false);
}
bool button_hold(void)