All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Check for 1-register-only
Date: Fri, 09 May 2008 10:43:58 +0000	[thread overview]
Message-ID: <20080509124358.779c4bfb@hyperion.delvare> (raw)
In-Reply-To: <20080508224145.41cfa3ef@hyperion.delvare>

Hi Hans,

On Fri, 09 May 2008 07:03:19 +0200, Hans de Goede wrote:
> Perhaps it would be an idea to try to do an i2c (*) read transfer of more then 
> 1 byte, it would be interesting to see how this specific 1 register device 
> responds to this, maybe it will stop acking after the first byte is transfered 
> because it has only one byte to send.

In master-receiver, slave-transmitter mode, it's the master who sets
the ack bit, depending on whether it will ask for more bytes after that
one (ack) or not (nack). The slave doesn't have its say. All the slave
can do is send zero or maybe random bytes if it doesn't have data to
send. Slaves which know how to stretch the SCL pulses could hold SCL
low as a reprisal, too, temporarily or permanently, but that's about it.

> OTOH I have no idea how regular smbus devices which normally do write reg 
> address, then read transactions respond to larger then 1 byte reads.

I don't know either, but I fear that the answer is: it depends. And
the answer is probably the same for 1-register-only devices. Note for
example, that any SMBus device supporting PEC would be perfectly happy
to send a second byte, which would be the PEC byte. So, I don't think
that the method you proposed can be used to differentiate between the
two families of devices.

> * Calling it i2c here to make clear I mean an low level read, not an smbus read 
> transaction where first the register to read gets written.

Thanks,
-- 
Jean Delvare

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

  parent reply	other threads:[~2008-05-09 10:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 20:41 [lm-sensors] [PATCH] sensors-detect: Check for 1-register-only Jean Delvare
2008-05-09  5:03 ` Hans de Goede
2008-05-09  5:06 ` Hans de Goede
2008-05-09  6:46 ` Hans de Goede
2008-05-09 10:43 ` Jean Delvare [this message]
2008-05-09 10:47 ` Hans de Goede
2008-05-09 11:51 ` achim
2008-05-09 12:14 ` Jean Delvare
2008-05-09 15:29 ` Jean Delvare
2008-05-09 17:05 ` Jean Delvare
2008-05-09 17:31 ` achim
2008-05-09 21:02 ` Jean Delvare
2008-05-09 21:16 ` Ludovic Lebègue
2008-05-10 16:40 ` Jean Delvare
2008-05-11 16:23 ` Jean Delvare
2008-05-12 10:53 ` Achim Gottinger

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=20080509124358.779c4bfb@hyperion.delvare \
    --to=khali@linux-fr.org \
    --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.