• Ben Dooks's avatar
    gpio: pca935x: fix of-only probed devices · 6f29c9af
    Ben Dooks authored
    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: default avatarBen Dooks <ben.dooks@codethink.co.uk>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    6f29c9af
gpio-pca953x.c 20 KB