AnsweredAssumed Answered

iMX28 GPIO Setup In Device Tree

Question asked by Tom Deacon on Aug 28, 2014
Latest reply on Sep 4, 2014 by Tom Deacon

Hi,

 

I have just gotten started getting my custom iMX28 board running the mainline kernel 3.14. One thing that I haven't figured out is how to setup GPIO's like I did in 2.6.35.

For example I have one GPIO that controls the power to the LCD backlight and it needs to be accessible from user space.

In 2.6.35 I simply did the following:

 

{
.name = "LCD_BACKLIGHT",
.id = PINID_SAIF1_SDATA0,
.fun = PIN_GPIO,
.data  = 1,
.output = 1,
},

 

Then using sysfs I could change the value from 1 to 0 to turn the backlight on and off.

Now my question is how do I accomplish the same thing with the device tree?

I read through the documentation in the kernel source tree but couldn't figure it out. Using regulators looked like they might be the way to go but I am not sure.

It was so simple before that I feel like I could be missing something easy.

 

Thanks in advance.

Outcomes