Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull hwmon fixes from Guenter Roeck:

- Fix ADC access synchronization problem with da9052 driver

- Fix temperature limit and status reporting in nct7904 driver

- Fix drivetemp temperature reporting if SCT is supported but SCT data
tables are not.

* tag 'hwmon-for-v5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (da9052) Synchronize access with mfd
hwmon: (nct7904) Fix incorrect range of temperature limit registers
hwmon: (nct7904) Read all SMI status registers in probe function
hwmon: (drivetemp) Fix SCT support if SCT data tables are not supported

+14 -4
+2 -2
drivers/hwmon/da9052-hwmon.c
··· 244 244 int channel = to_sensor_dev_attr(devattr)->index; 245 245 int ret; 246 246 247 - mutex_lock(&hwmon->hwmon_lock); 247 + mutex_lock(&hwmon->da9052->auxadc_lock); 248 248 ret = __da9052_read_tsi(dev, channel); 249 - mutex_unlock(&hwmon->hwmon_lock); 249 + mutex_unlock(&hwmon->da9052->auxadc_lock); 250 250 251 251 if (ret < 0) 252 252 return ret;
+1 -1
drivers/hwmon/drivetemp.c
··· 346 346 st->have_temp_highest = temp_is_valid(buf[SCT_STATUS_TEMP_HIGHEST]); 347 347 348 348 if (!have_sct_data_table) 349 - goto skip_sct; 349 + goto skip_sct_data; 350 350 351 351 /* Request and read temperature history table */ 352 352 memset(buf, '\0', sizeof(st->smartdata));
+11 -1
drivers/hwmon/nct7904.c
··· 41 41 #define FANCTL_MAX 4 /* Counted from 1 */ 42 42 #define TCPU_MAX 8 /* Counted from 1 */ 43 43 #define TEMP_MAX 4 /* Counted from 1 */ 44 + #define SMI_STS_MAX 10 /* Counted from 1 */ 44 45 45 46 #define VT_ADC_CTRL0_REG 0x20 /* Bank 0 */ 46 47 #define VT_ADC_CTRL1_REG 0x21 /* Bank 0 */ ··· 362 361 struct nct7904_data *data = dev_get_drvdata(dev); 363 362 int ret, temp; 364 363 unsigned int reg1, reg2, reg3; 364 + s8 temps; 365 365 366 366 switch (attr) { 367 367 case hwmon_temp_input: ··· 468 466 469 467 if (ret < 0) 470 468 return ret; 471 - *val = ret * 1000; 469 + temps = ret; 470 + *val = temps * 1000; 472 471 return 0; 473 472 } 474 473 ··· 1010 1007 if (ret < 0) 1011 1008 return ret; 1012 1009 data->fan_mode[i] = ret; 1010 + } 1011 + 1012 + /* Read all of SMI status register to clear alarms */ 1013 + for (i = 0; i < SMI_STS_MAX; i++) { 1014 + ret = nct7904_read_reg(data, BANK_0, SMI_STS1_REG + i); 1015 + if (ret < 0) 1016 + return ret; 1013 1017 } 1014 1018 1015 1019 hwmon_dev =