Merge tag 'hwmon-for-linus-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:

 - asus_atk0110 driver modified to use new API

 - k10temp supports new CPUs and reports both Tctl and Tdie

 - minor fixes in gpio-fan, ltc2990, fschmd, and mc13783 drivers

* tag 'hwmon-for-linus-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (asus_atk0110) Make use of device managed memory
  hwmon: (asus_atk0110) Replace deprecated device register call
  hwmon: (k10temp) Make function get_raw_temp static
  hwmon: (gpio-fan) Fix "#cooling-cells" property name in bindings
  MAINTAINERS: hwmon: Add Documentation/devicetree/bindings/hwmon
  hwmon: (ltc2990) support all measurement modes
  hwmon: (ltc2990) add devicetree binding
  hwmon: (ltc2990) Fix incorrect conversion of negative temperatures
  hwmon: (core) check parent dev != NULL when chip != NULL
  hwmon: (fschmd) fix typo 'can by' to 'can be'
  hwmon: (k10temp) Display both Tctl and Tdie
  hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs
  hwmon: MC13783: Add uid and die temperature sensor inputs
This commit is contained in:
Linus Torvalds
2018-06-04 11:25:15 -07:00
14 changed files with 394 additions and 152 deletions

View File

@@ -279,8 +279,21 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2;
adc1 = MC13XXX_ADC1_ADEN | MC13XXX_ADC1_ADTRIGIGN | MC13XXX_ADC1_ASC;
if (channel > 7)
/*
* Channels mapped through ADIN7:
* 7 - General purpose ADIN7
* 16 - UID
* 17 - Die temperature
*/
if (channel > 7 && channel < 16) {
adc1 |= MC13XXX_ADC1_ADSEL;
} else if (channel == 16) {
adc0 |= MC13XXX_ADC0_ADIN7SEL_UID;
channel = 7;
} else if (channel == 17) {
adc0 |= MC13XXX_ADC0_ADIN7SEL_DIE;
channel = 7;
}
switch (mode) {
case MC13XXX_ADC_MODE_TS: