]> git.karo-electronics.de Git - karo-tx-linux.git/commit
gpio: pca935x: fix of-only probed devices
authorBen Dooks <ben.dooks@codethink.co.uk>
Tue, 8 Dec 2015 10:19:26 +0000 (10:19 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 9 Dec 2015 07:06:10 +0000 (08:06 +0100)
commit6f29c9afbe636fc0e35c82a11eaf45c3b85eb07a
tree9ab2628820c9b03529c0fc145e3d9c656917e6d7
parent9f49f6dd0473c8fab4522e2e2cb16e93ffb8f3f0
gpio: pca935x: fix of-only probed devices

If the pca953x device is probed from OF using the proper OF probing then
the i2c-client will be NULL and the device probe will fail as id is NULL
and it isn't an ACPI device (previous drivers would simply OOPS out).

Add support for the of_device_id table having the same data as the others
so that the correct paths will be taken when registering a device.

An example of current valid of node which did not work:

gpio@38 {
compatible = "onsemi,pca9654", "nxp,pca9534";
reg = <0x38>;
interrupt-parent = <&gpio5>;
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
};

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c