android gpio 调试
gpio_chip gpio 端口控制芯片
gpio 端口:系统全局的gpio号
gpio口dts配置qcom,msm-ear-hac-pa = ;这里的msm_gpio是gpio chip,99是偏移量
/sys/class/gpio/ 是用户态进行gpio设置的接口
ls sys/class/gpio/
export 导入,写入gpio号
gpiochip589 gpio芯片
gpiochip621
gpiochip653
gpiochip685
gpiochip717
gpiochip749
gpiochip781
gpiochip813
gpiochip845
gpiochip877
gpiochip909
gpiochip910
gpiochip911
unexport 释放gpio
只有没有regquest_gpio的gpio口才能由用户态写入
echo “out” > gpio1010/direction
echo “1” > gpio1010/value
tinymix “EAR HAC PA”
EAR HAC PA: Off >On
设置成功
cat /sys/kernel/debug/gpio
GPIOs 589-620, platform/qcom,smp2pgpio-ssr-smp2p-1-out.17, master-kernel:
GPIOs 621-652, platform/qcom,smp2pgpio-ssr-smp2p-1-in.16, slave-kernel:
GPIOs 653-684, platform/qcom,smp2pgpio-ssr-smp2p-4-out.15, master-kernel:
GPIOs 685-716, platform/qcom,smp2pgpio-ssr-smp2p-4-in.14, slave-kernel:
GPIOs 717-748, platform/qcom,smp2pgpio-smp2p-4-out.12, smp2p:
GPIOs 749-780, platform/qcom,smp2pgpio-smp2p-4-in.10, smp2p:
GPIOs 781-812, platform/qcom,smp2pgpio-smp2p-1-out.8, smp2p:
GPIOs 813-844, platform/qcom,smp2pgpio-smp2p-1-in.6, smp2p:
GPIOs 845-876, platform/qcom,smp2pgpio-smp2p-7-out.4, smp2p:
GPIOs 877-908, platform/qcom,smp2pgpio-smp2p-7-in.2, smp2p:
GPIOs 909-909, spmi/qpnp-pin-de714600, pm8909-gpio:
GPIOs 910-910, spmi/qpnp-pin-de714400, pm8909-mpp:
//gpiochip-baseno-endnuber,busname/dev_name.lable
GPIOs 911-1023, platform/1000000.pinctrl, msm_tlmm_gpio:
gpio-915 (spk_vreg ) out lo
gpio-930 (chg-gpio ) out lo
gpio-931 (fb_st7735r ) out hi
gpio-932 (sn7326_rst ) out hi
gpio-934 (fb_st7735r ) out hi
gpio-936 (disp_rst_n ) in hi
gpio-942 (FLASH_EN ) in lo
gpio-1001 (volume_up ) in hi
gpio-1002 (camera_focus ) in hi
gpio-1005 (ClamShell_key ) in hi
gpio-1009 ([auto] ) out lo
gpio-1010 (sysfs ) out hi
gpio号 使用者,方向,值