static void dbguart_pinmux(int req, int id)
{
	if (req)
		stmp3xxx_request_pin_group(&dbguart_pins[id], "dbguart");
	else
		stmp3xxx_release_pin_group(&dbguart_pins[id], "dbguart");
}
static int stmp3xxxmmc_hw_init_ssp1(void)
{
	int ret;

	ret = stmp3xxx_request_pin_group(&mmc_pins, "mmc");
	if (ret)
		goto out;

	/* Configure write protect GPIO pin */
	ret = gpio_request(PINID_PWM4, "mmc wp");
	if (ret)
		goto out_wp;

	gpio_direction_input(PINID_PWM4);

	/* Configure POWER pin as gpio to drive power to MMC slot */
	ret = gpio_request(PINID_PWM3, "mmc power");
	if (ret)
		goto out_power;

	gpio_direction_output(PINID_PWM3, 0);
	mdelay(100);

	return 0;

out_power:
	gpio_free(PINID_PWM4);
out_wp:
	stmp3xxx_release_pin_group(&mmc_pins, "mmc");
out:
	return ret;
}
Beispiel #3
0
static int stmp3xxxmmc_hw_init_ssp1(void)
{
	int ret;

	ret = stmp3xxx_request_pin_group(&mmc_pins, "mmc");
	if (ret)
		goto out;

	
	ret = gpio_request(PINID_PWM4, "mmc wp");
	if (ret)
		goto out_wp;

	gpio_direction_input(PINID_PWM4);

	
	ret = gpio_request(PINID_PWM3, "mmc power");
	if (ret)
		goto out_power;

	gpio_direction_output(PINID_PWM3, 0);
	mdelay(100);

	return 0;

out_power:
	gpio_free(PINID_PWM4);
out_wp:
	stmp3xxx_release_pin_group(&mmc_pins, "mmc");
out:
	return ret;
}
int spdif_pinmux(int req)
{
	if (req)
		return stmp3xxx_request_pin_group(&spdif_pins, "spdif");
	else
		stmp3xxx_release_pin_group(&spdif_pins, "spdif");
	return 0;
}
static int gpmi_pinmux_handler(bool request)
{
	if (request)
		return stmp3xxx_request_pin_group(&gpmi_pins, "gpmi");
	else
		stmp3xxx_release_pin_group(&gpmi_pins, "gpmi");
	return 0;
}
static int appuart_pinmux(int req, int id)
{
	if (req)
		return stmp3xxx_request_pin_group(&appuart_pins[id], "appuart");
	else
		stmp3xxx_release_pin_group(&appuart_pins[id], "appuart");
	return 0;
}
static int dbguart_pinmux(int request, int id)
{
	int r = 0;

	if (request)
		r = stmp3xxx_request_pin_group(&dbguart_pins[id], "dbguart");
	else
		stmp3xxx_release_pin_group(&dbguart_pins[id], "dbguart");
	return r;
}
static int dbguart_pins_control(int id, int request)
{
	int r = 0;

	if (request)
		r = stmp3xxx_request_pin_group(&dbguart_pins[id], "debug uart");
	else
		stmp3xxx_release_pin_group(&dbguart_pins[id], "debug uart");
	return r;
}
Beispiel #9
0
static void mpulcd_init_panel_hw(void)
{
    int i;

    stmp3xxx_request_pin_group(&lcd_pins, "mpulcd_pin");

    gpio_request(PINID_LCD_ENABLE, "sdd1963");
    gpio_direction_output(PINID_LCD_ENABLE, 1);

    for(i = 0; i < sizeof(lcd_init_data); i += 2) {
    mpulcd_setup_pannel_register(lcd_init_data[i], lcd_init_data[i + 1]);
    udelay(100);
    }
}
static int init_pinmux(void)
{
	int ret = -EINVAL;

	if (cpu_is_stmp37xx())
		lcd_pins = &stmp37xx_lcd_pins;
	else if (cpu_is_stmp378x())
		lcd_pins = &stmp378x_lcd_pins;
	else
		goto out;
	ret = stmp3xxx_request_pin_group(lcd_pins, "lcd_lms430");

out:
	return ret;
}
int spdif_pinmux_request(void)
{
	return stmp3xxx_request_pin_group(&spdif_pins, "spdif");
}
Beispiel #12
0
static int init_pinmux(void)
{
	return stmp3xxx_request_pin_group(&lcd_pins, "lcd_hx8238a");
}