Hello, I need to configure device tree correctly. I have I2C sensor driver which also has interrupt on output. On the source code it uses
request_threaded_irq(6) with the following inputs:
request_threaded_irq(client->irq, NULL, bh1770_irq, IRQF_TRIGGER_FALLING | IRQF_ONESHOT | IRQF_TRIGGER_LOW, "bh1770", chip);
I got access to I2C buss correctly by device tree, but can't configure external interrupt...
I've assumed the following configuration:
&i2c3 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpi2c3>;
status = "okay";
/* Light sensor */
bh1770: bh1770@38 {
compatible = "osram,bh1770";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_bh1770>;
reg = <0x38>;
interrupt-parent = <&lsio_gpio3>;
interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
status = "okay";
};
};
&iomuxc {
...
pinctrl_bh1770: bh1770grp {
fsl,pins = <
IMX8QXP_QSPI0B_SS1_B_LSIO_GPIO3_IO24 0x21
>;
};
...
};
Actually I got error -22 (looks like EINVAL) just on runtime by request_threaded_irq().
Can someone help me, what do I wrong?
Thanks in advance, Anton