i.MX8MM: Using gpio-keys to capture interrupt and send notification to userspace

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX8MM: Using gpio-keys to capture interrupt and send notification to userspace

995 次查看
harsh1621
Contributor II

I have a pcf8575 gpio expander (16 pins) and want to get even notification of rising edge interrupt, on one of the pins, in the userspace. I have made the following device tree changes to achieve the same:

gpio-keys {
       compatible = "gpio-keys";
       status = "okay";

       back {
       label = "Back";
       gpios = <&pcf8575_h 8 GPIO_ACTIVE_HIGH>; // <---- Pin 8 to raise interrupt
       interrupt-parent = <&pcf8575_h>;                    // <------ Is this required? Kernel Docs on gpio-keys do not mention interrupt-parent as a subproperty
       interrupt = <8 IRQ_TYPE_EDGE_RISING>;   // <-------- What should be the interrupt specifier here??
       linux,code = <KEY_BACK>;
      };
};

The pcf8575 gpio controller node (which is also interrupt controller) has one IRQ Line which is configured with IRQ_TYPE_EDGE_FALLING. What interrupt specifier should I have in the gpio-keys node so that I can achieve an interrupt on Pin 8 on rising edge?

标记 (3)
0 项奖励
回复
0 回复数