All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [RESEND] LM73 hwmon driver i2c auto-detection
Date: Tue, 30 Aug 2011 17:05:50 +0000	[thread overview]
Message-ID: <20110830170550.GA27122@ericsson.com> (raw)
In-Reply-To: <CAOYRzauHk1j8ThGc8Cq32Jb21LS2iqtAnyD=H=9ZpVmk3RVw-Q@mail.gmail.com>

On Tue, Aug 30, 2011 at 11:25:42AM -0400, Robert Casanova wrote:
> We are trying to use the hwmon framework to read the temperature values out of
> a LM73 device we have in our i2c bus on the OMAPL-138. It's current address is
> 0x49.
> The actual behavior for the LM73 driver seems to be to try to autodetect if
> there are any other devices of that same type on the i2c bus by looking at the
> std addresses where it could find one:
> 0x48, 0x49, 0x4a, 0x4c, 0x4d, 0x4e
> 
> What happens is that we have a different device with completely different
> registers at @0x48 so when the autodetection method gets called it tries to
> read 2bytes out of the register 0x07 and this other device has only 1byte of
> data at that register, then the whole bus times out.
> 
> We have tried declaring the devices we have during our board setup statically,
> for instance:
> static const struct i2c_board_info __initconst i2c_devices[] = {
> {
> I2C_BOARD_INFO("lm73", 0x49),
> },
> };
> 
> static __init void board_init(void) {
> ...
> i2c_register_board_info(1/* i2c-0 above was registered i2c_davinci.1*/,
> i2c_devices,
> ARRAY_SIZE(i2c_devices));
> ...
> }
> 
> But even when the driver gets instantiated at the proper address 0x49 the
> sensors_lm73_init gets called making the detect method to get called and
> testing an address that could be an LM73 but is not and hanging the bus.
> 
> Has anyone found some of the same problems? Is there any way to avoid
> completely the autodetection for the hwmon framework? Should the i2c
> implementation be able to handle this situation gracefully?
> 
Did you try to instantiate the _other_ device ? That should take care of the problem.

Instantiating the LM73 at address 0x49 won't help, since the i2c core code will still
attempt to auto-detect the chip at address 0x48.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2011-08-30 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 15:25 [lm-sensors] [RESEND] LM73 hwmon driver i2c auto-detection problem Robert Casanova
2011-08-30 17:05 ` Guenter Roeck [this message]
2011-08-30 18:20 ` [lm-sensors] [RESEND] LM73 hwmon driver i2c auto-detection Robert Casanova
2011-08-30 18:50 ` Jean Delvare

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=20110830170550.GA27122@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=lm-sensors@vger.kernel.org \
    /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.