Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174318
b: refs/heads/master
c: d656b6f
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare committed Dec 9, 2009
1 parent 1ca40dd commit 2686eb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54ecb9e3c194687eebabe7ca45bae889ac1cd4de
refs/heads/master: d656b6fde2531a13c4e68a3ce6b9f12bc19d96bb
13 changes: 9 additions & 4 deletions trunk/drivers/hwmon/adt7475.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#define REG_DEVID 0x3D
#define REG_VENDID 0x3E
#define REG_DEVID2 0x3F

#define REG_STATUS1 0x41
#define REG_STATUS2 0x42
Expand Down Expand Up @@ -1014,18 +1015,22 @@ static int adt7475_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
int vendid, devid;
int vendid, devid, devid2;
const char *name;

if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -ENODEV;

vendid = adt7475_read(REG_VENDID);
devid = adt7475_read(REG_DEVID);
devid2 = adt7475_read(REG_DEVID2);
if (vendid != 0x41 || /* Analog Devices */
(devid2 & 0xf8) != 0x68)
return -ENODEV;

if (vendid == 0x41 && devid == 0x73)
devid = adt7475_read(REG_DEVID);
if (devid == 0x73)
name = "adt7473";
else if (vendid == 0x41 && devid == 0x75 && client->addr == 0x2e)
else if (devid == 0x75 && client->addr == 0x2e)
name = "adt7475";
else {
dev_dbg(&adapter->dev,
Expand Down

0 comments on commit 2686eb5

Please sign in to comment.