Skip to content

Commit

Permalink
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
torvalds committed Mar 7, 2013
2 parents 9f22578 + 3e78080 commit cd66acb
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Documentation/hwmon/adm1275
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Supported chips:
Addresses scanned: -
Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
11 changes: 10 additions & 1 deletion Documentation/hwmon/adt7410
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>

Expand All @@ -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
-------------------

Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/jc42
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Supported chips:
Addresses scanned: I2C 0x18 - 0x1f

Author:
Guenter Roeck <[email protected]>
Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/lineage-pem
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Supported devices:
Documentation:
http://www.lineagepower.com/oem/pdf/CPLI2C.pdf

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/lm25066
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Supported chips:
Datasheet:
http://www.national.com/pf/LM/LM5066.html

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
6 changes: 3 additions & 3 deletions Documentation/hwmon/ltc2978
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/ltc4261
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Supported chips:
Datasheet:
http://cds.linear.com/docs/Datasheet/42612fb.pdf

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/max16064
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Supported chips:
Addresses scanned: -
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/max16065
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Supported chips:
http://datasheets.maxim-ic.com/en/ds/MAX16070-MAX16071.pdf


Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/max34440
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Supported chips:
Addresses scanned: -
Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX34461.pdf

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/max8688
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Supported chips:
Addresses scanned: -
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/pmbus
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Supported chips:
Addresses scanned: -
Datasheet: n.a.

Author: Guenter Roeck <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/smm665
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Author: Guenter Roeck <[email protected]>


Module Parameters
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/ucd9000
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/ucd9200
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/zl6100
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Author: Guenter Roeck <[email protected]>


Description
Expand Down
30 changes: 16 additions & 14 deletions drivers/hwmon/pmbus/ltc2978.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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;
Expand All @@ -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:
Expand All @@ -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);
}
Expand Down
8 changes: 7 additions & 1 deletion drivers/hwmon/sht15.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd66acb

Please sign in to comment.