Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174322
b: refs/heads/master
c: d07ca4a
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare committed Dec 9, 2009
1 parent 87e7e2b commit 78fdd25
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 378933c99402f26587ad80e97bff405265116f9e
refs/heads/master: d07ca4ad2f67ebb1bf48a2308a7a0cd81ef8f70a
18 changes: 18 additions & 0 deletions trunk/drivers/hwmon/adt7475.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

/* 7475 Common Registers */

#define REG_DEVREV2 0x12 /* ADT7490 only */

#define REG_VTT 0x1E /* ADT7490 only */
#define REG_EXTEND3 0x1F /* ADT7490 only */

Expand Down Expand Up @@ -1149,6 +1151,12 @@ static void adt7475_remove_files(struct i2c_client *client,
static int adt7475_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
static const char *names[] = {
[adt7473] = "ADT7473",
[adt7475] = "ADT7475",
[adt7490] = "ADT7490",
};

struct adt7475_data *data;
int i, ret = 0, revision;
u8 config3;
Expand All @@ -1165,6 +1173,8 @@ static int adt7475_probe(struct i2c_client *client,
case adt7490:
data->has_voltage = 0x3e; /* in1 to in5 */
revision = adt7475_read(REG_DEVID2) & 0x03;
if (revision == 0x03)
revision += adt7475_read(REG_DEVREV2);
break;
default:
data->has_voltage = 0x06; /* in1, in2 */
Expand Down Expand Up @@ -1234,6 +1244,14 @@ static int adt7475_probe(struct i2c_client *client,
goto eremove;
}

dev_info(&client->dev, "%s device, revision %d\n",
names[id->driver_data], revision);
if ((data->has_voltage & (1 << 0)) || data->has_fan4 || data->has_pwm2)
dev_info(&client->dev, "Optional features:%s%s%s\n",
(data->has_voltage & (1 << 0)) ? " in0" : "",
data->has_fan4 ? " fan4" : "",
data->has_pwm2 ? " pwm2" : "");

return 0;

eremove:
Expand Down

0 comments on commit 78fdd25

Please sign in to comment.