From: Jean Delvare <khali@linux-fr.org>
To: Sean MacLennan <smaclennan@pikatech.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>, ben-linux@fluff.org
Subject: Re: [PATCH] i2c: i2c-ibm_iic message can be confusing
Date: Mon, 2 Feb 2009 18:29:09 +0100 [thread overview]
Message-ID: <20090202182909.2cea69a3@hyperion.delvare> (raw)
In-Reply-To: <20090202120159.2478d7af@lappy.seanm.ca>
On Mon, 2 Feb 2009 12:01:59 -0500, Sean MacLennan wrote:
> This is a trivial patch that does not need to be in 2.6.29. While
> tracking down an EEPROM problem, I found the messages confusing... it
> looked like the EEPROM was being started before the I2C driver!
>
> Here is an example:
>
> at24 0-0052: 512 byte 24c04 EEPROM (writable)
> ibm-iic ef600700.i2c: using standard (100 kHz) mode
> ad7414 0-004a: chip found
>
> It looks like the at24 starts first, then the i2c driver, then the
> ad7414. By moving the message to after the of scan, we always get the
> driver, then the devices.
>
> Cheers,
> Sean
>
> Print the i2c driver message before scanning for devices so that the
> logs show the driver, then the devices. Currently you can get
> device(s), driver, device(s).
>
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
> ---
> diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
> index 88f0db7..7fc0729 100644
> --- a/drivers/i2c/busses/i2c-ibm_iic.c
> +++ b/drivers/i2c/busses/i2c-ibm_iic.c
> @@ -756,12 +756,12 @@ static int __devinit iic_probe(struct of_device *ofdev,
> goto error_cleanup;
> }
>
> - /* Now register all the child nodes */
> - of_register_i2c_devices(adap, np);
> -
> dev_info(&ofdev->dev, "using %s mode\n",
> dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
>
> + /* Now register all the child nodes */
> + of_register_i2c_devices(adap, np);
> +
> return 0;
>
> error_cleanup:
Indeed.
Acked-by: Jean Delvare <khali@linux-fr.org>
--
Jean Delvare
next prev parent reply other threads:[~2009-02-02 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 17:01 [PATCH] i2c: i2c-ibm_iic message can be confusing Sean MacLennan
2009-02-02 17:29 ` Jean Delvare [this message]
2009-02-04 3:55 ` Benjamin Herrenschmidt
2009-02-04 7:36 ` Jean Delvare
2009-04-18 0:36 ` Sean MacLennan
2009-04-24 13:10 ` Josh Boyer
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=20090202182909.2cea69a3@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=ben-linux@fluff.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=smaclennan@pikatech.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.