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

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

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

1,194 次查看
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 ? ##

标签 (1)
标记 (2)
0 项奖励
回复
1 回复

933 次查看
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 项奖励
回复