Linux查看gpio编号

如果查询gpio编号:
cd /sys/class/gpio
ls
cd gpiochip128  //比如:gpiochip128
cat base //查看基地地址编号 ,加上对应的编号就得gpio编号
cat label
cat ngpio


或者参考:
cd /sys/kernel/debug
cat gpio 
GPIOs 0-31, platform/pinctrl, gpio0:
 gpio-2   (                    |sysfs               ) out hi    
 gpio-4   (                    |bt_default_wake_host) in  lo    
 gpio-5   (                    |power               ) in  hi    
 gpio-9   (                    |bt_default_reset    ) out hi    
 gpio-10  (                    |reset               ) out hi    [ 2730.683712] type=1400 audit(1358506663.390:342): avc: denied { read } for pid=
 gpio-13  (                    |?237                    ) out lo    comm=

GPIOs 32-63, platform/pinctrl, gp"sh"io1:
 gpio-32  (                    |v namecc5v0_host         ) out hi    ="gp
 gpio-34  (                    |rio" eset-gpio          ) out hi    dev="
 gpio-35  (                    |vdebugfs" incc_otg_vbus        ) out lo    o=2082 scon
 gpio-42  (                    |ctext=s-gpio             ) out hi    u:r:
 gpio-46  (                    |vshesel                ) out lo    ll:
 gpio-50  (                    |vs0 tsel                ) out lo    con
 gpio-54  (                    |vtextcc_sd              ) out hi    =u:o

GPIOs 64-95, platform/pinctrl, gpbjecio2:
 gpio-68  (                    |pt_r:dower-gpio          ) out hi    ebug
 gpio-72  (                    |ifs:s0 trq-gpio            ) in  hi    class
 gpio-83  (                    |b=f
t_default_rts      ) out lo    [ 273
 gpio-90  (                    |b0.684t_default_wake     ) out hi    196]
 gpio-91  (                    |? typ                   ) out hi    e=14
 gpio-92  (                    |v00 acc3v3_3g           ) out hi    udit(

GPIOs 96-127, platform/pinctrl, g13585pio3:
 gpio-106 (                    |f066an_ctl             ) out hi    63.3
 gpio-111 (                    |m90:3dio-reset          ) out hi    43): 
 gpio-112 (                    |havc: p-con-gpio         ) out lo    deni

GPIOs 128-159, platform/pinctrl, ed {gpio4:open } for pid=237 comm="sh" path="/sys/kernel/debug/gpio" dev="debugfs" ino=2082 scontext=u:r:shell:s0 tcontext=u:object_r:debugfs:s0rk3399_firefly_aiojd4:/sys/kernel tcla/debug $ ss=f

你可能感兴趣的:(linux,linux,运维,服务器)