Commit Graph
72 Commits
Author SHA1 Message Date
Frodo Looijaard 24e547b88e First round of lm_sensors changes for the new I2C tree
* The i2c package can no longer be compiled as part of the lm_sensors tree
* The archive of the i2c package is removed
* smbus, i2c-dev and i2c-proc modules and headers have been removed; they
  are now completely integrated into the i2c package
* The fake i2c.h header has been removed; this also allowed us to remove
  the ugly LM_SENSORS and TBD defines.
* A new variable I2C_HEADERS is introduced in the Makefile. This allows
  us to install the i2c headers in, for example, /usr/local/include/linux.
* All files now include <linux/i2c.h> instead of "i2c.h" and "smbus.h"

Status: 'make dep' works, all the right include files are found. 'make all'
         does not yet work.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@496 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-07-19 11:45:27 +00:00
Frodo Looijaard 8e98b3c1f6 pci_write_word_united wrote a byte instead :-(
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@494 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-06-23 19:09:09 +00:00
Kyosti Malkki 824dd6c635 (Kyösti) gl518sm driver code updates
* rewrote iteration code for rev 0x00
* fan1 on/off control


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@484 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-06-16 22:16:48 +00:00
Frodo Looijaard 29a33cac35 Several small patches to make everything compile against all 2.0.x
kernels, even early ones.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@477 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-06-09 17:26:32 +00:00
Frodo Looijaard d6056ebb59 Resolved undefined VIA PCI device for 2.0.33 kernels
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@475 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-06-08 19:37:15 +00:00
Frodo Looijaard f1888417ca Bradley M. Keryan's patches to make lm_sensors compile against
2.3.x kernels (x >= 1).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@467 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-06-02 18:19:38 +00:00
Philip Edelbrock dd4ef6c059 (Phil) Beginnings of the Matrix-Orbital driver (based on lm75.c). As it
is right now, it should clear the LCD screen.  But, I discovered that
the display simply can't cope with I2C read commands - it completely
locks up *both* the data and the *clock* lines!  (That's new.) So,
it kills the bus when probes or other reads are done to the device.
Matrix-Orbital has to fix this before we can get anything
usable working.   :'(


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@464 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-14 05:52:20 +00:00
Philip Edelbrock e2eaa8a9a4 (Phil) More bug fixes and test code.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@460 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-12 04:03:22 +00:00
Philip Edelbrock c4b98d9d01 (Phil) NTSC 640x480 and 800x600 output seems to work now (yeah!). They
need these 'special' modelines for XF86Config:

ModeLine "640x480NTSC"   28.195793  640 656 658 784  480 520 525 600
ModeLine "800x600NTSC"   38.769241  800 812 814 880  600 646 649 735

My monitor really doesn't like these modes, but they seem to work well
for TV output.  Oh, and this is only for a screen depth of 16bits
right now.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@459 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-10 05:48:58 +00:00
Philip Edelbrock 3298cde510 (Phil) Expansion and beginning functionality of BT869 driver.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@458 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-10 00:17:39 +00:00
Frodo Looijaard 7cffb0b12a Changed the driver ID of the MAXILIFE, as spotted by Phil
Same IDs could lead to nasty surprises :-(


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@449 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-06 11:08:30 +00:00
Philip Edelbrock 6a83949e74 (Phil) Beginnings of Voodoo3 I2C support and BT869 driver.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@447 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-06 05:12:36 +00:00
Frodo Looijaard 5ffe4834e5 Made i2c-hydra.o 2.0.x kernel compatible
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@442 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-02 21:00:24 +00:00
Frodo Looijaard 1725a864ac ADM9240 and DS1780 sensors program entries
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@437 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-05-01 15:28:49 +00:00
Mark D. Studebaker d70c450c78 Added sensor[1-3] support for w83782d/783s to 'sensors'.
Now prints out what kind of sensor it is.
Also separated alarms for temp2 and temp3 for 782d/783s (they are
a single bit for 781d).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@400 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-20 01:49:51 +00:00
Frodo Looijaard db7cba03ca ADM1021 documentation
The old documentation of Phil is still present at the bottom of the file.
Phil may decide to remove it.

In the driver, file 'status' is renamed to 'alarms' and masked to display
only the alarm bits. This fits more closely with other drivers, and the
remaining bit was not interesting anyway.

I fixed a problem that made insertion of the module impossible (I made a
typo when I introduced the insmod parameters) *** Someone else seems to
have changed this at almost the same moment?!? Now it is correct. ***

The MAX1617 and MAX1617A are now also supported by the library.

Once more, some slight formatting changes are made in the documentation
generators (some columns were made wider).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@395 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-15 22:19:59 +00:00
Frodo Looijaard 3e38c3f87e Completely correct limit handling for the lm78 module
Whatever you cat to /proc/..../lm78-*/*, the result will now always be
sensible. No more overflows resulting in weird values.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@381 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-11 20:38:01 +00:00
Frodo Looijaard cb3131905c Major SIS5595 overhaul
* sis5595.c now understand insmod parameters
* sis5595.c now uses sis5595_ prefix instead of lm78_ prefix
* sis5595.c now supports the correct subset of the LM78 features
            (it only knows about 4 voltages, 2 fans and no vid)
* added SIS5595 defines to sensors.h
* fixed a small problem in compat.h


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@379 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-11 16:12:36 +00:00
Frodo Looijaard 0cf84e8549 Redid the macro trickery to define module parameters automatically.
This new version also creates MODULE_PARM_DESC entries, which describe
what each parameter is used for.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@360 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-04 20:56:30 +00:00
Mark D. Studebaker 3ccf39c7d0 Added sensor[1-3] to 782d/783s to select sensor type.
Added RT table read to 781d but then #undef'ed it since it was just
all 1's. Changed max entries in sensor.c to 32 bytes to handle RT table.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@335 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-23 21:48:19 +00:00
Philip Edelbrock 1ac215f6a1 (Phil) Added Fons Rademakers' <Fons.Rademakers@cern.ch> MaxiLife driver.
I've reviewed and applied the patch, but I would like some others to review
these commits too, to be safe.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@327 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-19 21:11:33 +00:00
Frodo Looijaard b4b1293b25 LM78 insmod parameters and better detection
Supported insmod parameters:
  ignore, ignore_range
  probe, probe_range
  force, force_lm78, force_lm78j, force_lm79

force* overrules ignore* overrules probe*

The *_range parameters need three elements for each specification:
  bus,start_addr,end_addr
The address ranges are inclusive.
The other parameters need two elements for each specification:
  bus,addr
In each case, '-1' stands for 'any I2C bus', and 9191 stands for
'the ISA bus' (Bonus question: who can figure out why I choose 9191?)
In each case, just append if you want several specification, for example:
  insmod lm78 probe=9191,0x2a0,1,0x56

force_* does no detection, not even chip detection; it blindly assumes
you know what you are doing. plain force does the chip detection, but
nothing else; but it can still fail if the register read-out does not
match a chip type.

Detection is done in exactly the same way as sensors-detect, except that
only the range 0x20-0x2f is examined by default. This needs to be
synchronized somehow with the detect script. I would rather scan the whole
I2C address range, but with those clueless PIIX4 hangs when clock chips
are read, that would simply give too much trouble.

The detect script has slightly better ISA detection now, too.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@325 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-19 06:25:02 +00:00
Frodo Looijaard 7e8c43e6b6 Introducing module parameter scanning in sensors.c
It is untested as of yet; but it compiled without problem. Next step: add
support to the chip modules.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@324 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-18 15:32:20 +00:00
Mark D. Studebaker 9d67ffa454 added pwm1-4 for 782d, pwm1-2 for 783s. untested.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@314 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-14 21:53:22 +00:00
Mark D. Studebaker b863fac444 added alarms for 782d in7/in8.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@311 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-14 00:51:40 +00:00
Mark D. Studebaker 5b61f81501 added entries for icspll. Changed union data.block from
[32] to [33] to have enough room for length in block transfer.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@308 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-14 00:37:23 +00:00
Mark D. Studebaker 8e0ff06a22 Initial support for 782d/783s.
Recognize chips, adjust /proc entries.
Added registers for Vbat/V5sb for 782d.
Did quick test that 781d isn't broken.
782d/783s untested, I'll send mail to the guy that volunteered.
No PWM fan support yet.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@297 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-03-09 05:09:53 +00:00
Frodo Looijaard 24792039f6 Adrian's copyright patch applied
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@207 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-02-08 22:50:29 +00:00
Kyosti Malkki 79aed13889 (Kyösti) Support for the sensor hardware in SiS 5595. This has an
integrated LM78, so the driver is only a customized copy of lm78.c
This southbridge can also do i2c, but this not enough documented in
the datasheet. So i2c is currently not supported.

Some cosmetic changes for VIA driver and documentation.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@196 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-02-06 12:04:48 +00:00
Frodo Looijaard 634cb32ac0 Update to the latest (mod-19990118) kernel archive
I really hope I did not forget an add or remove. If strange things happen
when you compile, please let me know.

There may still be problems with the EXPORT_* stuff; it seems to work now
for kernel 2.0.36pre19, but it may give trouble for earlier kernels. We
need to check that.

Some i2c modules may be a bit verbose at this moment.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@184 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-29 13:40:25 +00:00
Frodo Looijaard 065e52c2b1 Changed all isa.h references to i2c-isa.h
vi `find -type f|xargs grep -l isa.h` worked like a charm :-)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@182 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-29 00:17:11 +00:00
Philip Edelbrock b1cb5b860b (Phil) Renamed isa.h to i2c-isa.h. Note: '#include "isa.h"'s need to be
updated.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@181 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-28 22:51:38 +00:00
Frodo Looijaard face12a534 Stuff to get rid of the LM_SENSORS define
Until now, all installed include files depended on a #defined variable
LM_SENSORS: if it was defined, other files were included as "somefile.h"
instead of <linux/somefile.h>. This was clearly dangerous, and is fixed
now, by automatically deleting the offending lines from the include file
when it is installed.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@180 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-28 15:36:01 +00:00
Frodo Looijaard f31a1f45f2 Makefile tweaks for the new kernel directory structure
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@179 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-28 14:45:20 +00:00
Philip Edelbrock bf7943bb69 (Phil) Added adm9240 and adm1021 entries into the lib and added VID
output to ADM9240.  Status/alarms values need to be implemented instead
of a raw output, but I'll do that too.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@173 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-24 00:15:12 +00:00
Frodo Looijaard 50573c910d More i2c-dev fixes
* Made some smbus.h symbols visible in non-kernel mode
* Some i2c-dev.h fixes


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@164 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-13 20:25:21 +00:00
Frodo Looijaard a775db2fcc Completed i2c-dev. Not tested yet.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@160 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-13 19:07:57 +00:00
Frodo Looijaard 1b05c9e1c1 User-space header file added for i2c-dev access
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@159 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-13 16:46:38 +00:00
Frodo Looijaard 81c78982f6 The beginnings of i2c-dev
Everything is in, except the IOCTL hook (which will be pretty simple to add).
It compiles cleanly. It is not tested at all.

Also a very small fix for i2c-proc, and Makefile.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@158 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-13 01:32:09 +00:00
Philip Edelbrock e4051fec67 (Phil) Added a driver for the LTC1710. The LTC1710 is a very simple dual
switch.  It can switch two devices which each consume 300mA at 5V (or less).
This is good for fans, lights, or into relays for heftier stuff.

Here's what the usage looks like:

[root@penn sensors]# ls ltc1710-i2c-1-58/*
ltc1710-i2c-1-58/switch1
ltc1710-i2c-1-58/switch2

[root@penn sensors]# cat ltc1710-i2c-1-58/*
0
0

[root@penn sensors]# echo "1" >  ltc1710-i2c-1-58/switch2
(blue LED turned on)

[root@penn sensors]# cat ltc1710-i2c-1-58/*
0
1

One problem with the device: It doesn't support reads.  It ignores any
read transactions, so even detection with a read won't work.  This
also means that the status of the switches has to be remembered and
can't be polled.

As simple as this device is, it is one of the few which actually
allows the computer to send signals OUT into the world to
control something.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@155 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-11 05:20:10 +00:00
Philip Edelbrock ff2c35a40b (Phil) Added driver for ADM9240. It isn't full tested, but it is
mostly there and working.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@154 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-11 03:33:07 +00:00
Philip Edelbrock 899ca67043 (Phil) Added a driver for the Analog Devices ADM1021. The ADM1021 is
basically an expanded LM75.  It can have an external temp probe (in
addition to the internal one), customizable conversion rate (in # of times
per second, depending on power consumption requirements), and
actually has a device-id register for easier/more-certain detecting!

The only strange property is the low-limit.  The low-limit doesn't act
as a Hystersis value like the LM75.  I.e., if the temp falls below it,
it triggers an alarm instead of clearing it.  Strange, ey?  This makes
using the chip for a thermostat control (like for a fan) much harder.
But it *could* be used to turn on a heater to prevent your computer from
freezing. :')

Here's what my output looks like (without a remote sensor. temp's
are the same format as the LM75 [high-limit, low-limit, value]):

[root@penn adm1021-i2c-0-18]# ls -l
total 0
-r--r--r--   1 root     root            0 Jan  9 23:42 die_code
-rw-r--r--   1 root     root            0 Jan  9 23:42 remote_temp
-r--r--r--   1 root     root            0 Jan  9 23:42 status
-rw-r--r--   1 root     root            0 Jan  9 23:42 temp
[root@penn adm1021-i2c-0-18]# cat *
3
60 20 0
76
60 20 24


PS- all temp values in the ADM1021 (limits and readings) are signed
(2's comp) bytes.  So, all readings go from -128 to 127 C (actually,
the docs say it can only reliable sense down to -65), and only
in whole degree increments.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@153 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-10 08:03:43 +00:00
Frodo Looijaard 9248881396 Winbond driver enhancements (untested)
* Force the Winbond into bank 0 before anything else is done
* Copied fan_div patch from lm78.c
* Copied IN_{FROM,TO}_REG patch from lm78.c
* Copied alarms computation bug fix from lm78.c
* Nicer way of managing banks: the bank number to access is now the high
  byte of the (as u16 declared) register number. Only
  w38781d_{read,write}_value needs now to be aware of banks. Also, the
  w38781d_{read,write}_value functions now know that sensors 2 and temp, hyst
  and over registers are word-sized.
* Introduced fan_div for FAN3 and 9-bit temperature readings.
* Made beep file work like the gl518sm one
* Corrected small VID problem (bit 4 was read from the wrong register)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@121 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-26 01:18:58 +00:00
Frodo Looijaard e5249883ec Completed the LM80 driver. Untested.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@115 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-25 19:30:44 +00:00
Frodo Looijaard f3cfdfa7a5 Added 'beep' file for GL518SM chips
This file consists of two numbers: the first is either 0 (global sound
alarm disable) or 1 (enable), the second is in the same encoding as the
'alarm' file and determines for which alarms the speaker will sound.

The new file was added to the module, the library and the sensors application.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@112 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-24 23:17:55 +00:00
Frodo Looijaard 750e0d00aa Slightly better copyright messages, now telling what the file belongs
to.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@96 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-20 17:04:11 +00:00
Philip Edelbrock b47bfd40c2 (Phil) Fixed some bugs in src/eeprom.c and added more stuff
to /prog/eeprom/decode-dimms.pl


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@94 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-20 07:48:16 +00:00
Frodo Looijaard e50c0d6684 Makefile updates
Several, mostly internal, things changed. Most notably, the install
directories are extended (we'll need this to install the new library).
Also, explicit rules for creating .c and .o files are added.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@88 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-18 16:31:56 +00:00
Philip Edelbrock b469d20bf4 (Phil) Added access to 'beep' buzzer control registers via 'beep' file.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@87 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-18 03:15:07 +00:00
Philip Edelbrock 3f4412405e (Phil) Tried to add remote temp sensors support to Winbond driver. My board
doesn't seem to have any sensors (I guess?), or the Windbond PDF is so
convoluted that I haven't understood it enough to get it working (another
good possibility).  Oh, well. It builds and inserts, anyway.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@85 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-12-17 07:29:59 +00:00