public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
To: Jean Delvare <khali@linux-fr.org>
Cc: LM Sensors <lm-sensors@lm-sensors.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: I2C block reads with i2c-viapro: testers wanted
Date: Thu, 11 Aug 2005 01:13:02 +0200	[thread overview]
Message-ID: <42FA89FE.9050101@cetrtapot.si> (raw)
In-Reply-To: <20050810230633.0cb8737b.khali@linux-fr.org>

Jean Delvare wrote:
> 
> Could you try running "i2cdump 0 0x50" and "i2cdump 0 0x50 i" (with the
> patch still applied), and compare both the outputs and the time each
> command takes? You should see similar outputs, but the second command
> should be magnitudes faster. This would confirm that the I2C block mode
> works as intended on your VT8233 chip.

Hmm, not really. Here it takes 6 seconds for the first test nad about 5 seconds 
for the second test (I just read the WARNING - need to substract 5s from the 
results...).

noa xtrm # time i2cdump 0 0x50
No size specified (using byte-data access)
   WARNING! This program can confuse your I2C bus, cause data loss and worse!
   I will probe file /dev/i2c-0, address 0x50, mode byte
   You have five seconds to reconsider and press CTRL-C!

      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 80 08 07 0d 09 02 40 00 04 75 75 00 82 10 00 01    ??????@.?uu.??.?
10: 0e 04 0c 01 02 20 00 a0 75 00 00 50 3c 50 2d 20    ????? .?u..P<P-
20: 90 90 50 50 00 00 00 00 00 00 00 00 00 00 00 00    ??PP............
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a7    ...............?
40: ce 00 00 00 00 00 00 00 01 4d 34 20 37 30 4c 33    ?.......?M4 70L3
50: 32 32 34 44 54 30 2d 43 42 30 20 30 44 02 51 45    224DT0-CB0 0D?QE
60: 0b c8 db 00 4c 39 41 37 43 33 4e 00 00 00 00 00    ???.L9A7C3N.....
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 20 12 02 22 07 ff ff ff ff ff 18 04 16 ff ff    . ??"?.....???..
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

real	0m6.033s
user	0m0.000s
sys	0m0.004s
noa xtrm # time i2cdump 0 0x50 i
   WARNING! This program can confuse your I2C bus, cause data loss and worse!
   I will probe file /dev/i2c-0, address 0x50, mode i2c block
   You have five seconds to reconsider and press CTRL-C!

      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 80 08 07 0d 09 02 40 00 04 75 75 00 82 10 00 01    ??????@.?uu.??.?
10: 0e 04 0c 01 02 20 00 a0 75 00 00 50 3c 50 2d 20    ????? .?u..P<P-
20: 90 90 50 50 00 00 00 00 00 00 00 00 00 00 00 00    ??PP............
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a7    ...............?
40: ce 00 00 00 00 00 00 00 01 4d 34 20 37 30 4c 33    ?.......?M4 70L3
50: 32 32 34 44 54 30 2d 43 42 30 20 30 44 02 51 45    224DT0-CB0 0D?QE
60: 0b c8 db 00 4c 39 41 37 43 33 4e 00 00 00 00 00    ???.L9A7C3N.....
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 20 12 02 22 07 ff ff ff ff ff 18 04 16 ff ff    . ??"?.....???..
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

real	0m5.174s
user	0m0.001s
sys	0m0.002s

while simple cat takes a lot less time:
noa xtrm # time dd if=/sys/bus/i2c/devices/0-0050/eeprom bs=4 | hexdump -C
00000000  80 08 07 0d 09 02 40 00  04 75 75 00 82 10 00 01  |......@..uu.....|
00000010  0e 04 0c 01 02 20 00 a0  75 00 00 50 3c 50 2d 20  |..... ..u..P<P- |
00000020  90 90 50 50 00 00 00 00  00 00 00 00 00 00 00 00  |..PP............|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 a7  |................|
00000040  ce 00 00 00 00 00 00 00  01 4d 34 20 37 30 4c 33  |.........M4 70L3|
00000050  32 32 34 44 54 30 2d 43  42 30 20 30 44 02 51 45  |224DT0-CB0 0D.QE|
00000060  0b c8 db 00 4c 39 41 37  43 33 4e 00 00 00 00 00  |....L9A7C3N.....|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 20 12 02 22 07 ff ff  ff ff ff 18 04 16 ff ff  |. .."...........|
00000090  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
64+0 zapisov na vhodu
64+0 zapisov na izhodu
00000100

real	0m0.600s
user	0m0.002s
sys	0m0.005s

It seems pretty fast in all cases (i2cdump, i2cdump block and cat) and results 
are close too (taing WARNING delay into account).

regards,
hinko k
-- 
..because under Linux "if something is possible in principle,
then it is already implemented or somebody is working on it".

					--LKI

  parent reply	other threads:[~2005-08-10 23:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09 21:13 I2C block reads with i2c-viapro: testers wanted Jean Delvare
2005-08-10 20:31 ` Hinko Kocevar
2005-08-10 21:06   ` Jean Delvare
2005-08-10 22:23     ` [lm-sensors] " Martin Drab
2005-08-11 17:12       ` Jean Delvare
2005-08-10 23:13     ` Hinko Kocevar [this message]
2005-08-11 16:56       ` Jean Delvare
2005-08-11 19:13         ` Krzysztof Halasa
2005-08-11 19:59           ` Jean Delvare
2005-08-11 21:39             ` Krzysztof Halasa
2005-08-11 21:49               ` Jean Delvare
2005-08-11 22:08                 ` Krzysztof Halasa
2005-08-12  6:26                   ` Jean Delvare
2005-08-12 15:29                     ` Krzysztof Halasa
2005-08-12 17:58                       ` Jean Delvare
2005-08-12  1:07 ` [lm-sensors] " Mark M. Hoffman
2005-08-12  6:02   ` Jean Delvare
  -- strict thread matches above, loose matches on Subject: below --
2005-08-10  1:55 Salah Coronya
2005-08-10 10:06 ` 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=42FA89FE.9050101@cetrtapot.si \
    --to=hinko.kocevar@cetrtapot.si \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox