mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-03 07:45:30 +00:00
(mds) add support for gl523sm (adm1021 clone) to adm1021.c and sensors-detect.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@603 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
2
README
2
README
@@ -37,7 +37,7 @@ At least the following SMBus adapters are supported:
|
|||||||
At least the following hardware sensor chips are supported:
|
At least the following hardware sensor chips are supported:
|
||||||
National Semicoductor LM75, LM78, LM78-J, LM79. LM80, LM81, and LM84
|
National Semicoductor LM75, LM78, LM78-J, LM79. LM80, LM81, and LM84
|
||||||
Winbond W83781D, W83782D, W83783S, and W83627HF
|
Winbond W83781D, W83782D, W83783S, and W83627HF
|
||||||
Genesys Logic GL518SM (several revisions)
|
Genesys Logic GL518SM (several revisions), GL523SM
|
||||||
Analog Devices ADM1021, ADM1022, and ADM9240
|
Analog Devices ADM1021, ADM1022, and ADM9240
|
||||||
SiS Southbridge (integrated in the chipset; the I2C adapter will also be
|
SiS Southbridge (integrated in the chipset; the I2C adapter will also be
|
||||||
supported in the near future)
|
supported in the near future)
|
||||||
|
@@ -38,6 +38,7 @@ Driver Chips #temp #vin #fanin pwm/dac i2c ISA
|
|||||||
adm1021
|
adm1021
|
||||||
adm1021 2 - - - yes no
|
adm1021 2 - - - yes no
|
||||||
lm84 2 - - - yes no
|
lm84 2 - - - yes no
|
||||||
|
gl523sm 2 - - - yes no
|
||||||
max1617 2 - - - yes no
|
max1617 2 - - - yes no
|
||||||
max1617a 2 - - - yes no
|
max1617a 2 - - - yes no
|
||||||
thmc10 2 - - - yes no
|
thmc10 2 - - - yes no
|
||||||
|
@@ -42,7 +42,7 @@ static unsigned int normal_isa[] = {SENSORS_ISA_END};
|
|||||||
static unsigned int normal_isa_range[] = {SENSORS_ISA_END};
|
static unsigned int normal_isa_range[] = {SENSORS_ISA_END};
|
||||||
|
|
||||||
/* Insmod parameters */
|
/* Insmod parameters */
|
||||||
SENSORS_INSMOD_5(adm1021,max1617,max1617a,thmc10,lm84);
|
SENSORS_INSMOD_6(adm1021,max1617,max1617a,thmc10,lm84,gl523sm);
|
||||||
|
|
||||||
/* adm1021 constants specified below */
|
/* adm1021 constants specified below */
|
||||||
|
|
||||||
@@ -250,6 +250,8 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address,
|
|||||||
kind = thmc10;
|
kind = thmc10;
|
||||||
else if (i == 0x00)
|
else if (i == 0x00)
|
||||||
kind = lm84;
|
kind = lm84;
|
||||||
|
else if (i == 0x23)
|
||||||
|
kind = gl523sm;
|
||||||
else if ((i== 0x4d) &&
|
else if ((i== 0x4d) &&
|
||||||
(adm1021_read_value(new_client,ADM1021_REG_DEV_ID) == 0x01))
|
(adm1021_read_value(new_client,ADM1021_REG_DEV_ID) == 0x01))
|
||||||
kind = max1617a;
|
kind = max1617a;
|
||||||
|
@@ -299,6 +299,27 @@ struct sensors_address_data {
|
|||||||
{NULL}}; \
|
{NULL}}; \
|
||||||
SENSORS_INSMOD
|
SENSORS_INSMOD
|
||||||
|
|
||||||
|
#define SENSORS_INSMOD_6(chip1,chip2,chip3,chip4,chip5,chip6) \
|
||||||
|
enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
|
||||||
|
SENSORS_MODULE_PARM(force, \
|
||||||
|
"List of adapter,address pairs to boldly assume " \
|
||||||
|
"to be present"); \
|
||||||
|
SENSORS_MODULE_PARM_FORCE(chip1); \
|
||||||
|
SENSORS_MODULE_PARM_FORCE(chip2); \
|
||||||
|
SENSORS_MODULE_PARM_FORCE(chip3); \
|
||||||
|
SENSORS_MODULE_PARM_FORCE(chip4); \
|
||||||
|
SENSORS_MODULE_PARM_FORCE(chip5); \
|
||||||
|
SENSORS_MODULE_PARM_FORCE(chip6); \
|
||||||
|
static struct sensors_force_data forces[] = {{force,any_chip}, \
|
||||||
|
{force_ ## chip1,chip1}, \
|
||||||
|
{force_ ## chip2,chip2}, \
|
||||||
|
{force_ ## chip3,chip3}, \
|
||||||
|
{force_ ## chip4,chip4}, \
|
||||||
|
{force_ ## chip5,chip5}, \
|
||||||
|
{force_ ## chip6,chip6}, \
|
||||||
|
{NULL}}; \
|
||||||
|
SENSORS_INSMOD
|
||||||
|
|
||||||
typedef int sensors_found_addr_proc (struct i2c_adapter *adapter,
|
typedef int sensors_found_addr_proc (struct i2c_adapter *adapter,
|
||||||
int addr, unsigned short flags,
|
int addr, unsigned short flags,
|
||||||
int kind);
|
int kind);
|
||||||
|
@@ -296,6 +296,12 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect
|
|||||||
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
|
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
|
||||||
i2c_detect => sub { adm1021_detect 4, @_ },
|
i2c_detect => sub { adm1021_detect 4, @_ },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name => "Genesys Logic GL523SM"
|
||||||
|
driver => "adm1021",
|
||||||
|
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
|
||||||
|
i2c_detect => sub { adm1021_detect 5, @_ },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name => "Analog Devices ADM1022",
|
name => "Analog Devices ADM1022",
|
||||||
driver => "thmc50",
|
driver => "thmc50",
|
||||||
@@ -1426,7 +1432,7 @@ sub adm1022_detect
|
|||||||
}
|
}
|
||||||
|
|
||||||
# $_[0]: Chip to detect
|
# $_[0]: Chip to detect
|
||||||
# (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84)
|
# (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84, 5 = GL523)
|
||||||
# $_[1]: A reference to the file descriptor to access this chip.
|
# $_[1]: A reference to the file descriptor to access this chip.
|
||||||
# We may assume an i2c_set_slave_addr was already done.
|
# We may assume an i2c_set_slave_addr was already done.
|
||||||
# $_[2]: Address
|
# $_[2]: Address
|
||||||
@@ -1443,6 +1449,7 @@ sub adm1021_detect
|
|||||||
return if $chip == 0 and i2c_smbus_read_byte_data($file,0xfe) != 0x41;
|
return if $chip == 0 and i2c_smbus_read_byte_data($file,0xfe) != 0x41;
|
||||||
return if $chip == 3 and i2c_smbus_read_byte_data($file,0xfe) != 0x49;
|
return if $chip == 3 and i2c_smbus_read_byte_data($file,0xfe) != 0x49;
|
||||||
return if $chip == 4 and i2c_smbus_read_byte_data($file,0xfe) != 0x00;
|
return if $chip == 4 and i2c_smbus_read_byte_data($file,0xfe) != 0x00;
|
||||||
|
return if $chip == 5 and i2c_smbus_read_byte_data($file,0xfe) != 0x23;
|
||||||
return if $chip == 2 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d and
|
return if $chip == 2 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d and
|
||||||
i2c_smbus_read_byte_data($file,0xff) != 0x01;
|
i2c_smbus_read_byte_data($file,0xff) != 0x01;
|
||||||
# The remaining things are flaky at best. Perhaps something can be done
|
# The remaining things are flaky at best. Perhaps something can be done
|
||||||
|
Reference in New Issue
Block a user