diff mbox

[v4,2.1/5(7)] OMAP1: Amstrad Delta: update board initialization code for complete modem IRQ GPIO line setup

Message ID 201004280305.49347.jkrzyszt@tis.icnet.pl (mailing list archive)
State Accepted
Commit 4fec97295f5637c1d5a9ee0f26195eb78e653119
Delegated to: Tony Lindgren
Headers show

Commit Message

Janusz Krzysztofik April 28, 2010, 1:05 a.m. UTC
None
diff mbox

Patch

--- git.orig/arch/arm/mach-omap1/board-ams-delta.c	2010-04-27 21:40:22.000000000 +0200
+++ git/arch/arm/mach-omap1/board-ams-delta.c	2010-04-27 22:34:42.000000000 +0200
@@ -263,8 +263,18 @@  static struct platform_device ams_delta_
 
 static int __init ams_delta_modem_init(void)
 {
+	int err;
+
 	omap_cfg_reg(M14_1510_GPIO2);
-	ams_delta_modem_ports[0].irq = gpio_to_irq(2);
+	ams_delta_modem_ports[0].irq =
+			gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
+
+	err = gpio_request(AMS_DELTA_GPIO_PIN_MODEM_IRQ, "modem");
+	if (err) {
+		pr_err("Couldn't request gpio pin for modem\n");
+		return err;
+	}
+	gpio_direction_input(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
 
 	ams_delta_latch2_write(
 		AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC,