aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorDmitry Artamonow <mad_soft@inbox.ru>2009-11-27 06:22:32 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-06 11:52:58 -0500
commit729fae44dd8332cbf5b9d05a9af17a7455e165b2 (patch)
tree9b20bf77c22bb1e334cc9132074a49648ac0b098 /arch/arm/mach-sa1100
parenta53c876dc111bb7507ecef3962b9cc17eb43364b (diff)
ARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/h3100.c2
-rw-r--r--arch/arm/mach-sa1100/h3600.c16
-rw-r--r--arch/arm/mach-sa1100/h3xxx.c10
3 files changed, 22 insertions, 6 deletions
diff --git a/arch/arm/mach-sa1100/h3100.c b/arch/arm/mach-sa1100/h3100.c
index 793e68c29948..0c7cea0dc013 100644
--- a/arch/arm/mach-sa1100/h3100.c
+++ b/arch/arm/mach-sa1100/h3100.c
@@ -31,6 +31,8 @@ static void h3100_lcd_power(int enable)
31 gpio_set_value(H3100_GPIO_LCD_3V_ON, enable); 31 gpio_set_value(H3100_GPIO_LCD_3V_ON, enable);
32 gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable); 32 gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
33 gpio_free(H3XXX_EGPIO_LCD_ON); 33 gpio_free(H3XXX_EGPIO_LCD_ON);
34 } else {
35 pr_err("%s: can't request H3XXX_EGPIO_LCD_ON\n", __func__);
34 } 36 }
35} 37}
36 38
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 47587cce0000..af3b71459f8d 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -27,14 +27,22 @@
27 */ 27 */
28static void h3600_lcd_power(int enable) 28static void h3600_lcd_power(int enable)
29{ 29{
30 if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power")) 30 if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power")) {
31 pr_err("%s: can't request H3XXX_EGPIO_LCD_ON\n", __func__);
31 goto err1; 32 goto err1;
32 if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control")) 33 }
34 if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control")) {
35 pr_err("%s: can't request H3XXX_EGPIO_LCD_PCI\n", __func__);
33 goto err2; 36 goto err2;
34 if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v")) 37 }
38 if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v")) {
39 pr_err("%s: can't request H3XXX_EGPIO_LCD_5V_ON\n", __func__);
35 goto err3; 40 goto err3;
36 if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v")) 41 }
42 if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v")) {
43 pr_err("%s: can't request H3600_EGPIO_LVDD_ON\n", __func__);
37 goto err4; 44 goto err4;
45 }
38 46
39 gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable); 47 gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
40 gpio_direction_output(H3600_EGPIO_LCD_PCI, enable); 48 gpio_direction_output(H3600_EGPIO_LCD_PCI, enable);
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c
index a7a1982d8411..b0784c974c2d 100644
--- a/arch/arm/mach-sa1100/h3xxx.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -83,8 +83,10 @@ static void h3xxx_set_vpp(int vpp)
83static int h3xxx_flash_init(void) 83static int h3xxx_flash_init(void)
84{ 84{
85 int err = gpio_request(H3XXX_EGPIO_VPP_ON, "Flash Vpp"); 85 int err = gpio_request(H3XXX_EGPIO_VPP_ON, "Flash Vpp");
86 if (err) 86 if (err) {
87 pr_err("%s: can't request H3XXX_EGPIO_VPP_ON\n", __func__);
87 return err; 88 return err;
89 }
88 90
89 err = gpio_direction_output(H3XXX_EGPIO_VPP_ON, 0); 91 err = gpio_direction_output(H3XXX_EGPIO_VPP_ON, 0);
90 if (err) 92 if (err)
@@ -143,11 +145,15 @@ static u_int h3xxx_uart_get_mctrl(struct uart_port *port)
143 145
144static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate) 146static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
145{ 147{
146 if (port->mapbase == _Ser3UTCR0) 148 if (port->mapbase == _Ser3UTCR0) {
147 if (!gpio_request(H3XXX_EGPIO_RS232_ON, "RS232 transceiver")) { 149 if (!gpio_request(H3XXX_EGPIO_RS232_ON, "RS232 transceiver")) {
148 gpio_direction_output(H3XXX_EGPIO_RS232_ON, !state); 150 gpio_direction_output(H3XXX_EGPIO_RS232_ON, !state);
149 gpio_free(H3XXX_EGPIO_RS232_ON); 151 gpio_free(H3XXX_EGPIO_RS232_ON);
152 } else {
153 pr_err("%s: can't request H3XXX_EGPIO_RS232_ON\n",
154 __func__);
150 } 155 }
156 }
151} 157}
152 158
153/* 159/*