Hi,
PCA6416's driver is gpio-pca953x.c
static const struct of_device_id pca953x_dt_ids[] = {
......
{ .compatible = "ti,tca6416", .data = OF_953X(16, PCA_INT), },
......
}
On i.MX8M mini EVK board, those GPIO's from PCA6416 are all output, so INT pin is not configured.
The following steps are for you reference:
--------------
1. IOMUX in device tree
pinctrl_i2c2_dev: mydev_iogrp {
fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO012_GPIO1_IO12 0x19 /* expend gpio int */
>;
};
2. add these lines to pca6146 node in dts:
pinctrl-0 = <&pinctrl_i2c2_dev:>;
interrupt-parent = <&gpio1>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
3. In driver's probe function
......
int irq = client->irq;
int ret = devm_request_irq(&client->dev, irq, (irq_handler_t) my_device_handler, IRQF_TRIGGER_LOW, "my i2c device", NULL);
if(ret)
enable_irq(irq);
......
[Comment]
In the driver, It seems that there is function called "pca953x_irq_setup()" , probably you can directly use it. I didn't test it.
Hope a bove information is helpful for you.
Have a nice day!
B.R,
Weidong