From: Jean Delvare <khali@linux-fr.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: rtc-linux@googlegroups.com, James Chapman <jchapman@katalix.com>,
David Brownell <david-b@pacbell.net>,
linuxppc-dev@ozlabs.org, i2c@lm-sensors.org
Subject: Re: [i2c] [PATCH] Make i2c-mpc driver use i2c_add_numbered_adapter
Date: Tue, 15 May 2007 15:26:26 +0200 [thread overview]
Message-ID: <20070515152626.199f9d6b@hyperion.delvare> (raw)
In-Reply-To: <20070514190545.32739.72083.stgit@trillian.secretlab.ca>
On Mon, 14 May 2007 13:11:23 -0600, Grant Likely wrote:
> Move the i2c-mpc driver over to using the new i2c infrastructure.
> Specifically, it now uses i2c_add_numberd_adapter so that the bus number
i2c_add_numbered_adapter (missing e)
> can be determined ahead of time and used to register i2c clients before
> the bus is instantiated.
>
> Tested on an MPC5200 based board
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jean Delvare <khali@linux-fr.org>
> ---
> This patch will need to be tested to make sure it does not break any 8xxx
> board ports.
>
> Work still to be done (in another patch): support for pulling i2c client
> registrations out of the device tree.
>
> drivers/i2c/busses/i2c-mpc.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
> index c6b6898..a769efc 100644
> --- a/drivers/i2c/busses/i2c-mpc.c
> +++ b/drivers/i2c/busses/i2c-mpc.c
> @@ -327,9 +327,10 @@ static int fsl_i2c_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, i2c);
>
> i2c->adap = mpc_ops;
> + i2c->adap.nr = pdev->id;
> i2c_set_adapdata(&i2c->adap, i2c);
> i2c->adap.dev.parent = &pdev->dev;
> - if ((result = i2c_add_adapter(&i2c->adap)) < 0) {
> + if ((result = i2c_add_numbered_adapter(&i2c->adap)) < 0) {
> printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
> goto fail_add;
> }
--
Jean Delvare
next prev parent reply other threads:[~2007-05-15 13:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-14 19:11 [PATCH] Make i2c-mpc driver use i2c_add_numbered_adapter Grant Likely
2007-05-14 19:32 ` Grant Likely
2007-05-15 13:26 ` Jean Delvare [this message]
2007-05-15 15:28 ` [i2c] " David Brownell
2007-05-15 15:51 ` Grant Likely
2007-05-15 16:05 ` David Brownell
2007-05-16 18:25 ` Jean Delvare
2007-05-16 18:38 ` Grant Likely
2007-05-16 19:15 ` Scott Wood
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=20070515152626.199f9d6b@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=david-b@pacbell.net \
--cc=grant.likely@secretlab.ca \
--cc=i2c@lm-sensors.org \
--cc=jchapman@katalix.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=rtc-linux@googlegroups.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 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).