summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorDmitry Artamonow <mad_soft@inbox.ru>2009-11-27 12:22:32 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-06 16:52:58 +0000
commit729fae44dd8332cbf5b9d05a9af17a7455e165b2 (patch)
tree9b20bf77c22bb1e334cc9132074a49648ac0b098 /arch/arm
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')
-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)
gpio_set_value(H3100_GPIO_LCD_3V_ON, enable);
gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
gpio_free(H3XXX_EGPIO_LCD_ON);
+ } else {
+ pr_err("%s: can't request H3XXX_EGPIO_LCD_ON\n", __func__);
}
}
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 @@
*/
static void h3600_lcd_power(int enable)
{
- if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power"))
+ if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power")) {
+ pr_err("%s: can't request H3XXX_EGPIO_LCD_ON\n", __func__);
goto err1;
- if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control"))
+ }
+ if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control")) {
+ pr_err("%s: can't request H3XXX_EGPIO_LCD_PCI\n", __func__);
goto err2;
- if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v"))
+ }
+ if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v")) {
+ pr_err("%s: can't request H3XXX_EGPIO_LCD_5V_ON\n", __func__);
goto err3;
- if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v"))
+ }
+ if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v")) {
+ pr_err("%s: can't request H3600_EGPIO_LVDD_ON\n", __func__);
goto err4;
+ }
gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
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)
static int h3xxx_flash_init(void)
{
int err = gpio_request(H3XXX_EGPIO_VPP_ON, "Flash Vpp");
- if (err)
+ if (err) {
+ pr_err("%s: can't request H3XXX_EGPIO_VPP_ON\n", __func__);
return err;
+ }
err = gpio_direction_output(H3XXX_EGPIO_VPP_ON, 0);
if (err)
@@ -143,11 +145,15 @@ static u_int h3xxx_uart_get_mctrl(struct uart_port *port)
static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
{
- if (port->mapbase == _Ser3UTCR0)
+ if (port->mapbase == _Ser3UTCR0) {
if (!gpio_request(H3XXX_EGPIO_RS232_ON, "RS232 transceiver")) {
gpio_direction_output(H3XXX_EGPIO_RS232_ON, !state);
gpio_free(H3XXX_EGPIO_RS232_ON);
+ } else {
+ pr_err("%s: can't request H3XXX_EGPIO_RS232_ON\n",
+ __func__);
}
+ }
}
/*