Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220483
b: refs/heads/master
c: 80646b9
h: refs/heads/master
i:
  220481: 5771546
  220479: 6fe1164
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 28, 2010
1 parent 8332fe3 commit 3214ee8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 86ef4d2fd5921ff0bcfd1c0d88403a08862087bc
refs/heads/master: 80646b95863ba282330d07290c79254c2f002139
13 changes: 10 additions & 3 deletions trunk/drivers/hwmon/w83795.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ MODULE_PARM_DESC(reset, "Set to 1 to reset chip, not recommended");
#define W83795_REG_I2C_ADDR 0xfc
#define W83795_REG_CONFIG 0x01
#define W83795_REG_CONFIG_CONFIG48 0x04
#define W83795_REG_CONFIG_START 0x01

/* Multi-Function Pin Ctrl Registers */
#define W83795_REG_VOLT_CTRL1 0x02
Expand Down Expand Up @@ -1664,12 +1665,18 @@ static const struct sensor_device_attribute_2 sda_single_files[] = {

static void w83795_init_client(struct i2c_client *client)
{
u8 config;

if (reset)
w83795_write(client, W83795_REG_CONFIG, 0x80);

/* Start monitoring */
w83795_write(client, W83795_REG_CONFIG,
w83795_read(client, W83795_REG_CONFIG) | 0x01);
/* Start monitoring if needed */
config = w83795_read(client, W83795_REG_CONFIG);
if (!(config & W83795_REG_CONFIG_START)) {
dev_info(&client->dev, "Enabling monitoring operations\n");
w83795_write(client, W83795_REG_CONFIG,
config | W83795_REG_CONFIG_START);
}
}

static int w83795_get_device_id(struct i2c_client *client)
Expand Down

0 comments on commit 3214ee8

Please sign in to comment.