summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/creative-zenxfi3
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 19:18:56 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-06-17 00:29:24 +0200
commit918a06a12ad633a29634f3249990ba04ce9fb00b (patch)
treeecaa391890d391626a5cf849d08001391926b772 /firmware/target/arm/imx233/creative-zenxfi3
parentabb7d1dcfe204da217a67235811ebb278dc8fbe1 (diff)
downloadrockbox-918a06a12ad633a29634f3249990ba04ce9fb00b.tar.gz
rockbox-918a06a12ad633a29634f3249990ba04ce9fb00b.tar.bz2
rockbox-918a06a12ad633a29634f3249990ba04ce9fb00b.zip
imx233: normalise pinctrl names
The current pinctrl functions were a mess. Normalise the functions names to make them shorter and clearer. Change-Id: Iac6ff84625ef2b7610268e3a5802dc0088de3167
Diffstat (limited to 'firmware/target/arm/imx233/creative-zenxfi3')
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/audio-zenxfi3.c18
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c32
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c46
3 files changed, 48 insertions, 48 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/audio-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/audio-zenxfi3.c
index 9394c88f2c..3ea757aedb 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/audio-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/audio-zenxfi3.c
@@ -34,15 +34,15 @@ static bool initialized = false;
static void init(void)
{
/* HP gate */
- imx233_pinctrl_acquire_pin(1, 30, "hp gate");
- imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(1, 30, true);
- imx233_set_gpio_output(1, 30, false);
+ imx233_pinctrl_acquire(1, 30, "hp gate");
+ imx233_pinctrl_set_function(1, 30, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(1, 30, true);
+ imx233_pinctrl_set_gpio(1, 30, false);
/* SPKR gate */
- imx233_pinctrl_acquire_pin(1, 22, "spkr gate");
- imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(1, 22, true);
- imx233_set_gpio_output(1, 22, false);
+ imx233_pinctrl_acquire(1, 22, "spkr gate");
+ imx233_pinctrl_set_function(1, 22, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(1, 22, true);
+ imx233_pinctrl_set_gpio(1, 22, false);
initialized = true;
}
@@ -52,7 +52,7 @@ static void select_audio_path(void)
if(!initialized)
init();
/* route audio to HP */
- imx233_set_gpio_output(1, 30, true);
+ imx233_pinctrl_set_gpio(1, 30, true);
if(input_source == AUDIO_SRC_PLAYBACK)
imx233_audioout_select_hp_input(false);
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
index 70355bc24c..7f981b5d68 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
@@ -107,7 +107,7 @@ static void mpr121_thread(void)
if(status & 0x80) touchpad_btns |= BUTTON_PLAY;
}
/* enable interrupt */
- imx233_setup_pin_irq(0, 18, true, true, false, &mpr121_irq_cb);
+ imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb);
}
}
@@ -122,28 +122,28 @@ 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);
+ imx233_pinctrl_acquire(0, 18, "mpr121 int");
+ imx233_pinctrl_set_function(0, 18, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(0, 18, false);
+ imx233_pinctrl_setup_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);
+ imx233_pinctrl_acquire(0, 4, "hold");
+ imx233_pinctrl_set_function(0, 4, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(0, 4, false);
/* volume down button */
- imx233_pinctrl_acquire_pin(2, 7, "volume down");
- imx233_set_pin_function(2, 7, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(2, 7, false);
+ imx233_pinctrl_acquire(2, 7, "volume down");
+ imx233_pinctrl_set_function(2, 7, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(2, 7, false);
/* volume up button */
- imx233_pinctrl_acquire_pin(2, 8, "volume up");
- imx233_set_pin_function(2, 8, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(2, 8, false);
+ imx233_pinctrl_acquire(2, 8, "volume up");
+ imx233_pinctrl_set_function(2, 8, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(2, 8, false);
}
bool button_hold(void)
{
/* B0P04: #hold */
- return !imx233_get_gpio_input_mask(0, 0x10);
+ return !imx233_pinctrl_get_gpio_mask(0, 0x10);
}
int button_read_device(void)
@@ -171,7 +171,7 @@ int button_read_device(void)
/* B2P07: #volume-
* B2P08: #volume+
* PSWITCH: power */
- uint32_t mask = imx233_get_gpio_input_mask(2, 0x180);
+ uint32_t mask = imx233_pinctrl_get_gpio_mask(2, 0x180);
if(!(mask & 0x80))
res |= BUTTON_VOL_DOWN;
if(!(mask & 0x100))
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c
index bc669d1a60..253f37eef6 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c
@@ -48,36 +48,36 @@ static void setup_lcd_pins(bool use_lcdif)
/* WARNING
* the B1P22 pins is used to gate the speaker! Do NOT drive
* them as lcd_dotclk and lcd_hsync or it will break audio */
- imx233_pinctrl_acquire_pin(1, 18, "lcd reset");
- imx233_pinctrl_acquire_pin(1, 19, "lcd rs");
- imx233_pinctrl_acquire_pin(1, 20, "lcd wr");
- imx233_pinctrl_acquire_pin(1, 21, "lcd cs");
- imx233_pinctrl_acquire_pin(1, 23, "lcd enable");
- imx233_pinctrl_acquire_pin(1, 25, "lcd vsync");
- imx233_pinctrl_acquire_pin_mask(1, 0x3ffff, "lcd data");
+ imx233_pinctrl_acquire(1, 18, "lcd reset");
+ imx233_pinctrl_acquire(1, 19, "lcd rs");
+ imx233_pinctrl_acquire(1, 20, "lcd wr");
+ imx233_pinctrl_acquire(1, 21, "lcd cs");
+ imx233_pinctrl_acquire(1, 23, "lcd enable");
+ imx233_pinctrl_acquire(1, 25, "lcd vsync");
+ imx233_pinctrl_acquire_mask(1, 0x3ffff, "lcd data");
if(use_lcdif)
{
- imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_MAIN); /* lcd_vsync */
- imx233_set_pin_function(1, 21, PINCTRL_FUNCTION_MAIN); /* lcd_cs */
- imx233_set_pin_function(1, 23, PINCTRL_FUNCTION_MAIN); /* lcd_enable */
- imx233_set_pin_function(1, 18, PINCTRL_FUNCTION_MAIN); /* lcd_reset */
- imx233_set_pin_function(1, 19, PINCTRL_FUNCTION_MAIN); /* lcd_rs */
- imx233_set_pin_function(1, 16, PINCTRL_FUNCTION_MAIN); /* lcd_d16 */
- imx233_set_pin_function(1, 17, PINCTRL_FUNCTION_MAIN); /* lcd_d17 */
- imx233_set_pin_function(1, 20, PINCTRL_FUNCTION_MAIN); /* lcd_wr */
+ imx233_pinctrl_set_function(1, 25, PINCTRL_FUNCTION_MAIN); /* lcd_vsync */
+ imx233_pinctrl_set_function(1, 21, PINCTRL_FUNCTION_MAIN); /* lcd_cs */
+ imx233_pinctrl_set_function(1, 23, PINCTRL_FUNCTION_MAIN); /* lcd_enable */
+ imx233_pinctrl_set_function(1, 18, PINCTRL_FUNCTION_MAIN); /* lcd_reset */
+ imx233_pinctrl_set_function(1, 19, PINCTRL_FUNCTION_MAIN); /* lcd_rs */
+ imx233_pinctrl_set_function(1, 16, PINCTRL_FUNCTION_MAIN); /* lcd_d16 */
+ imx233_pinctrl_set_function(1, 17, PINCTRL_FUNCTION_MAIN); /* lcd_d17 */
+ imx233_pinctrl_set_function(1, 20, PINCTRL_FUNCTION_MAIN); /* lcd_wr */
HW_PINCTRL_MUXSELn_CLR(2) = 0xffffffff; /* lcd_d{0-15} */
}
else
{
HW_PINCTRL_MUXSELn_SET(2) = 0xffffffff; /* lcd_d{0-15} */
- imx233_enable_gpio_output_mask(1, 0x2bfffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,enable,vsync} */
- imx233_set_pin_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */
- imx233_set_pin_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */
- imx233_set_pin_function(1, 19, PINCTRL_FUNCTION_GPIO); /* lcd_rs */
- imx233_set_pin_function(1, 20, PINCTRL_FUNCTION_GPIO); /* lcd_wr */
- imx233_set_pin_function(1, 21, PINCTRL_FUNCTION_GPIO); /* lcd_cs */
- imx233_set_pin_function(1, 23, PINCTRL_FUNCTION_GPIO); /* lcd_enable */
- imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */
+ imx233_pinctrl_enable_gpio_mask(1, 0x2bfffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,enable,vsync} */
+ imx233_pinctrl_set_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */
+ imx233_pinctrl_set_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */
+ imx233_pinctrl_set_function(1, 19, PINCTRL_FUNCTION_GPIO); /* lcd_rs */
+ imx233_pinctrl_set_function(1, 20, PINCTRL_FUNCTION_GPIO); /* lcd_wr */
+ imx233_pinctrl_set_function(1, 21, PINCTRL_FUNCTION_GPIO); /* lcd_cs */
+ imx233_pinctrl_set_function(1, 23, PINCTRL_FUNCTION_GPIO); /* lcd_enable */
+ imx233_pinctrl_set_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */
}
}