1

I am using iMX53qsb with Yocto and want to run some script by button pressing. Now I have enabled interrupt on user button (as gpio), but I can't imagine how to handle it.

Could anyone point me how to handle this interrupt or where I can read more about this?

Button is Volume_up (GPIO_2_14), set as gpio and interrupt event is falling edge; in cat /proc/interrupts I see following:

174:  0  -  gpiolib

and second column is counting on every pressing.

1 Answers1

1

It was long and hard path.. and now it works. Finally, GPIO is handled by sysfs, not kernel module (the reason is that user-space scripts cannot be called from kernel-space).

In my case step sequence looks like follow:

  1. Editing hardware description file to enable button pin as GPIO (arch/arm/mach-mx5/mx53_loco.c, by default it is defined as button);
  2. Setting GPIO through sysfs (export desire GPIO pin, set direction, set edge);
  3. Writing program that polls desire GPIO by poll();
  4. Making poll-program starts at system startup in background.