diff --git a/CHANGES b/CHANGES index 05a4ef02..b638b89d 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ lm_sensors CHANGES file SVN HEAD Library: Add support for the pc87247 driver (fans only) + Module icspll: Delete. It was useless and dangerous. Program sensord: Add pc87247 support (fans only) Program sensors: Add pc87247 support (fans only) Program sensors-detect: Add SMSC DME1737 detection diff --git a/TODO b/TODO index 0ef6e580..cc0105dd 100644 --- a/TODO +++ b/TODO @@ -72,9 +72,6 @@ KERNEL MODULES * maxilife.c: Round REG_TO_VID correctly -* icspll.c: Rewrite. The current implementation simply can't work at all. - It needs i2c-level access (too bad for SMBus-only adapters). - * Support 10-bit addresses. At this moment, they are supported nowhere, except in Simon Vogl's i2c modules. diff --git a/doc/FAQ b/doc/FAQ index 5c129ba1..0030d16a 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -372,8 +372,7 @@ motherboard XYZ: Section 3.2.1. This we have good answers for. * Sorted by Manufacturer: `README' - * Sorted by Manufacturer: - `http://www.lm-sensors.org/wiki/Devices' + * Sorted by Manufacturer: `http://www.lm-sensors.org/wiki/Devices' * Sorted by Sensor Driver: `doc/chips/SUMMARY' @@ -1031,9 +1030,7 @@ manufacturers' IDs are at the bottom of `doc/chips/SUMMARY'. A clock chip. Often, accessing these clock chips in the wrong way will instantly crash your computer. Sensors-detect carefully avoids these -chips. If you really really want to play with your clock chip you can -look at `kernel/chips/icspll.c' in our package. But we do not recommend -it. You have been warned. +chips, and you should do too. You have been warned. 4.23.2 What is at I2C addresses 0x50 - 0x57? -------------------------------------------- @@ -1094,9 +1091,9 @@ Either 3. Check the Motherboard Monitor (http://mbm.livewiredev.com/) website. - When you know what chips you have, check the Newest Driver Status -(http://www.lm-sensors.org/wiki/Devices) web page to see if support -has been added for your chip in a later release or in SVN. + When you know what chips you have, check the Driver Status +(http://www.lm-sensors.org/wiki/Devices) web page to see if support has +been added for your chip in a later release or in SVN. 4.25 Sensors says `Error: Line xxx: zzzzzzz' ============================================ diff --git a/doc/chips/SUMMARY b/doc/chips/SUMMARY index f54a0f85..a46df11b 100644 --- a/doc/chips/SUMMARY +++ b/doc/chips/SUMMARY @@ -282,9 +282,6 @@ eeprom Memory SPD (serial presence detect) eeproms - reads locations only Xeon scratch eeproms - reads locations only -icspll - supported clock chips - reads registers only - ltc1710 ltc1710 two switches only diff --git a/doc/chips/icspll b/doc/chips/icspll deleted file mode 100644 index 5ebab8bb..00000000 --- a/doc/chips/icspll +++ /dev/null @@ -1,104 +0,0 @@ -WARNING: THE CURRENT DRIVER SIMPLY DOES NOT WORK. DO NOT USE. - -ICSPLL Driver -------------- -This is a clock chip reader. -It requires an SMBus interface chip and a clock chip -which supports SMBus block reads. - -Stability ---------- -*** ALPHA - It may hang your SMBus or crash your entire system. *** -*** Using this driver with an unsupported chip or configuration *** -*** is even more likely to hang your SMBus or crash your system. *** - - -AUTODETECTION -------------- -None is possible, these chips do not have ID registers. -Read the full part number on your clock chip and read this -documentation before insmod'ing the icspll module. - - -CHIPS SUPPORTED ---------------- -This driver will only work on clock chips that support the SMBus -block read, which includes a length byte. -The clock chip must be at address 0x69. - -According to ICS, this includes the following chips: - ICS9148-xx (xx > 20) with a serial interface - ICS9248-xx (all xx) with a serial interface - -Other ICS chips DO NOT support SMBus block reads. -Not all 9148/9248 ICS chips have a serial interface. -See http://www.icst.com to get the data sheet for your clock -chip. - -You must have a piix4 or a ali15x3 chip to have this work. -Other bridge chips like the via support I2C -but not SMBus-style block reads. - -Writes are not supported. - - Partial list of supported chips: - ICS: - 9148-32, 9248-81 - PLL: - none? - - -CHIPS NOT SUPPORTED -------------------- -Other ICS chips and PhaseLink Labs (PLL) chips ( http://www.phaselink.com ) -have an I2C serial interface that is not compatible -with SMBus block reads because they do not output a length byte. -However because of a lack of block read support in the I2C package, -this driver won't work with native I2C systems (like the via) -at the moment. - -There may be some PLL chips that support the SMBus length byte, -who knows. - -These chips are compatible with SMBus writes which is why -motherboard designers put them on the SMBus, so that the BIOS -can configure them. -But this driver will not support write-only chips. - - Partial list of unsupported chips: - ICS: - 9148-02, 9148B-04, 9148-08, 9150-01, 9150-04, 9150-11 - PLL: - 52C64-05, 52C64-25, 52C65-02, 52C66-01, 52C66-03, 52C66-10, - 52C66-11, 52C66-28, 52C66-29, 52C66-31, 52C66-38, 52C66-39, - 52C68-02, 52C68-04, 52C69-13, 52C69-15 - - - -/PROC ENTRY ------------ -These chips have up to 7 registers. -They will appear as 7 decimal values when you cat -/proc/sys/dev/sensors/icspll-i2c-*-69/reg0-6. - - -RESULTS -------- -If you try this on a supported configuration, -please report your clock chip, your SMBus chip -(piix4 or ali15x3), and the results of -'cat /proc/sys/dev/sensors/icspll-i2c-*-69/reg0-6' - - -TO DO ------ -Add a chip= parameter so that you know what chip it is. -Put more entries in /proc for the individual fields in the registers. -Native I2C support. -Writes? - - -Author/Maintainer ------------------ -Mark D. Studebaker (mdsxyz123@yahoo.com) - diff --git a/doc/lm_sensors-FAQ.html b/doc/lm_sensors-FAQ.html index 636e6b01..6ceab70a 100644 --- a/doc/lm_sensors-FAQ.html +++ b/doc/lm_sensors-FAQ.html @@ -1576,9 +1576,7 @@ of manufacturers' IDs are at the bottom of doc/chips/SU

A clock chip. Often, accessing these clock chips in the wrong way will instantly crash your computer. Sensors-detect carefully -avoids these chips. If you really really want to play with your clock -chip you can look at kernel/chips/icspll.c in our package. But we -do not recommend it. You have been warned. +avoids these chips, and you should do too. You have been warned.

diff --git a/doc/lm_sensors-FAQ.texi b/doc/lm_sensors-FAQ.texi index 41090f64..55ecc57b 100644 --- a/doc/lm_sensors-FAQ.texi +++ b/doc/lm_sensors-FAQ.texi @@ -1063,9 +1063,7 @@ of manufacturers' IDs are at the bottom of @file{doc/chips/SUMMARY}. A clock chip. Often, accessing these clock chips in the wrong way will instantly crash your computer. Sensors-detect carefully -avoids these chips. If you really really want to play with your clock -chip you can look at @file{kernel/chips/icspll.c} in our package. But we -do not recommend it. You have been warned. +avoids these chips, and you should do too. You have been warned. @anchor{What is at I2C addresses 0x50 - 0x57} diff --git a/kernel/chips/icspll.c b/kernel/chips/icspll.c deleted file mode 100644 index 6c22b506..00000000 --- a/kernel/chips/icspll.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - icspll.c - Part of lm_sensors, Linux kernel modules for hardware - monitoring - Copyright (c) 1998, 1999 Frodo Looijaard , - Philip Edelbrock , - and Mark Studebaker - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -/* - ** WARNING ** - Supports limited combinations of clock chips and busses. - Clock chip must be at address 0x69 - This driver may crash your system. - See doc/chips/icspll for details. -*/ - - -#include -#include -#include -#include -#include -#include "version.h" - -MODULE_LICENSE("GPL"); - -/* Addresses to scan */ -#define ADDRESS 0x69 -static unsigned short normal_i2c[] = { ADDRESS, SENSORS_I2C_END }; -static unsigned short normal_i2c_range[] = { SENSORS_I2C_END }; -static unsigned int normal_isa[] = { SENSORS_ISA_END }; -static unsigned int normal_isa_range[] = { SENSORS_ISA_END }; - -/* Insmod parameters */ -SENSORS_INSMOD_1(icspll); - -#define ICSPLL_SIZE 7 -#define MAXBLOCK_SIZE 32 - -/* Each client has this additional data */ -struct icspll_data { - struct i2c_client client; - int sysctl_id; - struct semaphore update_lock; - char valid; /* !=0 if following fields are valid */ - unsigned long last_updated; /* In jiffies */ - u8 data[ICSPLL_SIZE]; /* Register values */ - int memtype; -}; - -static int icspll_attach_adapter(struct i2c_adapter *adapter); -static int icspll_detach_client(struct i2c_client *client); -static int icspll_detect(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind); - -#if 0 -static int icspll_write_value(struct i2c_client *client, u8 reg, - u16 value); -#endif - -static void icspll_contents(struct i2c_client *client, int operation, - int ctl_name, int *nrels_mag, long *results); -static void icspll_update_client(struct i2c_client *client); - - -/* This is the driver that will be inserted */ -static struct i2c_driver icspll_driver = { - .name = "Clock chip reader", - .id = I2C_DRIVERID_ICSPLL, - .flags = I2C_DF_NOTIFY, - .attach_adapter = icspll_attach_adapter, - .detach_client = icspll_detach_client, -}; - -/* -- SENSORS SYSCTL START -- */ -#define ICSPLL_SYSCTL1 1000 -/* -- SENSORS SYSCTL END -- */ - -/* These files are created for each detected ICSPLL. This is just a template; - though at first sight, you might think we could use a statically - allocated list, we need some way to get back to the parent - which - is done through one of the 'extra' fields which are initialized - when a new copy is allocated. */ -static ctl_table icspll_dir_table_template[] = { - {ICSPLL_SYSCTL1, "reg0-6", NULL, 0, 0444, NULL, &i2c_proc_real, - &i2c_sysctl_real, NULL, &icspll_contents}, - {0} -}; - -/* holding place for data - block read could be as much as 32 */ -static u8 tempdata[MAXBLOCK_SIZE]; - -static int icspll_attach_adapter(struct i2c_adapter *adapter) -{ - return i2c_detect(adapter, &addr_data, icspll_detect); -} - -/* This function is called by i2c_detect */ -int icspll_detect(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind) -{ - int err, i; - struct i2c_client *new_client; - struct icspll_data *data; - - err = 0; - /* Make sure we aren't probing the ISA bus!! */ - if (i2c_is_isa_adapter(adapter)) - return 0; - - if (address != ADDRESS) - return 0; - - if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | - I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { - printk("icspll.o: Adapter does not support SMBus writes and Block reads\n"); - goto ERROR0; - } - - /* Allocate space for a new client structure */ - if (!(data = kmalloc(sizeof(struct icspll_data), GFP_KERNEL))) { - err = -ENOMEM; - goto ERROR0; - } - - /* Fill the new client structure with data */ - new_client = &data->client; - new_client->data = data; - new_client->addr = address; - new_client->adapter = adapter; - new_client->driver = &icspll_driver; - new_client->flags = 0; - strcpy(new_client->name, "Clock chip"); - data->valid = 0; - init_MUTEX(&data->update_lock); - - /* use write-quick for detection */ - if (i2c_smbus_write_quick(new_client, 0x00) < 0) { - printk("icspll.o: No device found at 0x%X\n", address); - goto ERROR1; - } - - /* fill data structure so unknown registers are 0xFF */ - data->data[0] = ICSPLL_SIZE; - for (i = 1; i <= ICSPLL_SIZE; i++) - data->data[i] = 0xFF; - - /* Tell i2c-core a new client has arrived */ - if ((err = i2c_attach_client(new_client))) - goto ERROR2; - - /* Register a new directory entry with module sensors */ - if ((err = i2c_register_entry(new_client, "icspll", - icspll_dir_table_template, - THIS_MODULE)) < 0) - goto ERROR3; - data->sysctl_id = err; - err = 0; - - ERROR3: - i2c_detach_client(new_client); - ERROR2: - ERROR1: - kfree(data); - ERROR0: - return err; -} - -static int icspll_detach_client(struct i2c_client *client) -{ - int err; - - i2c_deregister_entry(((struct icspll_data *) (client->data))-> - sysctl_id); - - if ((err = i2c_detach_client(client))) { - printk - ("icspll.o: Client deregistration failed, client not detached.\n"); - return err; - } - - kfree(client->data); - return 0; -} - - -#if 0 -/* No writes yet (PAE) */ -static int icspll_write_value(struct i2c_client *client, u8 reg, u16 value) -{ - return i2c_smbus_write_block_data(client->adapter, client->addr, - reg, value); -} -#endif - -static void icspll_update_client(struct i2c_client *client) -{ - struct icspll_data *data = client->data; - int i, len; - - down(&data->update_lock); - - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { - - len = - i2c_smbus_read_block_data(client, - 0x00, - tempdata); -#ifdef DEBUG - printk("icspll.o: read returned %d values\n", len); -#endif - if (len > ICSPLL_SIZE) - len = ICSPLL_SIZE; - for (i = 0; i < len; i++) - data->data[i] = tempdata[i]; - - data->last_updated = jiffies; - data->valid = 1; - } - - up(&data->update_lock); -} - - -void icspll_contents(struct i2c_client *client, int operation, - int ctl_name, int *nrels_mag, long *results) -{ - int i; - struct icspll_data *data = client->data; - - if (operation == SENSORS_PROC_REAL_INFO) - *nrels_mag = 0; - else if (operation == SENSORS_PROC_REAL_READ) { - icspll_update_client(client); - for (i = 0; i < ICSPLL_SIZE; i++) { - results[i] = data->data[i]; - } -#ifdef DEBUG - printk("icspll.o: 0x%X ICSPLL Contents: ", client->addr); - for (i = 0; i < ICSPLL_SIZE; i++) { - printk(" 0x%X", data->data[i]); - } - printk(" .\n"); -#endif - *nrels_mag = ICSPLL_SIZE; - } else if (operation == SENSORS_PROC_REAL_WRITE) { - -/* No writes to the ICSPLL (yet, anyway) (PAE) */ - printk("icspll.o: No writes to ICSPLLs supported!\n"); - } -} - -static int __init sm_icspll_init(void) -{ - printk("icspll.o version %s (%s)\n", LM_VERSION, LM_DATE); - return i2c_add_driver(&icspll_driver); -} - -static void __exit sm_icspll_exit(void) -{ - i2c_del_driver(&icspll_driver); -} - - - -MODULE_AUTHOR - ("Frodo Looijaard , Philip Edelbrock , and Mark Studebaker "); -MODULE_DESCRIPTION("ICSPLL driver"); - -module_init(sm_icspll_init); -module_exit(sm_icspll_exit);