Skip to contentSkip to conversation

MIPS: Alchemy: fix DB1100 GPIO registration

PATCH New Manuel Lauss 1 participant 1 message Jan 29, 2014 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Alchemy: fix DB1100 GPIO registration

With CONFIG_GPIOLIB=y gpios need to be requested before they can be modified. Request the SD carddetect pins, and drop the SPI direction setup, as the driver does that for us anyway. This gets rid of a lot of WARN_ON()s triggered by GPIO core, and restores functionality of the touschreen controller.

---
 arch/mips/alchemy/devboards/db1000.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
arch/mips/alchemy/devboards/db1000.c +2 -5
index 11f3ad2..5483906 100644
@@ -534,13 +534,10 @@ static int __init db1000_dev_init(void)
 		s0 = AU1100_GPIO1_INT;
 		s1 = AU1100_GPIO4_INT;
 
+		gpio_request(19, "sd0_cd");
+		gpio_request(20, "sd1_cd");
 		gpio_direction_input(19);	/* sd0 cd# */
 		gpio_direction_input(20);	/* sd1 cd# */
-		gpio_direction_input(21);	/* touch pendown# */
-		gpio_direction_input(207);	/* SPI MISO */
-		gpio_direction_output(208, 0);	/* SPI MOSI */
-		gpio_direction_output(209, 1);	/* SPI SCK */
-		gpio_direction_output(210, 1);	/* SPI CS# */
 
 		/* spi_gpio on SSI0 pins */
 		pfc = __raw_readl((void __iomem *)SYS_PINFUNC);
Signature · 1 line
1.8.5.3