AnsweredAssumed Answered

ADP5588 keypad irq issue

Question asked by bhaskar9966 on Nov 3, 2016
Latest reply on Nov 16, 2016 by hyao

Hi all,

Greetings !!!

 

I am using ADP5588 chip for the 2x2 keypad with AM335x SoC Based Mother Board.

I am running Linux OS on it, with the kernel version 3.2.

 

I have followed the below link, and added all required platform data in my board file.

      https://wiki.analog.com/resources/tools-software/linux-drivers/input-keyboard/adp5588

 

My platform data is : 


#define KEYPAD_IRQ GPIO_TO_PIN(1, 25)

static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
            [59] = KEY_F1,
            [60] = KEY_F2,
            [61] = KEY_F3,
            [62] = KEY_F4,
};

 

static struct adp5588_kpad_platform_data adp5588_kpad_data = {
            .rows = 2,
            .cols = 2,
            .keymap = adp5588_keymap,
            .keymapsize = ARRAY_SIZE(adp5588_keymap),
            .repeat = 0,
};

 

static struct i2c_board_info __initdata i2c_keypad_boardinfo[] = {
      {
            I2C_BOARD_INFO("adp5588-keys", 0x34),
            .irq = OMAP_GPIO_IRQ(KEYPAD_IRQ),
            .platform_data = (void *)&adp5588_kpad_data,
       },
};

 

The driver also complied successfully as Module. Then I am following the below procedure to test

 

         # insmod adp5588-keys.ko
            [ 9.229544] input: adp5588-keys as /devices/platform/omap/omap_i2c.1/i2c-1/1-0034/input/input1
            [ 9.256393] adp5588_keys 1-0034: Rev.2 keypad, irq 217

 

         # evtest /dev/input/event1
            Input driver version is 1.0.1
            Input device ID: bus 0x18 vendor 0x1 product 0x1 version 0x2
            Input device name: "adp5588-keys"
            Supported events:
            Event type 0 (EV_SYN)
            Event type 1 (EV_KEY)
            Event code 59 (KEY_F1)
            Event code 60 (KEY_F2)
            Event code 61 (KEY_F3)
            Event code 62 (KEY_F4)
            Properties:
            Testing ... (interrupt to exit)

Nothing coming while pressing the switch.

FYI...

below is the output of /proc/interrupts  

         # cat /proc/interrupts | grep adp
            217: 0 GPIO adp5588_keys

IRQ value not increasing. 

 

can any body help me, What might be the problem ?

Is any configuration I am missing to enable the IRQ or CHIP ?

 

Thanks in advance.

 

Regards,

Bhaskar 

Outcomes