linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* pca9539 I2C gpio expander
@ 2008-10-14 18:10 Steven A. Falco
  2008-10-14 21:21 ` Anton Vorontsov
  0 siblings, 1 reply; 2+ messages in thread
From: Steven A. Falco @ 2008-10-14 18:10 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org

I am attempting to use a pca9539 I2C gpio driver on a PPC440EPx board.  The
driver is "drivers/gpio/pca953x.c".  I've added an entry to the .dts file:

IIC0: i2c@ef600700 {
	compatible = "ibm,iic-440epx", "ibm,iic";
	...
	pca9539@76 {
		compatible = "ti,pca9539";
		reg = <76>;
	};
};

of_register_i2c_devices sees this entry and calls i2c_new_device.
i2c_new_device copies info->platform_data to client->dev.platform_data, but
I think that this structure is empty (at least I don't see where
of_register_i2c_devices would set it).

pca953x_probe is eventually called, but it expects to find its "lowest gpio
number" in client->dev.platform_data->gpio_base, which has not been set.  So
pca953x_probe returns -ENODEV.

I don't understand where the disconnect is.  Should I be able to use the
pca953x.c driver, or is it somehow incompatible?

If it is incompatible, is there a strategy for making it compatible?

	Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-14 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 18:10 pca9539 I2C gpio expander Steven A. Falco
2008-10-14 21:21 ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).