Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3347b7a authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Simon Horman
Browse files

ARM: shmobile: ag5evm: Use gpio_request_one()



Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 42dd581b
Loading
Loading
Loading
Loading
+8 −14
Original line number Original line Diff line number Diff line
@@ -479,11 +479,10 @@ static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
	static int power_gpio = -EINVAL;
	static int power_gpio = -EINVAL;


	if (power_gpio < 0) {
	if (power_gpio < 0) {
		int ret = gpio_request(GPIO_PORT114, "sdhi1_power");
		int ret = gpio_request_one(GPIO_PORT114, GPIOF_OUT_INIT_LOW,
		if (!ret) {
					   "sdhi1_power");
		if (!ret)
			power_gpio = GPIO_PORT114;
			power_gpio = GPIO_PORT114;
			gpio_direction_output(power_gpio, 0);
		}
	}
	}


	/*
	/*
@@ -604,14 +603,11 @@ static void __init ag5evm_init(void)
	gpio_request(GPIO_FN_MMCD0_5_PU, NULL);
	gpio_request(GPIO_FN_MMCD0_5_PU, NULL);
	gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
	gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
	gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
	gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
	gpio_request(GPIO_PORT208, NULL); /* Reset */
	gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */
	gpio_direction_output(GPIO_PORT208, 1);


	/* enable SMSC911X */
	/* enable SMSC911X */
	gpio_request(GPIO_PORT144, NULL); /* PINTA2 */
	gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */
	gpio_direction_input(GPIO_PORT144);
	gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */
	gpio_request(GPIO_PORT145, NULL); /* RESET */
	gpio_direction_output(GPIO_PORT145, 1);


	/* FSI A */
	/* FSI A */
	gpio_request(GPIO_FN_FSIACK, NULL);
	gpio_request(GPIO_FN_FSIACK, NULL);
@@ -626,15 +622,13 @@ static void __init ag5evm_init(void)
	gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
	gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);


	/* LCD panel */
	/* LCD panel */
	gpio_request(GPIO_PORT217, NULL); /* RESET */
	gpio_request_one(GPIO_PORT217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */
	gpio_direction_output(GPIO_PORT217, 0);
	mdelay(1);
	mdelay(1);
	gpio_set_value(GPIO_PORT217, 1);
	gpio_set_value(GPIO_PORT217, 1);
	mdelay(100);
	mdelay(100);


	/* LCD backlight controller */
	/* LCD backlight controller */
	gpio_request(GPIO_PORT235, NULL); /* RESET */
	gpio_request_one(GPIO_PORT235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */
	gpio_direction_output(GPIO_PORT235, 0);
	lcd_backlight_set_brightness(0);
	lcd_backlight_set_brightness(0);


	/* enable SDHI0 on CN15 [SD I/F] */
	/* enable SDHI0 on CN15 [SD I/F] */