how can I read the status of wps gpio pin 65 on EA8500
I found in the qcom-ipq8064-ea8500.dts file this part:
wps {
label = "wps";
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
I thought I could use something like this explained in the tutorial:
https://openwrt.org/docs/techref/hardware/port.gpio
But I can't find the defined gpio pin in /sys/class/gpio
If I try to create it I get the message
echo "65" > /sys/class/gpio/export
ash: write error: Resource busy
I found the file /etc/rc.button/wps
which I edited and was able to write something into a file when I press the wps button successfully.
#!/bin/sh
[ "${ACTION}" = "pressed" -a "$BUTTON" = "wps" ]
{
echo "WPS pressed $(date) $BUTTON" >> /tmp/Button
}
[ "${ACTION}" = "releases" ] -a "$BUTTON" = "wps" {
echo "WPS released $(date) $BUTTON" >> /tmp/Button
}
return 0
Of course I could use my created file but I think this info should already be somewhere stored and I just need to find it.
Is there a file where I can just readout the status of pin65 called wps?
Am I missing here something?
Thanks for pointing me in the right direction.