Commit eeaa7625 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'hwmon-for-v5.7-rc2' of...

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

Pull hwmon fixes from Guenter Roeck:

 - Fix up chip IDs (isl68137)

 - error handling for invalid temperatures and use true module name
   (drivetemp)

 - Fix static symbol warnings (k10temp)

 - Use valid hwmon device name (jc42)

* tag 'hwmon-for-v5.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (jc42) Fix name to have no illegal characters
  hwmon: (k10temp) make some symbols static
  hwmon: (drivetemp) Return -ENODATA for invalid temperatures
  hwmon: (drivetemp) Use drivetemp's true module name in Kconfig section
  hwmon: (pmbus/isl68137) Fix up chip IDs
parents c0d73a86 c843b382
...@@ -16,7 +16,7 @@ Supported chips: ...@@ -16,7 +16,7 @@ Supported chips:
* Renesas ISL68220 * Renesas ISL68220
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl68220'
Addresses scanned: - Addresses scanned: -
...@@ -26,7 +26,7 @@ Supported chips: ...@@ -26,7 +26,7 @@ Supported chips:
* Renesas ISL68221 * Renesas ISL68221
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl68221'
Addresses scanned: - Addresses scanned: -
...@@ -36,7 +36,7 @@ Supported chips: ...@@ -36,7 +36,7 @@ Supported chips:
* Renesas ISL68222 * Renesas ISL68222
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl68222'
Addresses scanned: - Addresses scanned: -
...@@ -46,7 +46,7 @@ Supported chips: ...@@ -46,7 +46,7 @@ Supported chips:
* Renesas ISL68223 * Renesas ISL68223
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl68223'
Addresses scanned: - Addresses scanned: -
...@@ -56,7 +56,7 @@ Supported chips: ...@@ -56,7 +56,7 @@ Supported chips:
* Renesas ISL68224 * Renesas ISL68224
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl68224'
Addresses scanned: - Addresses scanned: -
...@@ -66,7 +66,7 @@ Supported chips: ...@@ -66,7 +66,7 @@ Supported chips:
* Renesas ISL68225 * Renesas ISL68225
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl68225'
Addresses scanned: - Addresses scanned: -
...@@ -76,7 +76,7 @@ Supported chips: ...@@ -76,7 +76,7 @@ Supported chips:
* Renesas ISL68226 * Renesas ISL68226
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl68226'
Addresses scanned: - Addresses scanned: -
...@@ -86,7 +86,7 @@ Supported chips: ...@@ -86,7 +86,7 @@ Supported chips:
* Renesas ISL68227 * Renesas ISL68227
Prefix: 'raa_dmpvr2_1rail' Prefix: 'isl68227'
Addresses scanned: - Addresses scanned: -
...@@ -96,7 +96,7 @@ Supported chips: ...@@ -96,7 +96,7 @@ Supported chips:
* Renesas ISL68229 * Renesas ISL68229
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl68229'
Addresses scanned: - Addresses scanned: -
...@@ -106,7 +106,7 @@ Supported chips: ...@@ -106,7 +106,7 @@ Supported chips:
* Renesas ISL68233 * Renesas ISL68233
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl68233'
Addresses scanned: - Addresses scanned: -
...@@ -116,7 +116,7 @@ Supported chips: ...@@ -116,7 +116,7 @@ Supported chips:
* Renesas ISL68239 * Renesas ISL68239
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl68239'
Addresses scanned: - Addresses scanned: -
...@@ -126,7 +126,7 @@ Supported chips: ...@@ -126,7 +126,7 @@ Supported chips:
* Renesas ISL69222 * Renesas ISL69222
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69222'
Addresses scanned: - Addresses scanned: -
...@@ -136,7 +136,7 @@ Supported chips: ...@@ -136,7 +136,7 @@ Supported chips:
* Renesas ISL69223 * Renesas ISL69223
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl69223'
Addresses scanned: - Addresses scanned: -
...@@ -146,7 +146,7 @@ Supported chips: ...@@ -146,7 +146,7 @@ Supported chips:
* Renesas ISL69224 * Renesas ISL69224
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69224'
Addresses scanned: - Addresses scanned: -
...@@ -156,7 +156,7 @@ Supported chips: ...@@ -156,7 +156,7 @@ Supported chips:
* Renesas ISL69225 * Renesas ISL69225
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69225'
Addresses scanned: - Addresses scanned: -
...@@ -166,7 +166,7 @@ Supported chips: ...@@ -166,7 +166,7 @@ Supported chips:
* Renesas ISL69227 * Renesas ISL69227
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl69227'
Addresses scanned: - Addresses scanned: -
...@@ -176,7 +176,7 @@ Supported chips: ...@@ -176,7 +176,7 @@ Supported chips:
* Renesas ISL69228 * Renesas ISL69228
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl69228'
Addresses scanned: - Addresses scanned: -
...@@ -186,7 +186,7 @@ Supported chips: ...@@ -186,7 +186,7 @@ Supported chips:
* Renesas ISL69234 * Renesas ISL69234
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69234'
Addresses scanned: - Addresses scanned: -
...@@ -196,7 +196,7 @@ Supported chips: ...@@ -196,7 +196,7 @@ Supported chips:
* Renesas ISL69236 * Renesas ISL69236
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69236'
Addresses scanned: - Addresses scanned: -
...@@ -206,7 +206,7 @@ Supported chips: ...@@ -206,7 +206,7 @@ Supported chips:
* Renesas ISL69239 * Renesas ISL69239
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl69239'
Addresses scanned: - Addresses scanned: -
...@@ -216,7 +216,7 @@ Supported chips: ...@@ -216,7 +216,7 @@ Supported chips:
* Renesas ISL69242 * Renesas ISL69242
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69242'
Addresses scanned: - Addresses scanned: -
...@@ -226,7 +226,7 @@ Supported chips: ...@@ -226,7 +226,7 @@ Supported chips:
* Renesas ISL69243 * Renesas ISL69243
Prefix: 'raa_dmpvr2_1rail' Prefix: 'isl69243'
Addresses scanned: - Addresses scanned: -
...@@ -236,7 +236,7 @@ Supported chips: ...@@ -236,7 +236,7 @@ Supported chips:
* Renesas ISL69247 * Renesas ISL69247
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69247'
Addresses scanned: - Addresses scanned: -
...@@ -246,7 +246,7 @@ Supported chips: ...@@ -246,7 +246,7 @@ Supported chips:
* Renesas ISL69248 * Renesas ISL69248
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69248'
Addresses scanned: - Addresses scanned: -
...@@ -256,7 +256,7 @@ Supported chips: ...@@ -256,7 +256,7 @@ Supported chips:
* Renesas ISL69254 * Renesas ISL69254
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69254'
Addresses scanned: - Addresses scanned: -
...@@ -266,7 +266,7 @@ Supported chips: ...@@ -266,7 +266,7 @@ Supported chips:
* Renesas ISL69255 * Renesas ISL69255
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69255'
Addresses scanned: - Addresses scanned: -
...@@ -276,7 +276,7 @@ Supported chips: ...@@ -276,7 +276,7 @@ Supported chips:
* Renesas ISL69256 * Renesas ISL69256
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69256'
Addresses scanned: - Addresses scanned: -
...@@ -286,7 +286,7 @@ Supported chips: ...@@ -286,7 +286,7 @@ Supported chips:
* Renesas ISL69259 * Renesas ISL69259
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69259'
Addresses scanned: - Addresses scanned: -
...@@ -296,7 +296,7 @@ Supported chips: ...@@ -296,7 +296,7 @@ Supported chips:
* Renesas ISL69260 * Renesas ISL69260
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69260'
Addresses scanned: - Addresses scanned: -
...@@ -306,7 +306,7 @@ Supported chips: ...@@ -306,7 +306,7 @@ Supported chips:
* Renesas ISL69268 * Renesas ISL69268
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69268'
Addresses scanned: - Addresses scanned: -
...@@ -316,7 +316,7 @@ Supported chips: ...@@ -316,7 +316,7 @@ Supported chips:
* Renesas ISL69269 * Renesas ISL69269
Prefix: 'raa_dmpvr2_3rail' Prefix: 'isl69269'
Addresses scanned: - Addresses scanned: -
...@@ -326,7 +326,7 @@ Supported chips: ...@@ -326,7 +326,7 @@ Supported chips:
* Renesas ISL69298 * Renesas ISL69298
Prefix: 'raa_dmpvr2_2rail' Prefix: 'isl69298'
Addresses scanned: - Addresses scanned: -
...@@ -336,7 +336,7 @@ Supported chips: ...@@ -336,7 +336,7 @@ Supported chips:
* Renesas RAA228000 * Renesas RAA228000
Prefix: 'raa_dmpvr2_hv' Prefix: 'raa228000'
Addresses scanned: - Addresses scanned: -
...@@ -346,7 +346,7 @@ Supported chips: ...@@ -346,7 +346,7 @@ Supported chips:
* Renesas RAA228004 * Renesas RAA228004
Prefix: 'raa_dmpvr2_hv' Prefix: 'raa228004'
Addresses scanned: - Addresses scanned: -
...@@ -356,7 +356,7 @@ Supported chips: ...@@ -356,7 +356,7 @@ Supported chips:
* Renesas RAA228006 * Renesas RAA228006
Prefix: 'raa_dmpvr2_hv' Prefix: 'raa228006'
Addresses scanned: - Addresses scanned: -
...@@ -366,7 +366,7 @@ Supported chips: ...@@ -366,7 +366,7 @@ Supported chips:
* Renesas RAA228228 * Renesas RAA228228
Prefix: 'raa_dmpvr2_2rail' Prefix: 'raa228228'
Addresses scanned: - Addresses scanned: -
...@@ -376,7 +376,7 @@ Supported chips: ...@@ -376,7 +376,7 @@ Supported chips:
* Renesas RAA229001 * Renesas RAA229001
Prefix: 'raa_dmpvr2_2rail' Prefix: 'raa229001'
Addresses scanned: - Addresses scanned: -
...@@ -386,7 +386,7 @@ Supported chips: ...@@ -386,7 +386,7 @@ Supported chips:
* Renesas RAA229004 * Renesas RAA229004
Prefix: 'raa_dmpvr2_2rail' Prefix: 'raa229004'
Addresses scanned: - Addresses scanned: -
......
...@@ -412,7 +412,7 @@ config SENSORS_DRIVETEMP ...@@ -412,7 +412,7 @@ config SENSORS_DRIVETEMP
hard disk drives. hard disk drives.
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called satatemp. will be called drivetemp.
config SENSORS_DS620 config SENSORS_DS620
tristate "Dallas Semiconductor DS620" tristate "Dallas Semiconductor DS620"
......
...@@ -264,12 +264,18 @@ static int drivetemp_get_scttemp(struct drivetemp_data *st, u32 attr, long *val) ...@@ -264,12 +264,18 @@ static int drivetemp_get_scttemp(struct drivetemp_data *st, u32 attr, long *val)
return err; return err;
switch (attr) { switch (attr) {
case hwmon_temp_input: case hwmon_temp_input:
if (!temp_is_valid(buf[SCT_STATUS_TEMP]))
return -ENODATA;
*val = temp_from_sct(buf[SCT_STATUS_TEMP]); *val = temp_from_sct(buf[SCT_STATUS_TEMP]);
break; break;
case hwmon_temp_lowest: case hwmon_temp_lowest:
if (!temp_is_valid(buf[SCT_STATUS_TEMP_LOWEST]))
return -ENODATA;
*val = temp_from_sct(buf[SCT_STATUS_TEMP_LOWEST]); *val = temp_from_sct(buf[SCT_STATUS_TEMP_LOWEST]);
break; break;
case hwmon_temp_highest: case hwmon_temp_highest:
if (!temp_is_valid(buf[SCT_STATUS_TEMP_HIGHEST]))
return -ENODATA;
*val = temp_from_sct(buf[SCT_STATUS_TEMP_HIGHEST]); *val = temp_from_sct(buf[SCT_STATUS_TEMP_HIGHEST]);
break; break;
default: default:
......
...@@ -506,7 +506,7 @@ static int jc42_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -506,7 +506,7 @@ static int jc42_probe(struct i2c_client *client, const struct i2c_device_id *id)
} }
data->config = config; data->config = config;
hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, hwmon_dev = devm_hwmon_device_register_with_info(dev, "jc42",
data, &jc42_chip_info, data, &jc42_chip_info,
NULL); NULL);
return PTR_ERR_OR_ZERO(hwmon_dev); return PTR_ERR_OR_ZERO(hwmon_dev);
......
...@@ -186,7 +186,7 @@ static long get_raw_temp(struct k10temp_data *data) ...@@ -186,7 +186,7 @@ static long get_raw_temp(struct k10temp_data *data)
return temp; return temp;
} }
const char *k10temp_temp_label[] = { static const char *k10temp_temp_label[] = {
"Tctl", "Tctl",
"Tdie", "Tdie",
"Tccd1", "Tccd1",
...@@ -199,12 +199,12 @@ const char *k10temp_temp_label[] = { ...@@ -199,12 +199,12 @@ const char *k10temp_temp_label[] = {
"Tccd8", "Tccd8",
}; };
const char *k10temp_in_label[] = { static const char *k10temp_in_label[] = {
"Vcore", "Vcore",
"Vsoc", "Vsoc",
}; };
const char *k10temp_curr_label[] = { static const char *k10temp_curr_label[] = {
"Icore", "Icore",
"Isoc", "Isoc",
}; };
......
...@@ -21,8 +21,50 @@ ...@@ -21,8 +21,50 @@
#define ISL68137_VOUT_AVS 0x30 #define ISL68137_VOUT_AVS 0x30
#define RAA_DMPVR2_READ_VMON 0xc8 #define RAA_DMPVR2_READ_VMON 0xc8
enum versions { enum chips {
isl68137, isl68137,
isl68220,
isl68221,
isl68222,
isl68223,
isl68224,
isl68225,
isl68226,
isl68227,
isl68229,
isl68233,
isl68239,
isl69222,
isl69223,
isl69224,
isl69225,
isl69227,
isl69228,
isl69234,
isl69236,
isl69239,
isl69242,
isl69243,
isl69247,
isl69248,
isl69254,
isl69255,
isl69256,
isl69259,
isl69260,
isl69268,
isl69269,
isl69298,
raa228000,
raa228004,
raa228006,
raa228228,
raa229001,
raa229004,
};
enum variants {
raa_dmpvr1_2rail,
raa_dmpvr2_1rail, raa_dmpvr2_1rail,
raa_dmpvr2_2rail, raa_dmpvr2_2rail,
raa_dmpvr2_3rail, raa_dmpvr2_3rail,
...@@ -186,7 +228,7 @@ static int isl68137_probe(struct i2c_client *client, ...@@ -186,7 +228,7 @@ static int isl68137_probe(struct i2c_client *client,
memcpy(info, &raa_dmpvr_info, sizeof(*info)); memcpy(info, &raa_dmpvr_info, sizeof(*info));
switch (id->driver_data) { switch (id->driver_data) {
case isl68137: case raa_dmpvr1_2rail:
info->pages = 2; info->pages = 2;
info->R[PSC_VOLTAGE_IN] = 3; info->R[PSC_VOLTAGE_IN] = 3;
info->func[0] &= ~PMBUS_HAVE_VMON; info->func[0] &= ~PMBUS_HAVE_VMON;
...@@ -224,11 +266,47 @@ static int isl68137_probe(struct i2c_client *client, ...@@ -224,11 +266,47 @@ static int isl68137_probe(struct i2c_client *client,
} }
static const struct i2c_device_id raa_dmpvr_id[] = { static const struct i2c_device_id raa_dmpvr_id[] = {
{"isl68137", isl68137}, {"isl68137", raa_dmpvr1_2rail},
{"raa_dmpvr2_1rail", raa_dmpvr2_1rail}, {"isl68220", raa_dmpvr2_2rail},
{"raa_dmpvr2_2rail", raa_dmpvr2_2rail}, {"isl68221", raa_dmpvr2_3rail},
{"raa_dmpvr2_3rail", raa_dmpvr2_3rail}, {"isl68222", raa_dmpvr2_2rail},
{"raa_dmpvr2_hv", raa_dmpvr2_hv}, {"isl68223", raa_dmpvr2_2rail},
{"isl68224", raa_dmpvr2_3rail},
{"isl68225", raa_dmpvr2_2rail},
{"isl68226", raa_dmpvr2_3rail},
{"isl68227", raa_dmpvr2_1rail},
{"isl68229", raa_dmpvr2_3rail},
{"isl68233", raa_dmpvr2_2rail},
{"isl68239", raa_dmpvr2_3rail},
{"isl69222", raa_dmpvr2_2rail},
{"isl69223", raa_dmpvr2_3rail},
{"isl69224", raa_dmpvr2_2rail},
{"isl69225", raa_dmpvr2_2rail},
{"isl69227", raa_dmpvr2_3rail},
{"isl69228", raa_dmpvr2_3rail},
{"isl69234", raa_dmpvr2_2rail},
{"isl69236", raa_dmpvr2_2rail},
{"isl69239", raa_dmpvr2_3rail},
{"isl69242", raa_dmpvr2_2rail},
{"isl69243", raa_dmpvr2_1rail},
{"isl69247", raa_dmpvr2_2rail},
{"isl69248", raa_dmpvr2_2rail},
{"isl69254", raa_dmpvr2_2rail},
{"isl69255", raa_dmpvr2_2rail},
{"isl69256", raa_dmpvr2_2rail},
{"isl69259", raa_dmpvr2_2rail},
{"isl69260", raa_dmpvr2_2rail},
{"isl69268", raa_dmpvr2_2rail},
{"isl69269", raa_dmpvr2_3rail},
{"isl69298", raa_dmpvr2_2rail},
{"raa228000", raa_dmpvr2_hv},
{"raa228004", raa_dmpvr2_hv},
{"raa228006", raa_dmpvr2_hv},
{"raa228228", raa_dmpvr2_2rail},
{"raa229001", raa_dmpvr2_2rail},
{"raa229004", raa_dmpvr2_2rail},
{} {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment