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 branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

Pull hwmon subsystem fixes from Jean Delvare.

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (ntc_thermistor) Fix OF device ID mapping
hwmon: (ntc_thermistor) Fix dependencies
hwmon: Document temp[1-*]_min_hyst sysfs attribute

+24 -7
+14
Documentation/hwmon/sysfs-interface
··· 327 327 from the max value. 328 328 RW 329 329 330 + temp[1-*]_min_hyst 331 + Temperature hysteresis value for min limit. 332 + Unit: millidegree Celsius 333 + Must be reported as an absolute temperature, NOT a delta 334 + from the min value. 335 + RW 336 + 330 337 temp[1-*]_input Temperature input value. 331 338 Unit: millidegree Celsius 332 339 RO ··· 367 360 temp[1-*]_lcrit Temperature critical min value, typically lower than 368 361 corresponding temp_min values. 369 362 Unit: millidegree Celsius 363 + RW 364 + 365 + temp[1-*]_lcrit_hyst 366 + Temperature hysteresis value for critical min limit. 367 + Unit: millidegree Celsius 368 + Must be reported as an absolute temperature, NOT a delta 369 + from the critical min value. 370 370 RW 371 371 372 372 temp[1-*]_offset
+1 -1
drivers/hwmon/Kconfig
··· 1053 1053 1054 1054 config SENSORS_NTC_THERMISTOR 1055 1055 tristate "NTC thermistor support" 1056 - depends on (!OF && !IIO) || (OF && IIO) 1056 + depends on !OF || IIO=n || IIO 1057 1057 help 1058 1058 This driver supports NTC thermistors sensor reading and its 1059 1059 interpretation. The driver can also monitor the temperature and
+9 -6
drivers/hwmon/ntc_thermistor.c
··· 44 44 unsigned int ohm; 45 45 }; 46 46 47 + /* Order matters, ntc_match references the entries by index */ 47 48 static const struct platform_device_id ntc_thermistor_id[] = { 48 49 { "ncp15wb473", TYPE_NCPXXWB473 }, 49 50 { "ncp18wb473", TYPE_NCPXXWB473 }, ··· 142 141 char name[PLATFORM_NAME_SIZE]; 143 142 }; 144 143 145 - #ifdef CONFIG_OF 144 + #if defined(CONFIG_OF) && IS_ENABLED(CONFIG_IIO) 146 145 static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata) 147 146 { 148 147 struct iio_channel *channel = pdata->chan; ··· 164 163 165 164 static const struct of_device_id ntc_match[] = { 166 165 { .compatible = "ntc,ncp15wb473", 167 - .data = &ntc_thermistor_id[TYPE_NCPXXWB473] }, 166 + .data = &ntc_thermistor_id[0] }, 168 167 { .compatible = "ntc,ncp18wb473", 169 - .data = &ntc_thermistor_id[TYPE_NCPXXWB473] }, 168 + .data = &ntc_thermistor_id[1] }, 170 169 { .compatible = "ntc,ncp21wb473", 171 - .data = &ntc_thermistor_id[TYPE_NCPXXWB473] }, 170 + .data = &ntc_thermistor_id[2] }, 172 171 { .compatible = "ntc,ncp03wb473", 173 - .data = &ntc_thermistor_id[TYPE_NCPXXWB473] }, 172 + .data = &ntc_thermistor_id[3] }, 174 173 { .compatible = "ntc,ncp15wl333", 175 - .data = &ntc_thermistor_id[TYPE_NCPXXWL333] }, 174 + .data = &ntc_thermistor_id[4] }, 176 175 { }, 177 176 }; 178 177 MODULE_DEVICE_TABLE(of, ntc_match); ··· 223 222 { 224 223 return NULL; 225 224 } 225 + 226 + #define ntc_match NULL 226 227 227 228 static void ntc_iio_channel_release(struct ntc_thermistor_platform_data *pdata) 228 229 { }