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

Commit 64f508da authored by Ben Dooks's avatar Ben Dooks
Browse files

ARM: mini2440: Move to using gpiolib API and s3c_gpio functions



Move the mach-mini2440 to using the gpiolib API for GPIOS it
directly uses, and s3c_gpio calls for configuration.

Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 9933847b
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -103,10 +103,10 @@ static void mini2440_udc_pullup(enum s3c2410_udc_cmd_e cmd)


	switch (cmd) {
	switch (cmd) {
		case S3C2410_UDC_P_ENABLE :
		case S3C2410_UDC_P_ENABLE :
			s3c2410_gpio_setpin(S3C2410_GPC(5), 1);
			gpio_set_value(S3C2410_GPC(5), 1);
			break;
			break;
		case S3C2410_UDC_P_DISABLE :
		case S3C2410_UDC_P_DISABLE :
			s3c2410_gpio_setpin(S3C2410_GPC(5), 0);
			gpio_set_value(S3C2410_GPC(5), 0);
			break;
			break;
		case S3C2410_UDC_P_RESET :
		case S3C2410_UDC_P_RESET :
			break;
			break;
@@ -636,22 +636,22 @@ static void __init mini2440_init(void)
	s3c_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND);
	s3c_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND);


	/* Turn the backlight early on */
	/* Turn the backlight early on */
	s3c2410_gpio_setpin(S3C2410_GPG(4), 1);
	WARN_ON(gpio_request(S3C2410_GPG(4), "backlight"));
	s3c_gpio_cfgpin(S3C2410_GPG(4), S3C2410_GPIO_OUTPUT);
	gpio_direction_output(S3C2410_GPG(4), 1);


	/* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */
	/* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */
	s3c2410_gpio_pullup(S3C2410_GPB(1), 0);
	s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
	s3c2410_gpio_setpin(S3C2410_GPB(1), 0);
	s3c2410_gpio_setpin(S3C2410_GPB(1), 0);
	s3c_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPIO_INPUT);
	s3c_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPIO_INPUT);


	/* Make sure the D+ pullup pin is output */
	/* Make sure the D+ pullup pin is output */
	s3c_gpio_cfgpin(S3C2410_GPC(5), S3C2410_GPIO_OUTPUT);
	WARN_ON(gpio_request(S3C2410_GPC(5), "udc pup"));
	gpio_direction_output(S3C2410_GPC(5), 0);


	/* mark the key as input, without pullups (there is one on the board) */
	/* mark the key as input, without pullups (there is one on the board) */
	for (i = 0; i < ARRAY_SIZE(mini2440_buttons); i++) {
	for (i = 0; i < ARRAY_SIZE(mini2440_buttons); i++) {
		s3c2410_gpio_pullup(mini2440_buttons[i].gpio, 0);
		s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP);
		s3c_gpio_cfgpin(mini2440_buttons[i].gpio,
		s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT);
					S3C2410_GPIO_INPUT);
	}
	}
	if (features.lcd_index != -1) {
	if (features.lcd_index != -1) {
		int li;
		int li;