hwmon fixes for v5.7-rc2

pmbus/isl68137:
     Fix up chip IDs
 drivetemp:
     Return -ENODATA for invalid temperatures
     Use true module name
 k10temp:
     Fix static symbol warnings
 jc42:
     Use valid hwmon device name
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAl6bNhcACgkQyx8mb86f
 mYEGBA//b+6NN4aMBRbZjv0SHS/tl8pgu1moBrSjq5tlMSSA/yQAf+pIiIP5+qs8
 EoZh0Ogw4P3L0NaVc6IAs0rz6tBK9LvC982umnRdO6GMk7hbI+38toZQokZvXr+c
 8WB17GsuBh92UaEZpgQyadzCee5KfUM8scXi3VhMQMDRnVnzVAlRdi97rWvnFsmQ
 qFvNn57Qy6DWzP3ou4AU/uHFVmR6nfXHdTcIOwIyORxsQOGSdsKekimt3MVbv8b4
 zmDC55z6Ld5fH+lKvjPhady7Eqne8COkQIbT6plvwVbuqUp0O04PK+hBpkuSI3q0
 9H4PEhWLMmjRk2HMf5p9HdfcRSSQftUbfjgBx1g2R+nGn5aAc/0ZkY9mAm9N9tcS
 ciQTxKLBm7Cq9lTJgjHzmhT4ujghLpbi0yGRXZd3CsgRl2say8+ZvF0SodufqP0m
 JNhEEWWgGOJjbmu7R2iVTpXGtDcKnWRJTwZETZXvHgIwWc572sAnCqJyt7buuhDh
 Ck8rIvJn9UeeCWDZRuu2msbsZ43evEakFzmkf9ffwNj/ZYgajy9ZcfPIbPlIFyDg
 /z/XRtdGHJoIUmXbXJGgMrYP5FhsC9UId7eAIACm2p1SLB+pFTGfXfveefzJKklt
 jf31TuGZYpLNQm5DEoufqxt42eBUpPlz7sf6Pc6kQXOhYAg6WPo=
 =gfMJ
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2020-04-18 13:28:09 -07:00
commit eeaa762549
6 changed files with 134 additions and 50 deletions

View File

@ -16,7 +16,7 @@ Supported chips:
* Renesas ISL68220
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl68220'
Addresses scanned: -
@ -26,7 +26,7 @@ Supported chips:
* Renesas ISL68221
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl68221'
Addresses scanned: -
@ -36,7 +36,7 @@ Supported chips:
* Renesas ISL68222
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl68222'
Addresses scanned: -
@ -46,7 +46,7 @@ Supported chips:
* Renesas ISL68223
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl68223'
Addresses scanned: -
@ -56,7 +56,7 @@ Supported chips:
* Renesas ISL68224
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl68224'
Addresses scanned: -
@ -66,7 +66,7 @@ Supported chips:
* Renesas ISL68225
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl68225'
Addresses scanned: -
@ -76,7 +76,7 @@ Supported chips:
* Renesas ISL68226
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl68226'
Addresses scanned: -
@ -86,7 +86,7 @@ Supported chips:
* Renesas ISL68227
Prefix: 'raa_dmpvr2_1rail'
Prefix: 'isl68227'
Addresses scanned: -
@ -96,7 +96,7 @@ Supported chips:
* Renesas ISL68229
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl68229'
Addresses scanned: -
@ -106,7 +106,7 @@ Supported chips:
* Renesas ISL68233
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl68233'
Addresses scanned: -
@ -116,7 +116,7 @@ Supported chips:
* Renesas ISL68239
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl68239'
Addresses scanned: -
@ -126,7 +126,7 @@ Supported chips:
* Renesas ISL69222
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69222'
Addresses scanned: -
@ -136,7 +136,7 @@ Supported chips:
* Renesas ISL69223
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl69223'
Addresses scanned: -
@ -146,7 +146,7 @@ Supported chips:
* Renesas ISL69224
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69224'
Addresses scanned: -
@ -156,7 +156,7 @@ Supported chips:
* Renesas ISL69225
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69225'
Addresses scanned: -
@ -166,7 +166,7 @@ Supported chips:
* Renesas ISL69227
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl69227'
Addresses scanned: -
@ -176,7 +176,7 @@ Supported chips:
* Renesas ISL69228
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl69228'
Addresses scanned: -
@ -186,7 +186,7 @@ Supported chips:
* Renesas ISL69234
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69234'
Addresses scanned: -
@ -196,7 +196,7 @@ Supported chips:
* Renesas ISL69236
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69236'
Addresses scanned: -
@ -206,7 +206,7 @@ Supported chips:
* Renesas ISL69239
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl69239'
Addresses scanned: -
@ -216,7 +216,7 @@ Supported chips:
* Renesas ISL69242
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69242'
Addresses scanned: -
@ -226,7 +226,7 @@ Supported chips:
* Renesas ISL69243
Prefix: 'raa_dmpvr2_1rail'
Prefix: 'isl69243'
Addresses scanned: -
@ -236,7 +236,7 @@ Supported chips:
* Renesas ISL69247
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69247'
Addresses scanned: -
@ -246,7 +246,7 @@ Supported chips:
* Renesas ISL69248
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69248'
Addresses scanned: -
@ -256,7 +256,7 @@ Supported chips:
* Renesas ISL69254
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69254'
Addresses scanned: -
@ -266,7 +266,7 @@ Supported chips:
* Renesas ISL69255
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69255'
Addresses scanned: -
@ -276,7 +276,7 @@ Supported chips:
* Renesas ISL69256
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69256'
Addresses scanned: -
@ -286,7 +286,7 @@ Supported chips:
* Renesas ISL69259
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69259'
Addresses scanned: -
@ -296,7 +296,7 @@ Supported chips:
* Renesas ISL69260
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69260'
Addresses scanned: -
@ -306,7 +306,7 @@ Supported chips:
* Renesas ISL69268
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69268'
Addresses scanned: -
@ -316,7 +316,7 @@ Supported chips:
* Renesas ISL69269
Prefix: 'raa_dmpvr2_3rail'
Prefix: 'isl69269'
Addresses scanned: -
@ -326,7 +326,7 @@ Supported chips:
* Renesas ISL69298
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'isl69298'
Addresses scanned: -
@ -336,7 +336,7 @@ Supported chips:
* Renesas RAA228000
Prefix: 'raa_dmpvr2_hv'
Prefix: 'raa228000'
Addresses scanned: -
@ -346,7 +346,7 @@ Supported chips:
* Renesas RAA228004
Prefix: 'raa_dmpvr2_hv'
Prefix: 'raa228004'
Addresses scanned: -
@ -356,7 +356,7 @@ Supported chips:
* Renesas RAA228006
Prefix: 'raa_dmpvr2_hv'
Prefix: 'raa228006'
Addresses scanned: -
@ -366,7 +366,7 @@ Supported chips:
* Renesas RAA228228
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'raa228228'
Addresses scanned: -
@ -376,7 +376,7 @@ Supported chips:
* Renesas RAA229001
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'raa229001'
Addresses scanned: -
@ -386,7 +386,7 @@ Supported chips:
* Renesas RAA229004
Prefix: 'raa_dmpvr2_2rail'
Prefix: 'raa229004'
Addresses scanned: -

View File

@ -412,7 +412,7 @@ config SENSORS_DRIVETEMP
hard disk drives.
This driver can also be built as a module. If so, the module
will be called satatemp.
will be called drivetemp.
config SENSORS_DS620
tristate "Dallas Semiconductor DS620"

View File

@ -264,12 +264,18 @@ static int drivetemp_get_scttemp(struct drivetemp_data *st, u32 attr, long *val)
return err;
switch (attr) {
case hwmon_temp_input:
if (!temp_is_valid(buf[SCT_STATUS_TEMP]))
return -ENODATA;
*val = temp_from_sct(buf[SCT_STATUS_TEMP]);
break;
case hwmon_temp_lowest:
if (!temp_is_valid(buf[SCT_STATUS_TEMP_LOWEST]))
return -ENODATA;
*val = temp_from_sct(buf[SCT_STATUS_TEMP_LOWEST]);
break;
case hwmon_temp_highest:
if (!temp_is_valid(buf[SCT_STATUS_TEMP_HIGHEST]))
return -ENODATA;
*val = temp_from_sct(buf[SCT_STATUS_TEMP_HIGHEST]);
break;
default:

View File

@ -506,7 +506,7 @@ static int jc42_probe(struct i2c_client *client, const struct i2c_device_id *id)
}
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,
NULL);
return PTR_ERR_OR_ZERO(hwmon_dev);

View File

@ -186,7 +186,7 @@ static long get_raw_temp(struct k10temp_data *data)
return temp;
}
const char *k10temp_temp_label[] = {
static const char *k10temp_temp_label[] = {
"Tctl",
"Tdie",
"Tccd1",
@ -199,12 +199,12 @@ const char *k10temp_temp_label[] = {
"Tccd8",
};
const char *k10temp_in_label[] = {
static const char *k10temp_in_label[] = {
"Vcore",
"Vsoc",
};
const char *k10temp_curr_label[] = {
static const char *k10temp_curr_label[] = {
"Icore",
"Isoc",
};

View File

@ -21,8 +21,50 @@
#define ISL68137_VOUT_AVS 0x30
#define RAA_DMPVR2_READ_VMON 0xc8
enum versions {
enum chips {
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_2rail,
raa_dmpvr2_3rail,
@ -186,7 +228,7 @@ static int isl68137_probe(struct i2c_client *client,
memcpy(info, &raa_dmpvr_info, sizeof(*info));
switch (id->driver_data) {
case isl68137:
case raa_dmpvr1_2rail:
info->pages = 2;
info->R[PSC_VOLTAGE_IN] = 3;
info->func[0] &= ~PMBUS_HAVE_VMON;
@ -224,11 +266,47 @@ static int isl68137_probe(struct i2c_client *client,
}
static const struct i2c_device_id raa_dmpvr_id[] = {
{"isl68137", isl68137},
{"raa_dmpvr2_1rail", raa_dmpvr2_1rail},
{"raa_dmpvr2_2rail", raa_dmpvr2_2rail},
{"raa_dmpvr2_3rail", raa_dmpvr2_3rail},
{"raa_dmpvr2_hv", raa_dmpvr2_hv},
{"isl68137", raa_dmpvr1_2rail},
{"isl68220", raa_dmpvr2_2rail},
{"isl68221", raa_dmpvr2_3rail},
{"isl68222", raa_dmpvr2_2rail},
{"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},
{}
};