Thread (11 messages) flat view 11 messages, 3 authors, 2011-12-01

Re: [PATCH] i2c-mpc: use the cell-index property to enumerate the I2C adapters

From: Timur Tabi <hidden>
Date: 2011-12-01 21:48:03

Scott Wood wrote:
How is this going to interact with other i2c buses (e.g. on a board
FPGA) that might have a conflicting static numbering scheme?  Have you
ensured that no dynamic bus registrations (e.g. an i2c bus on a PCI
device) can happen before the static SoC i2c buses are added?
Hmm.... You have a point there.
quoted
An alternative approach is to create a function like this:

	struct i2c_adapter *i2c_adapter_from_node(struct device_node *np);

I could then just use adap->nr directly.
If there isn't a way to get a "struct device" from "struct device_node",
we should add it. 
How do I do that?  Scan all the struct devices until I find one where dev->of_node == np?  That seems really inefficient.

-- 
Timur Tabi
Linux kernel developer at Freescale
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help