diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-10 05:59:54 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-10 05:59:54 +0300 |
commit | 71219b3494a32b5e1f22c4b1a5be2eb0d5524057 (patch) | |
tree | 682f2079dd82f5b929aa550e96a2fd417e135419 /drivers/hwmon/via-cputemp.c | |
parent | c18bb396d3d261ebbb4efbc05129c5d354c541e4 (diff) | |
parent | e3a2d2be510ec8a35ecd2a17a42467d417962bb7 (diff) | |
download | linux-71219b3494a32b5e1f22c4b1a5be2eb0d5524057.tar.xz |
Merge tag 'hwmon-for-linus-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
- added chip support: new Centaur CPUs, ADM1272, NCT6796D
- ucd9000: added debugfs attributes, gpio support
- cleanup and minor bug fixes
* tag 'hwmon-for-linus-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (via-cputemp) support new centaur CPUs
hwmon: (nct6775) Fix writing pwmX_mode
hwmon: (lm92) Add max6635 to lm92_id[]
hwmon: (pmbus/adm1275) Add support for ADM1272
hwmon: (lm92) Do not try to detect MAX6635
hwmon: (ucd9000) Add debugfs attributes to provide mfr_status
hwmon: (ucd9000) Add gpio chip interface
hwmon: (nct6775) Add support for NCT6796D
hwmon: (nct6775) Initialize boolean variables with declaration
hwmon: (nct6775) Improve fan6/pwm6 support
hwmon: (nct6775) Use NUM_FAN consistently
hwmon: (g762) handle cleanup with devm_add_action
hwmon: (sht3x) Update data sheet URL
hwmon: (sht21) Update data sheet URLs
hwmon: (pmbus/adm1275) Accept negative page register values
hwmon: (pmbus/max8688) Accept negative page register values
Diffstat (limited to 'drivers/hwmon/via-cputemp.c')
-rw-r--r-- | drivers/hwmon/via-cputemp.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c index 07a0cb0a1f28..0e81f287d305 100644 --- a/drivers/hwmon/via-cputemp.c +++ b/drivers/hwmon/via-cputemp.c @@ -136,20 +136,24 @@ static int via_cputemp_probe(struct platform_device *pdev) data->id = pdev->id; data->name = "via_cputemp"; - switch (c->x86_model) { - case 0xA: - /* C7 A */ - case 0xD: - /* C7 D */ - data->msr_temp = 0x1169; - data->msr_vid = 0x198; - break; - case 0xF: - /* Nano */ + if (c->x86 == 7) { data->msr_temp = 0x1423; - break; - default: - return -ENODEV; + } else { + switch (c->x86_model) { + case 0xA: + /* C7 A */ + case 0xD: + /* C7 D */ + data->msr_temp = 0x1169; + data->msr_vid = 0x198; + break; + case 0xF: + /* Nano */ + data->msr_temp = 0x1423; + break; + default: + return -ENODEV; + } } /* test if we can access the TEMPERATURE MSR */ @@ -283,6 +287,7 @@ static const struct x86_cpu_id __initconst cputemp_ids[] = { { X86_VENDOR_CENTAUR, 6, 0xa, }, /* C7 A */ { X86_VENDOR_CENTAUR, 6, 0xd, }, /* C7 D */ { X86_VENDOR_CENTAUR, 6, 0xf, }, /* Nano */ + { X86_VENDOR_CENTAUR, 7, X86_MODEL_ANY, }, {} }; MODULE_DEVICE_TABLE(x86cpu, cputemp_ids); |