Bug fixes for sht15 and ltc2978 driver plus some documentation updates

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRNh1dAAoJEMsfJm/On5mBuWMP/iKs6uc4V9eXjxwKe49UYrvb
 PbcECb9wNsifAj+8wuZ69SicFHWbt+EtQFEMUx9Nv/GTUs8MqyIzc8xg2XtghSrR
 s7evKc0YLwygAtTpOx04Qn9SlkSpy1i2Kc+YHAQm7yUJ8GbCOW4MNxtu7E7w2hyf
 pQShnbm+Gs0tbXoKTrygSwPiMBOD4ZyRk552FWdx3HidWBWgh+Q1uCyZJonlqlc8
 zVHP+T6SDtwmZWGPdKhU2n9KG1lS5HePi8BwxNiW5SZH3d9/JDensWxueSRwMQLD
 YmlnILMS9Qo/RweD2Lb9mR9OAUzFIu3uOxnfFLHqnqxvAMMfSpCvRDHi95RlAzsk
 b+6DLJjovj6y9UQCfScI++AUNAj4hWcYSqAo8L34OCVqe7cuvEpJFOufpfacOMbj
 Mbx1L/ELFq1zTXreJisCvrPlmp30ghtLxLqsxsR9jKwiuBmq1AoM7urR5RX3hmOV
 h0zzj2xPPibdUmyJs6MX0LWC1uXQwIC8RNvx6wewN7ZqgFF3if2DuNoBo4sKjxY4
 /wOyaisBq/y5c6RN1kiqLsm4DFZPyYvS4CCI7ko5cLzNXk5SM6JLXzlSAmR7dLMe
 9G+1FWynR6UBwbNpMcdFQFtQ1U44hS1duzYJSU6RxPp9kOUER/UTauwBjmblRz44
 j4YQ+rlKXpGPpv9WlyTB
 =LuHP
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon patches from Guenter Roeck:
 "Bug fixes for sht15 and ltc2978 driver plus some documentation
  updates"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (sht15) Check return value of regulator_enable()
  hwmon: (adt7410) Document ADT7420 support
  hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality
  hwmon: (pmbus/ltc2978) Fix peak attribute handling
  hwmon: (pmbus/ltc2978) Update datasheet links
  hwmon: Update my e-mail address in driver documentation
This commit is contained in:
Linus Torvalds 2013-03-07 12:46:25 -08:00
commit cd66acb412
18 changed files with 50 additions and 33 deletions

View file

@ -15,7 +15,7 @@ Supported chips:
Addresses scanned: -
Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -4,9 +4,14 @@ Kernel driver adt7410
Supported chips:
* Analog Devices ADT7410
Prefix: 'adt7410'
Addresses scanned: I2C 0x48 - 0x4B
Addresses scanned: None
Datasheet: Publicly available at the Analog Devices website
http://www.analog.com/static/imported-files/data_sheets/ADT7410.pdf
* Analog Devices ADT7420
Prefix: 'adt7420'
Addresses scanned: None
Datasheet: Publicly available at the Analog Devices website
http://www.analog.com/static/imported-files/data_sheets/ADT7420.pdf
Author: Hartmut Knaack <knaack.h@gmx.de>
@ -27,6 +32,10 @@ value per second or even justget one sample on demand for power saving.
Besides, it can completely power down its ADC, if power management is
required.
The ADT7420 is register compatible, the only differences being the package,
a slightly narrower operating temperature range (-40°C to +150°C), and a
better accuracy (0.25°C instead of 0.50°C.)
Configuration Notes
-------------------

View file

@ -49,7 +49,7 @@ Supported chips:
Addresses scanned: I2C 0x18 - 0x1f
Author:
Guenter Roeck <guenter.roeck@ericsson.com>
Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -8,7 +8,7 @@ Supported devices:
Documentation:
http://www.lineagepower.com/oem/pdf/CPLI2C.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -19,7 +19,7 @@ Supported chips:
Datasheet:
http://www.national.com/pf/LM/LM5066.html
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -5,13 +5,13 @@ Supported chips:
* Linear Technology LTC2978
Prefix: 'ltc2978'
Addresses scanned: -
Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
Datasheet: http://www.linear.com/product/ltc2978
* Linear Technology LTC3880
Prefix: 'ltc3880'
Addresses scanned: -
Datasheet: http://cds.linear.com/docs/Datasheet/3880f.pdf
Datasheet: http://www.linear.com/product/ltc3880
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -8,7 +8,7 @@ Supported chips:
Datasheet:
http://cds.linear.com/docs/Datasheet/42612fb.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -7,7 +7,7 @@ Supported chips:
Addresses scanned: -
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -24,7 +24,7 @@ Supported chips:
http://datasheets.maxim-ic.com/en/ds/MAX16070-MAX16071.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -27,7 +27,7 @@ Supported chips:
Addresses scanned: -
Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX34461.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -7,7 +7,7 @@ Supported chips:
Addresses scanned: -
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -34,7 +34,7 @@ Supported chips:
Addresses scanned: -
Datasheet: n.a.
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -29,7 +29,7 @@ Supported chips:
http://www.summitmicro.com/prod_select/summary/SMM766/SMM766_2086.pdf
http://www.summitmicro.com/prod_select/summary/SMM766B/SMM766B_2122.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Module Parameters

View file

@ -11,7 +11,7 @@ Supported chips:
http://focus.ti.com/lit/ds/symlink/ucd9090.pdf
http://focus.ti.com/lit/ds/symlink/ucd90910.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -15,7 +15,7 @@ Supported chips:
http://focus.ti.com/lit/ds/symlink/ucd9246.pdf
http://focus.ti.com/lit/ds/symlink/ucd9248.pdf
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -54,7 +54,7 @@ http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146401
http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146256
Author: Guenter Roeck <guenter.roeck@ericsson.com>
Author: Guenter Roeck <linux@roeck-us.net>
Description

View file

@ -62,7 +62,7 @@ struct ltc2978_data {
int temp_min, temp_max;
int vout_min[8], vout_max[8];
int iout_max[2];
int temp2_max[2];
int temp2_max;
struct pmbus_driver_info info;
};
@ -204,10 +204,9 @@ static int ltc3880_read_word_data(struct i2c_client *client, int page, int reg)
ret = pmbus_read_word_data(client, page,
LTC3880_MFR_TEMPERATURE2_PEAK);
if (ret >= 0) {
if (lin11_to_val(ret)
> lin11_to_val(data->temp2_max[page]))
data->temp2_max[page] = ret;
ret = data->temp2_max[page];
if (lin11_to_val(ret) > lin11_to_val(data->temp2_max))
data->temp2_max = ret;
ret = data->temp2_max;
}
break;
case PMBUS_VIRT_READ_VIN_MIN:
@ -248,11 +247,11 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,
switch (reg) {
case PMBUS_VIRT_RESET_IOUT_HISTORY:
data->iout_max[page] = 0x7fff;
data->iout_max[page] = 0x7c00;
ret = ltc2978_clear_peaks(client, page, data->id);
break;
case PMBUS_VIRT_RESET_TEMP2_HISTORY:
data->temp2_max[page] = 0x7fff;
data->temp2_max = 0x7c00;
ret = ltc2978_clear_peaks(client, page, data->id);
break;
case PMBUS_VIRT_RESET_VOUT_HISTORY:
@ -262,12 +261,12 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,
break;
case PMBUS_VIRT_RESET_VIN_HISTORY:
data->vin_min = 0x7bff;
data->vin_max = 0;
data->vin_max = 0x7c00;
ret = ltc2978_clear_peaks(client, page, data->id);
break;
case PMBUS_VIRT_RESET_TEMP_HISTORY:
data->temp_min = 0x7bff;
data->temp_max = 0x7fff;
data->temp_max = 0x7c00;
ret = ltc2978_clear_peaks(client, page, data->id);
break;
default:
@ -321,12 +320,13 @@ static int ltc2978_probe(struct i2c_client *client,
info = &data->info;
info->write_word_data = ltc2978_write_word_data;
data->vout_min[0] = 0xffff;
data->vin_min = 0x7bff;
data->vin_max = 0x7c00;
data->temp_min = 0x7bff;
data->temp_max = 0x7fff;
data->temp_max = 0x7c00;
data->temp2_max = 0x7c00;
switch (id->driver_data) {
switch (data->id) {
case ltc2978:
info->read_word_data = ltc2978_read_word_data;
info->pages = 8;
@ -336,7 +336,6 @@ static int ltc2978_probe(struct i2c_client *client,
for (i = 1; i < 8; i++) {
info->func[i] = PMBUS_HAVE_VOUT
| PMBUS_HAVE_STATUS_VOUT;
data->vout_min[i] = 0xffff;
}
break;
case ltc3880:
@ -352,11 +351,14 @@ static int ltc2978_probe(struct i2c_client *client,
| PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
| PMBUS_HAVE_POUT
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
data->vout_min[1] = 0xffff;
data->iout_max[0] = 0x7c00;
data->iout_max[1] = 0x7c00;
break;
default:
return -ENODEV;
}
for (i = 0; i < info->pages; i++)
data->vout_min[i] = 0xffff;
return pmbus_do_probe(client, id, info);
}

View file

@ -965,7 +965,13 @@ static int sht15_probe(struct platform_device *pdev)
if (voltage)
data->supply_uv = voltage;
regulator_enable(data->reg);
ret = regulator_enable(data->reg);
if (ret != 0) {
dev_err(&pdev->dev,
"failed to enable regulator: %d\n", ret);
return ret;
}
/*
* Setup a notifier block to update this if another device
* causes the voltage to change