mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-07 16:01:34 +00:00
Changes regarding the new i2c_check_addr function
Changes in sensors.c: sensors_detect now skips addresses which are already taken. Even a force parameter can not override this, as it could lead to major problems. For ISA addresses, the same is done; but the client drivers still need a check if they claim more than one ISA address (as all of the current ISA clients do). Changes in chip drivers: Removed the comment about needing address registration Changes in i2cdetect.c: Marks addresses which are already claimed Changes in sensors-detect: Warns when an address is already claimed, and skips it. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@667 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d3441611d6
commit
fd545796ee
17 files changed
+15
-43
No files matched your search
@@ -213,9 +213,6 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address,
|
||||
if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* We need address registration for the I2C bus too. That is not yet
|
||||
implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access adm1021_{read,write}_value. */
|
||||
|
||||
@@ -367,9 +367,6 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address,
|
||||
if (!i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* We need address registration for the I2C bus too. That is not yet
|
||||
implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access adm9240_{read,write}_value. */
|
||||
|
||||
@@ -185,9 +185,6 @@ printk("bt869.o: probing address %d .\n",address);
|
||||
I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access bt869_{read,write}_value. */
|
||||
|
||||
@@ -180,9 +180,6 @@ int eeprom_detect(struct i2c_adapter *adapter, int address,
|
||||
I2C_FUNC_SMBUS_WRITE_WORD_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access eeprom_{read,write}_value. */
|
||||
|
||||
@@ -317,9 +317,6 @@ static int gl518_detect(struct i2c_adapter *adapter, int address,
|
||||
I2C_FUNC_SMBUS_WORD_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* We need address registration for the I2C bus too. That is not yet
|
||||
implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access gl518_{read,write}_value. */
|
||||
|
||||
@@ -312,9 +312,6 @@ static int gl520_detect(struct i2c_adapter *adapter, int address,
|
||||
I2C_FUNC_SMBUS_WORD_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* We need address registration for the I2C bus too. That is not yet
|
||||
implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access gl520_{read,write}_value. */
|
||||
|
||||
@@ -159,9 +159,6 @@ int lm75_detect(struct i2c_adapter *adapter, int address,
|
||||
I2C_FUNC_SMBUS_WORD_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access lm75_{read,write}_value. */
|
||||
|
||||
@@ -319,8 +319,6 @@ int lm78_detect(struct i2c_adapter *adapter, int address,
|
||||
if (!is_isa && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* We need address registration for the I2C bus too. That is not yet
|
||||
implemented. */
|
||||
if (is_isa) {
|
||||
if (check_region(address,LM78_EXTENT))
|
||||
goto ERROR0;
|
||||
|
||||
@@ -310,9 +310,6 @@ int lm80_detect(struct i2c_adapter *adapter, int address,
|
||||
if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access lm80_{read,write}_value. */
|
||||
|
||||
@@ -172,9 +172,6 @@ int ltc1710_detect(struct i2c_adapter *adapter, int address,
|
||||
if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE))
|
||||
goto ERROR0;
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access ltc1710_{read,write}_value. */
|
||||
|
||||
@@ -146,9 +146,6 @@ int matorb_detect(struct i2c_adapter *adapter, int address,
|
||||
goto ERROR0;
|
||||
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access matorb_{read,write}_value. */
|
||||
|
||||
@@ -204,9 +204,6 @@ int thmc50_detect(struct i2c_adapter *adapter, int address,
|
||||
if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* Here, we have to do the address registration check for the I2C bus.
|
||||
But that is not yet implemented. */
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access thmc50_{read,write}_value. */
|
||||
|
||||
@@ -653,8 +653,6 @@ int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
if (!is_isa && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* We need address registration for the I2C bus too. That is not yet
|
||||
implemented. */
|
||||
if (is_isa) {
|
||||
if (check_region(address,W83781D_EXTENT))
|
||||
goto ERROR0;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/ioport.h>
|
||||
|
||||
#include "version.h"
|
||||
#include <linux/i2c.h>
|
||||
@@ -613,6 +614,9 @@ int sensors_detect(struct i2c_adapter *adapter,
|
||||
for (addr = 0x00;
|
||||
addr <= (is_isa?0xffff:0x7f);
|
||||
addr ++) {
|
||||
if ((is_isa && check_region(addr,1)) ||
|
||||
(!is_isa && i2c_check_addr(adapter,addr)))
|
||||
continue;
|
||||
|
||||
/* If it is in one of the force entries, we don't do any detection
|
||||
at all */
|
||||
|
||||
Reference in new issue
Block a user