Hi all, I'm working on a board based on the iMX6ul evk, and am trying to register push button presses in user space. Based on the research I've done, the best way to do this is via gpio-keys in the device tree. So far I've gotten the below code. The device tree compiles but there is no documentation on how to handle this in the user space. So I have 2 questions:
/* Input button configuration */
gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
test-btn {
label = "Test-Input";
linux,code = <28>;
gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
};
};
pinctrl_gpiokeys: gpiokeygrp {
fsl,pins = <
MX6UL_PAD_UART5_RX_DATA__GPIO1_IO31 0x000010B0 /* USER Push Button */
>;
};
Hi danielbujak
one can check examples on
https://community.freescale.com/thread/381277
Definitive GPIO guide - Studio Kousagi Wiki
for documentation one can look at common linux documentation
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks, this looks like it will be helpful for some background understanding. I have the gpio-keys somewhat working but I'm having no luck with the gpio-reset. Is there some more documentation on that than what's in the Documentation/devicetree/bindings/reset?