diff options
author | Aly Hirani <ahirani@nvidia.com> | 2012-11-12 17:40:05 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-11-13 17:55:56 -0800 |
commit | 5f8c048faaa80ee120ff5d41f1f7555d78a37f9a (patch) | |
tree | 9306f60496a7611fe09e92d05920b73296a8e589 /drivers/hwmon | |
parent | e7b718008f8a2dfd313db7fa1366d8f0c34b683e (diff) |
hwmon: INA219: Keep the device in power-down after init
Change the init sequence to reset first and then power-down the INA
Bug 1174904
Change-Id: Ic337e10d9799e21329b08adab3011ba17dea2844
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/163179
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/ina219.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/hwmon/ina219.c b/drivers/hwmon/ina219.c index a06516a65d42..13d31edb83ee 100644 --- a/drivers/hwmon/ina219.c +++ b/drivers/hwmon/ina219.c @@ -525,7 +525,6 @@ static int __devinit ina219_probe(struct i2c_client *client, i2c_set_clientdata(client, data); data->pInfo = client->dev.platform_data; mutex_init(&data->mutex); - power_down_INA219(client); data->state = STOPPED; /* reset ina219 */ err = i2c_smbus_write_word_data(client, INA219_CONFIG, @@ -550,6 +549,13 @@ static int __devinit ina219_probe(struct i2c_client *client, goto exit_remove; } + err = power_down_INA219(client); + if (err < 0) { + dev_err(&client->dev, "ina219 power-down failure status: 0x%x\n", + err); + goto exit_remove; + } + return 0; exit_remove: |