[Variscite] Manage GPIO by application (libgpiod)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[Variscite] Manage GPIO by application (libgpiod)

2,712件の閲覧回数
rng-nxp
Contributor II

Hi all, 

i've a Variscite Development Kit (SOM with iMX8M Plus + Symphony Board). I followed the VariWiki guide to compile Yocto Project and flash an SD card to run the S.O. Now i would like to try to manage in my application the buttons (Home, Menu, Back) and the D10 LED (Heartbeat) on the Symphony board. I use the gpiod utility (gpiodetect+gpioinfo) to list the gpios (chips and lines) in my board. Some of them is marked as "used", and among these there are the gpios connected to the switch buttons (Home, Menu, Back) and the LED. Maybe the lines are "used" by the kernel or some modules, but i don't know how i can 'free' the line. Can someone give me any hint/suggestion? My scope is use the libgpiod to acces to the line programmatically. Do i have to do some modification to DTS files and then rebuild my Yocto?

A second issue  is about the output of gpioinfo utility. As you can see:

line 0: unnamed "Heartbeat" output active-high [used]
line 1: unnamed "Back" input active-low [used]
line 2: unnamed "Home" input active-low [used]
line 3: unnamed "Menu" input active-low [used]
.......

line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high


i can't use this utility to obtain the real hardware pin (all are "unamed"), so i haven't a relationtship between the gpiochipX+lineY and the real pin on the header board. Is there a way to get the relation between the output of gpioinfo utility and the BallSOC/HeaderBoard pin? I need this info to programmatically configure/control/monitoring the right gpiochip+line connected to some external hardware. 

Thanks in advace for yout support.

ラベル(2)
タグ(3)
0 件の賞賛
返信
2 返答(返信)

2,315件の閲覧回数
Washman
Contributor I

Same question here! How can I play around with libgpiod and the buttons/led without recompile the kernel?

0 件の賞賛
返信

2,564件の閲覧回数
Tyr314
Contributor I

I am having the exact same issue. I am very surprised that this is not obviously documented anywhere

0 件の賞賛
返信