From 5215a15ebdf7be038f8fc5c0002a485ea206931a Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 24 Jun 2008 06:31:27 +0000 Subject: [PATCH] Add VIA C7 detection. Patch from Juerg Haefliger. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5289 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/detect/sensors-detect | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/CHANGES b/CHANGES index abdbed9d..b94a576f 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,7 @@ SVN-HEAD Add Dallas DS1631 detection Fix Andigilog aSC7621 support Fix Analog Devices ADT7461 support + Add VIA C7 support 2.10.6 "Welcome Home Lina" (20080306) Library: Fix fschrc and fschmd support diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index fbe149ea..ccc2a900 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -2048,6 +2048,11 @@ use vars qw(@chip_kern24_ids @chip_kern26_ids driver => "to-be-written", detect => sub { intel_amb_detect(); }, }, + { + name => "VIA C7 thermal and voltage sensors", + driver => "c7temp", + detect => sub { c7temp_detect(); }, + }, ); ####################### @@ -5487,6 +5492,21 @@ sub coretemp_detect return; } +# Returns: undef if not detected, (9) if detected. +sub c7temp_detect +{ + my $probecpu; + foreach $probecpu (@cpu) { + if ($probecpu->{'vendor_id'} eq 'CentaurHauls' && + $probecpu->{'cpu family'} == 6 && + ($probecpu->{'model'} == 0xa || + $probecpu->{'model'} == 0xd)) { + return 9; + } + } + return; +} + ################ # MAIN PROGRAM # ################