2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-10-25 15:25:58 +00:00
Commit Graph

14 Commits

Author SHA1 Message Date
Jean Delvare
200758f450 Strip useless whitespace before new line at end of string.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3025 7894878c-1315-0410-8ee3-d5d059ff63e0
2005-06-23 21:07:10 +00:00
Jean Delvare
f30a5e407e Kill gcc 3 warning.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2830 7894878c-1315-0410-8ee3-d5d059ff63e0
2005-01-05 20:38:50 +00:00
Jean Delvare
7c833a6029 Patch by J. A. McMahan Jr.:
This patch fixes a minor bug in the eeprog program that causes it to skip
the first byte when printing out data read from the EEPROM in ASCII mode
(that is, without the hex switch, -x, enabled).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2829 7894878c-1315-0410-8ee3-d5d059ff63e0
2005-01-05 20:37:54 +00:00
Mark D. Studebaker
17af026df9 update to version 0.7.5, which makes -8 mode the default.
This should be safer.
      Contribution from
            Stefano Barbato <stefano@codesink.org>


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2167 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-12-13 23:54:59 +00:00
Jean Delvare
3bac773065 Fix typo.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2106 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-11-29 13:21:02 +00:00
Mark D. Studebaker
0872117cb9 eeprog program from
Stefano Barbato
	stefano@codesink.org


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2099 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-11-28 03:07:48 +00:00
Mark D. Studebaker
a43c4d1b3a update paths again to pick up userspace i2c-dev.h from
../../kernel/include


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1745 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-05-31 04:18:24 +00:00
Mark D. Studebaker
8d14fe682d add include file search path
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1744 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-05-31 02:38:19 +00:00
Mark D. Studebaker
0d05ed0fab patch as described below. Doesn't compile because of header problems...
From: rysanek@fccps.cz

Dear Chris,

many thanks for writing eeprom.c in the first place.
It has saved me an indefinite amount of time when I needed
to access a 24C02 in a cursed notebook battery pack that
someone's trying to refurbish.

Many more thanks to the authors of lm_sensors and Linux i2c
for writing their software, of course.

I did have to modify eepromer/eeprom.c a bit though, to support
my 24C02. The essential gotcha was this: whereas the 24C16 that
you were using supports maximum burst size of 16 bytes (the same
applies to 24C08 and 24C04), the 24C02 and 24C01 only support
bursts up to 8 bytes long.
I assume that in fact you already know this, as in your code
there's a neat #define called MAX_BYTES to hold exactly this
burst length. And, this was the first thing I modified when
I was trying to solve my problem.
There's one more associated bug though, probably a result of
the fact that your code was not tested with MAX_BYTES values
other than 16. The two for(;;) cycles for reading/writing
consecutive bursts have a wrong terminal condition: they're
comparing the loop count against MAX_BYTES instead of
(BYTES_PER_PAGE/MAX_BYTES).

With this e-mail, I am enclosing the corrected eeprom.c.

My symptoms looked like this: I read the eeprom just fine.
I did my dirty work on two bytes in the eprom dump and
flashed it back. When I re-read the eprom contents,
I found garbage - or so it seemed.
At a closer look, I found out that every second
half-burst (the second 8 bytes of the 16) was correct and
every first 8 bytes was garbled. (Compared that using two
hex editors open on consoles 1 and 2.)
After a few more  seconds I found out that the two half-bursts
were really identical.
My final explanation is that each 16byte write resulted in
only the first half-burst being overwritten (the second was
left untouched), only the eeprom latched in all 16 bytes
obediently, so that its FIFO overflew and looped around
exactly once, which resulted in the *second* half-burst
being written into the *first* eight bytes...

Based largely on eeprom.c, I've already hacked a simple util
to write only those two or four bytes that matter to me (the
actual battery capacity and the write-protect stuff).

If the battery refurbishment works out, I'll update my website
to report this success, including all my code snippets.
Thanks again :)

Frank Rysanek


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1743 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-05-31 02:37:24 +00:00
Kyosti Malkki
1cfe63804a (Kyösti) Cleanups
Copy sysctl enums to chip drivers from sensors.h for now,
   as seen in drivers included in 2.5 tree. File no longer included
   from kernel side.

   Apply i2c-proc change in CVS tagged -km2.

   Partial clean and sort of includes everywhere.

   Add i2c-dev.h, as a partial copy from i2c.
   Add to sensors.h from i2c-proc.h to compile things.
   Remove i2c-isa.h.

   Reflect header file changes to lib/ and prog/.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1705 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-01-21 20:01:27 +00:00
Mark D. Studebaker
8a39706d54 add -f to help output
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1371 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-05-05 18:03:27 +00:00
Mark D. Studebaker
3a988c72d2 add small eeprom reader/writer from
Christian Vogel <chris@hedonism.cx>;
	combined the Makefile with eepromer.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1360 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-04-29 00:47:41 +00:00
Mark D. Studebaker
9516d4e864 update warnings
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1268 7894878c-1315-0410-8ee3-d5d059ff63e0
2001-12-19 00:32:08 +00:00
Mark D. Studebaker
4d65912f2b add eepromer utility from Daniel Smolik <marvin@sitour.cz>
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1159 7894878c-1315-0410-8ee3-d5d059ff63e0
2001-08-15 02:13:27 +00:00