summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/creative-zenxfi2
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-zenxfi2
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-zenxfi2')
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi2/button-zenxfi2.c14
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi2/lcd-zenxfi2.c58
2 files changed, 36 insertions, 36 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi2/button-zenxfi2.c b/firmware/target/arm/imx233/creative-zenxfi2/button-zenxfi2.c
index 0685963166..b990becf26 100644
--- a/firmware/target/arm/imx233/creative-zenxfi2/button-zenxfi2.c
+++ b/firmware/target/arm/imx233/creative-zenxfi2/button-zenxfi2.c
@@ -71,13 +71,13 @@ void button_init_device(void)
imx233_touchscreen_enable(true);
/* power button */
- imx233_pinctrl_acquire_pin(0, 11, "power");
- imx233_set_pin_function(0, 11, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(0, 11, false);
+ imx233_pinctrl_acquire(0, 11, "power");
+ imx233_pinctrl_set_function(0, 11, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(0, 11, false);
/* select button */
- imx233_pinctrl_acquire_pin(0, 14, "select");
- imx233_set_pin_function(0, 14, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(0, 14, false);
+ imx233_pinctrl_acquire(0, 14, "select");
+ imx233_pinctrl_set_function(0, 14, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(0, 14, false);
}
static int touch_to_pixels(int *val_x, int *val_y)
@@ -119,7 +119,7 @@ int button_read_device(int *data)
int res = 0;
/* B0P11: #power
* B0P14: #select */
- uint32_t mask = imx233_get_gpio_input_mask(0, 0x4800);
+ uint32_t mask = imx233_pinctrl_get_gpio_mask(0, 0x4800);
if(!(mask & 0x800))
res |= BUTTON_POWER;
if(!(mask & 0x4000))
diff --git a/firmware/target/arm/imx233/creative-zenxfi2/lcd-zenxfi2.c b/firmware/target/arm/imx233/creative-zenxfi2/lcd-zenxfi2.c
index 4f5033e3d3..0a16c995c1 100644
--- a/firmware/target/arm/imx233/creative-zenxfi2/lcd-zenxfi2.c
+++ b/firmware/target/arm/imx233/creative-zenxfi2/lcd-zenxfi2.c
@@ -45,42 +45,42 @@ static void setup_parameters(void)
static void setup_lcd_pins(bool use_lcdif)
{
- 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, 22, "lcd dotclk");
- imx233_pinctrl_acquire_pin(1, 23, "lcd enable");
- imx233_pinctrl_acquire_pin(1, 24, "lcd hsync");
- 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, 22, "lcd dotclk");
+ imx233_pinctrl_acquire(1, 23, "lcd enable");
+ imx233_pinctrl_acquire(1, 24, "lcd hsync");
+ 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, 22, PINCTRL_FUNCTION_MAIN); /* lcd_dotclk */
- imx233_set_pin_function(1, 23, PINCTRL_FUNCTION_MAIN); /* lcd_enable */
- imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_MAIN); /* lcd_hsync */
- 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, 22, PINCTRL_FUNCTION_MAIN); /* lcd_dotclk */
+ imx233_pinctrl_set_function(1, 23, PINCTRL_FUNCTION_MAIN); /* lcd_enable */
+ imx233_pinctrl_set_function(1, 24, PINCTRL_FUNCTION_MAIN); /* lcd_hsync */
+ 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, 0x3ffffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,dotclk,enable,hsync,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, 22, PINCTRL_FUNCTION_GPIO); /* lcd_dotclk */
- imx233_set_pin_function(1, 23, PINCTRL_FUNCTION_GPIO); /* lcd_enable */
- imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_GPIO); /* lcd_hsync */
- imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */
+ imx233_pinctrl_enable_gpio_mask(1, 0x3ffffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,dotclk,enable,hsync,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, 22, PINCTRL_FUNCTION_GPIO); /* lcd_dotclk */
+ imx233_pinctrl_set_function(1, 23, PINCTRL_FUNCTION_GPIO); /* lcd_enable */
+ imx233_pinctrl_set_function(1, 24, PINCTRL_FUNCTION_GPIO); /* lcd_hsync */
+ imx233_pinctrl_set_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */
}
}