Hey,
I'm trying to use the gpio-keys driver and the rotary-encoder driver with an external GPIO expander.
I am able to successfully get the GPIO expander to be detected. I can see it and list its ports using `gpioinfo` and i can set the pins and measure the changes. I know the hardware is 100% working because i can easily do this at the application level. But I want to do this in the kernel.
This is the overlay that I use for my GPIO expander, what fragment do i need to add to it to use the gpio-keys driver with pin 13 of the expander?
Nothing I am trying seems to work, wondering if anyone here has experience.
I'm trying to use the gpio-keys driver and the rotary-encoder driver with an external GPIO expander.
I am able to successfully get the GPIO expander to be detected. I can see it and list its ports using `gpioinfo` and i can set the pins and measure the changes. I know the hardware is 100% working because i can easily do this at the application level. But I want to do this in the kernel.
This is the overlay that I use for my GPIO expander, what fragment do i need to add to it to use the gpio-keys driver with pin 13 of the expander?
Nothing I am trying seems to work, wondering if anyone here has experience.
Code:
/** Device Tree overlay for MCP23S17-based GPIO expander*//dts-v1/;/plugin/;/ {fragment@0 {target = <&spi0>;__overlay__ {status = "okay";#address-cells = <1>;#size-cells = <0>;mcp23s17_01: mcp23s17@1 {compatible = "microchip,mcp23s17";gpio-controller;#gpio-cells = <2>; // gpio specifier consists of 2 cellsmicrochip,spi-present-mask = <0x01>;reg = <1>;spi-max-frequency = <500000>;status = "okay";interrupt-parent = <&gpio>;interrupts = <3 2>; // Using GPIO 3 with falling edge detectionmicrochip,irq-mirror;};};};};
Statistics: Posted by botoxparty — Wed Aug 14, 2024 6:35 pm