diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-04 20:25:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-04 20:25:15 +0200 |
commit | bef82f812c214bf909834bae7d96d806026e3e79 (patch) | |
tree | 205f94df5318a12e398318f1d753cddb97978fe8 /drivers/mfd | |
parent | Merge tag 'dma-mapping-4.18' of git://git.infradead.org/users/hch/dma-mapping (diff) | |
parent | hwmon: (asus_atk0110) Make use of device managed memory (diff) | |
download | linux-bef82f812c214bf909834bae7d96d806026e3e79.tar.xz linux-bef82f812c214bf909834bae7d96d806026e3e79.zip |
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
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mc13xxx-core.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index d7f54e492aa6..c63e331738c1 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -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: |