AnsweredAssumed Answered

Use LCD pin for GPIO in iMX28

Question asked by Emanuele Coli on Jan 16, 2013
Latest reply on Jan 22, 2013 by Emanuele Coli

I'm newbie in iMX28 Linux programming. I use a LCD display with color depth 18bit. So I have 4 pins unused who I want use they like GPIO pins (from LCD_D08 to LDC_D11).

In mx28evk_pins.c I configured these pins in this manner (struct pin_desc):


.name = "nyname",

.id = PINID_LCD_D08,

.fun = PIN_GPIO,

.voltage = PAD_£_£V,

.output = 0,



and I call the function


and before I export these pins:

gpio_export(MXS_PIN_TO_GPIO(PINID_LCD_D08), false);


When Linux starts I see this error message for each pin:


WARNING: at drivers/gpio/gpiolib.c:103 gpio_ensure_requested+0x58/0x120()

autorequest GPIO-40

Modules linked in:


[<c0032468>] (dump_backtrace+0x0/0x114) from [<c039930c>] (dump_stack+0x18/0x1c)

r7:00000009 r6:00000067 r5:c0222300 r4:c7c27ee8

[<c03992f4>] (dump_stack+0x0/0x1c) from [<c004a448>] (warn_slowpath_common+0x54/0x6c)

[<c004a3f4>] (warn_slowpath_common+0x0/0x6c) from [<c004a504>] (warn_slowpath_fmt+0x38/0x40)

r9:00000000 r8:00000000 r7:00000000 r6:00000028 r5:c04c09b0


[<c004a4cc>] (warn_slowpath_fmt+0x0/0x40) from [<c0222300>] (gpio_ensure_requested+0x58/0x120)

r3:00000028 r2:c0469f60

[<c02222a8>] (gpio_ensure_requested+0x0/0x120) from [<c02226cc>] (gpio_direction_input+0x8c/0x154)

r7:c051c080 r6:00000008 r5:60000013 r4:c04c09b0

[<c0222640>] (gpio_direction_input+0x0/0x154) from [<c000e6d4>] (mx28evk_init_pin_group+0xfc/0x114)

r9:00000000 r8:00000000 r7:00000000 r6:c04c0818 r5:c04c0818


[<c000e5d8>] (mx28evk_init_pin_group+0x0/0x114) from [<c000e778>] (mx28evk_pins_init+0x8c/0x188)

[<c000e6ec>] (mx28evk_pins_init+0x0/0x188) from [<c000e4e4>] (mx28evk_init_machine+0x24/0xac)

[<c000e4c0>] (mx28evk_init_machine+0x0/0xac) from [<c000b5c4>] (customize_machine+0x20/0x2c)

[<c000b5a4>] (customize_machine+0x0/0x2c) from [<c002e3ac>] (do_one_initcall+0x64/0x1cc)

[<c002e348>] (do_one_initcall+0x0/0x1cc) from [<c0008484>] (kernel_init+0xb4/0x170)

r9:00000000 r8:00000000 r7:00000013 r6:c004de48 r5:c0027e1c


[<c00083d0>] (kernel_init+0x0/0x170) from [<c004de48>] (do_exit+0x0/0x6dc)

r5:c00083d0 r4:00000000

---[ end trace 1b75b31a2719ed1c ]---

Is it possible to use these pins as GPIO? Do I change boot stream configuration (for example because there are some register one time writable)?