From: Scott Wood <scottwood@freescale.com>
To: Timur Tabi <timur@freescale.com>
Cc: linuxppc-dev@ozlabs.org, kumar.gala@freescale.com
Subject: Re: [PATCH] i2c-mpc: use the cell-index property to enumerate the I2C adapters
Date: Thu, 1 Dec 2011 15:52:47 -0600 [thread overview]
Message-ID: <4ED7F72F.7050405@freescale.com> (raw)
In-Reply-To: <4ED7F5AA.2040909@freescale.com>
On 12/01/2011 03:46 PM, Timur Tabi wrote:
> 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.
>
>>> 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.
Ideally we would have a field in struct device_node that points to
struct device.
-Scott
next prev parent reply other threads:[~2011-12-01 21:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 17:33 [PATCH] i2c-mpc: use the cell-index property to enumerate the I2C adapters Timur Tabi
2011-12-01 18:41 ` Scott Wood
2011-12-01 20:54 ` Timur Tabi
2011-12-01 21:29 ` Scott Wood
2011-12-01 21:46 ` Timur Tabi
2011-12-01 21:52 ` Scott Wood [this message]
2011-12-01 21:55 ` Grant Likely
2011-12-01 21:59 ` Timur Tabi
2011-12-01 21:59 ` Timur Tabi
2011-12-01 22:05 ` Scott Wood
2011-12-01 22:10 ` Timur Tabi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ED7F72F.7050405@freescale.com \
--to=scottwood@freescale.com \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=timur@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.