linux查看gpio状态

1|sp9832e_1h10:/ # cat ./sys/kernel/debug/gpio
GPIOs 0-255, platform/40280000.gpio-controller, sprd-ap-gpio:
 gpio-50  (                    |?                   ) out lo    
 gpio-52  (                    |ltr558_irq_pin      ) in  hi    
 gpio-53  (                    |magnetic_reset      ) out hi    
 gpio-55  (                    |acceleremter_INT1   ) in  lo    
 gpio-76  (                    |flash-en-gpios      ) in  lo    
 gpio-78  (                    |cd                  ) in  hi    
 gpio-85  (                    |boost_mode          ) out lo    
 gpio-88  (                    |flash-torch-en-gpios) in  lo    
 gpio-89  (                    |flash-chip-en-gpios ) out hi    
 gpio-121 (                    |boost_enable        ) out hi    
 gpio-141 (                    |flash-sync-gpios    ) in  lo    
 gpio-144 (                    |adaptive_ts_int     ) in  hi    
 gpio-145 (                    |adaptive_ts_rst     ) out hi    

GPIOs 288-319, platform/40210000.gpio-controller, sprd-ap-eic:
 gpio-290 (                    |Volume Down Key     ) in  hi    

GPIOs 320-335, platform/40380000.spi:pmic@0:gpio-controller@280, sprd-pmic-eic:
 gpio-320 (                    |musb vbus detect    ) in  hi    
 gpio-321 (                    |Power Key           ) in  hi    
 gpio-323 (                    |button              ) in  lo    
 gpio-325 (                    |detect_mic          ) in  lo    
 gpio-328 (                    |detect_l            ) in  lo    
 gpio-329 (                    |vbat_detect         ) in  hi    
 gpio-330 (                    |Volume Up Key       ) in  lo    
 gpio-332 (                    |detect_h            ) in  lo    
 gpio-333 (                    |detect_all          ) in  lo   

猜你喜欢

转载自blog.csdn.net/lihongbo20080156/article/details/81097609