提交 eb906911 编写于 作者: H Haojian Zhuang 提交者: Eric Miao

[ARM] pxa: fix gpio issue in zylonite

WARNING: at drivers/gpio/gpiolib.c:83 gpio_ensure_requested+0x58/0xbc()
 autorequest GPIO-71
 Modules linked in:
 [<c0028bd0>] (unwind_backtrace+0x0/0xe8) from [<c003c328>] (warn_slowpath_common+0x48/0x78)
 [<c003c328>] (warn_slowpath_common+0x48/0x78) from [<c003c394>] (warn_slowpath_fmt+0x28/0x38)
 [<c003c394>] (warn_slowpath_fmt+0x28/0x38) from [<c0146128>] (gpio_ensure_requested+0x58/0xbc)
 [<c0146128>] (gpio_ensure_requested+0x58/0xbc) from [<c0146308>] (gpio_direction_input+0x80/0xf4)
 [<c0146308>] (gpio_direction_input+0x80/0xf4) from [<c000c668>] (zylonite_pxa300_init+0x108/0x214)
 [<c000c668>] (zylonite_pxa300_init+0x108/0x214) from [<c000c4e4>] (zylonite_init+0x8/0x84)
 [<c000c4e4>] (zylonite_init+0x8/0x84) from [<c00097cc>] (customize_machine+0x18/0x24)
 [<c00097cc>] (customize_machine+0x18/0x24) from [<c00222e0>] (do_one_initcall+0x30/0x1b0)
 [<c00222e0>] (do_one_initcall+0x30/0x1b0) from [<c00083f4>] (kernel_init+0xa4/0x11c)
 [<c00083f4>] (kernel_init+0xa4/0x11c) from [<c0023f3c>] (kernel_thread_exit+0x0/0x8)
 ---[ end trace 1b75b31a2719ed1c ]---

This issue is caused by using gpio pin without request. Add gpio_request()
into zylonite. To simplify the code, error checking is omitted since this
is being performed early.
Signed-off-by: NHaojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
上级 22fe8439
...@@ -197,10 +197,12 @@ static void __init zylonite_detect_lcd_panel(void) ...@@ -197,10 +197,12 @@ static void __init zylonite_detect_lcd_panel(void)
for (i = 0; i < NUM_LCD_DETECT_PINS; i++) { for (i = 0; i < NUM_LCD_DETECT_PINS; i++) {
id = id << 1; id = id << 1;
gpio = mfp_to_gpio(lcd_detect_pins[i]); gpio = mfp_to_gpio(lcd_detect_pins[i]);
gpio_request(gpio, "LCD_ID_PINS");
gpio_direction_input(gpio); gpio_direction_input(gpio);
if (gpio_get_value(gpio)) if (gpio_get_value(gpio))
id = id | 0x1; id = id | 0x1;
gpio_free(gpio);
} }
/* lcd id, flush out bit 1 */ /* lcd id, flush out bit 1 */
......
...@@ -176,10 +176,12 @@ static void __init zylonite_detect_lcd_panel(void) ...@@ -176,10 +176,12 @@ static void __init zylonite_detect_lcd_panel(void)
for (i = 0; i < NUM_LCD_DETECT_PINS; i++) { for (i = 0; i < NUM_LCD_DETECT_PINS; i++) {
id = id << 1; id = id << 1;
gpio = mfp_to_gpio(lcd_detect_pins[i]); gpio = mfp_to_gpio(lcd_detect_pins[i]);
gpio_request(gpio, "LCD_ID_PINS");
gpio_direction_input(gpio); gpio_direction_input(gpio);
if (gpio_get_value(gpio)) if (gpio_get_value(gpio))
id = id | 0x1; id = id | 0x1;
gpio_free(gpio);
} }
/* lcd id, flush out bit 1 */ /* lcd id, flush out bit 1 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册