コード例 #1
0
static int mipi_lcd_power_control(struct mipi_dsim_device *dsim,
			unsigned int power)
{
	if (power) {
		/* Reset */
		gpio_request_one(EXYNOS5420_GPJ4(3),
				GPIOF_OUT_INIT_HIGH, "GPJ4");
		usleep_range(5000, 6000);
		gpio_set_value(EXYNOS5420_GPJ4(3), 0);
		usleep_range(5000, 6000);
		gpio_set_value(EXYNOS5420_GPJ4(3), 1);
		usleep_range(5000, 6000);
		gpio_free(EXYNOS5420_GPJ4(3));
		/* Power */
		gpio_request_one(EXYNOS5420_GPH0(0),
				GPIOF_OUT_INIT_HIGH, "GPH0");
		usleep_range(5000, 6000);
		gpio_free(EXYNOS5420_GPH0(0));
	} else {
		/* Reset */
		gpio_request_one(EXYNOS5420_GPJ4(3),
				GPIOF_OUT_INIT_LOW, "GPJ4");
		usleep_range(5000, 6000);
		gpio_free(EXYNOS5420_GPJ4(3));
		/* Power */
		gpio_request_one(EXYNOS5420_GPH0(0),
				GPIOF_OUT_INIT_LOW, "GPH0");
		usleep_range(5000, 6000);
		gpio_free(EXYNOS5420_GPH0(0));
	}
	return 1;
}
static void dp_lcd_set_power(struct plat_lcd_data *pd,
				unsigned int power)
{
	/* PMIC_LDO_19_EN */
	gpio_request(EXYNOS5420_GPJ3(6), "GPJ3");
	if (power)
		gpio_direction_output(EXYNOS5420_GPJ3(6), 1);

#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_request(EXYNOS5420_GPB2(0), "GPB2");
#endif

	/* LCD_EN: GPH0_1 */
	gpio_request(EXYNOS5420_GPH0(1), "GPH0");

	/* LCD_EN: GPH0_1 */
	gpio_direction_output(EXYNOS5420_GPH0(1), power);
	msleep(90);

#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_direction_output(EXYNOS5420_GPB2(0), power);

	gpio_free(EXYNOS5420_GPB2(0));
#endif

	/* PMIC_LDO_19_EN */
	if (!power)
		gpio_direction_output(EXYNOS5420_GPJ3(6), 0);

	gpio_free(EXYNOS5420_GPH0(1));
	gpio_free(EXYNOS5420_GPJ3(6));
}
コード例 #3
0
static void dp_lcd_set_power(struct plat_lcd_data *pd,
				unsigned int power)
{
	/* LCD_EN: GPH0_7 */
	gpio_request(EXYNOS5420_GPH0(7), "GPH0");

	/* LCD_EN: GPH0_7 */
	gpio_direction_output(EXYNOS5420_GPH0(7), power);

	msleep(90);

	gpio_free(EXYNOS5420_GPH0(7));
#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_request(EXYNOS5420_GPB2(0), "GPB2");

	gpio_direction_output(EXYNOS5420_GPB2(0), power);

	gpio_free(EXYNOS5420_GPB2(0));
#endif
}
コード例 #4
0
	{ EXYNOS5420_GPG1(3), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE }, /* NC */
	{ EXYNOS5420_GPG1(4), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE }, /* NC */
#endif
	{ EXYNOS5420_GPG1(5), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE },	/* NC */
#if defined(CONFIG_V1A_3G) || defined(CONFIG_V2A_3G)
	{ EXYNOS5420_GPG1(6), S5P_GPIO_PD_PREV_STATE, S5P_GPIO_PD_UPDOWN_DISABLE },/* AP_DUMP_INT */
	{ EXYNOS5420_GPG1(7), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE },	   /* ACTIVE_STATE_HSIC */
#else
	{ EXYNOS5420_GPG1(6), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE }, /* NC */
	{ EXYNOS5420_GPG1(7), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE }, /* NC */
#endif
    /* GPG 2 */
	{ EXYNOS5420_GPG2(0), S5P_GPIO_PD_PREV_STATE, S5P_GPIO_PD_UPDOWN_DISABLE }, /* M_RST_N */
	{ EXYNOS5420_GPG2(1), S5P_GPIO_PD_PREV_STATE, S5P_GPIO_PD_UPDOWN_DISABLE }, /* CORE_MODE */
    /* GPH 0 */
	{ EXYNOS5420_GPH0(0), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_UPDOWN_DISABLE }, /* HW_REV0 */
	{ EXYNOS5420_GPH0(1), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_UPDOWN_DISABLE }, /* HW_REV1 */
	{ EXYNOS5420_GPH0(2), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_UPDOWN_DISABLE }, /* HW_REV2 */
	{ EXYNOS5420_GPH0(3), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_UPDOWN_DISABLE }, /* HW_REV3 */
	{ EXYNOS5420_GPH0(4), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_UPDOWN_DISABLE }, /* FPGA_SPI_CLK */
	{ EXYNOS5420_GPH0(5), S5P_GPIO_PD_OUTPUT0, S5P_GPIO_PD_UPDOWN_DISABLE }, /* CAM_MCLK */
	{ EXYNOS5420_GPH0(6), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE }, /* FPGA_SPI_EN */
	{ EXYNOS5420_GPH0(7), S5P_GPIO_PD_OUTPUT0, S5P_GPIO_PD_UPDOWN_DISABLE }, /* VTCAM_MCLK */
    /* GPJ 4 */
	{ EXYNOS5420_GPJ4(0), S5P_GPIO_PD_PREV_STATE, S5P_GPIO_PD_UPDOWN_DISABLE }, /* CODEC_RESET */
#if defined(CONFIG_V1A_3G) || defined(CONFIG_V2A_3G)
	{ EXYNOS5420_GPJ4(1), S5P_GPIO_PD_OUTPUT1, S5P_GPIO_PD_UPDOWN_DISABLE }, /* RESET_REQ_N */
#else
	{ EXYNOS5420_GPJ4(1), S5P_GPIO_PD_INPUT, S5P_GPIO_PD_DOWN_ENABLE }, /* NC */
#endif
	{ EXYNOS5420_GPJ4(2), S5P_GPIO_PD_OUTPUT1, S5P_GPIO_PD_UPDOWN_DISABLE }, /* CRESET_B */