Hello Fabio,
thanks for your advice. But i'm pretty new to kernel hacking and need more information. The device tree support for Linux device driver isn't much documented, especially for newbies.
The kernel driver represent an IC connected as SPI slave to the MX28 and acts as an network device.
I need more information about your example:
Which C file do you mean gpio-pca953x.c or i2c-mux-954x.c?
What does device tree support means in detail?
In both files i didn't find a access to the interrupt settings of the device tree.
Isn't it necessary to implement the irq mapping (GPIO => IRQ), because the device tree and the spi driver from the parent node handle that?
Now i have extended the device tree with the spi device and i can find it under /sys/devices.
ssp2: ssp@80014000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx28-spi";
pinctrl-names = "default";
pinctrl-0 = <&spi2_pins_a>;
status = "okay";
spi-device: spi-device@0 {
compatible = "spi-device";
interrupt-parent = <&gpio3>;
interrupts = <25 0x1>;
spi-max-frequency = <2000000>;
reg = <0x0>;
};
};
Do i need to place the input GPIO 3_25 as child of pinctrl?
Are there any checkpoints, where i can see that i'm on the right way of implementation?
Stefan