what is clustered-irq and clustered-irq-flags specific to matrix keypad in device tree?

cancel
Showing results for 
Search instead for 
Did you mean: 

what is clustered-irq and clustered-irq-flags specific to matrix keypad in device tree?

322 Views
salvachandanapr
Contributor I

hi,

Iam working on gpio based matrix keypad ( imx6)

Iam sending platform  data through device tree (dts) file. But in driver drivers/input/keyboard/matrix_keypad.c ,

static int matrix_keypad_init_gpio(struct platform_device *pdev, struct matrix_keypad *keypad)
{
        const struct matrix_keypad_platform_data *pdata = keypad->pdata;

if (pdata->clustered_irq > 0) {
                err = request_irq(pdata->clustered_irq,
                                matrix_keypad_interrupt,
                                pdata->clustered_irq_flags,
                                "matrix-keypad", keypad);
                if (err) {
                        dev_err(&pdev->dev,
                                        "Unable to acquire clustered interrupt\n");
                        goto err_free_rows;
                }

}

in probe function, the above  function is called and iam not understanding how to pass pdata->clustered_irq in DTS file and their flags and let me know exactly what is pdata->clustered_irq ? ##

Labels (1)
Tags (2)
0 Kudos
1 Reply

61 Views
jimmychan
NXP TechSupport
NXP TechSupport

Below links are the information about matrix_keypad.

struct matrix_keypad_platform_data 

linux-2.6-imx.git - Freescale i.MX Linux Tree 

Input: matrix_keypad - add support for clustered irq

clustered_irq may be specified if interrupts of all row/column GPIOs are bundled to one single irq.

To pass the value from DTS to driver, please read the function matrix_keypad_parse_dt() in the driver. Seems there is no parameter pass from DTS file for clustered_irq. I think you can add one in the driver.

0 Kudos