Re: [Module] hwmon: GM/GME965 GM45 and more chips IGP thermal report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean,

     Thank you very much for your reply!

2009/10/8 Jean Delvare <khali@xxxxxxxxxxxx>:
> Hi Lu,
> Can you please elaborate about it? Don't you ever plan to get your
> driver included in the kernel tree?

   I am glad to know you think it maybe worth to merge to the kernel
tree. :-)  Thank you again!
Sure, if it can even be merged, I will try to improve it to meet the
need.  Tobias and I had work on this
aim too.

> If your driver won't ever be merged, I admit I am not interested in
> reviewing it. If the plan is to merge it, then I will review it.
>
> I can't test your code, I do not have any supporter piece of hardware,
> sorry.
>
> I've looked at the intel-agp driver, which binds to the same PCI
> devices. It's way too big and complex to resort to the same hack we
> have in sis5595 and i2c-sis5595 for example. The intel-agp driver must
> remain a "real" pci driver which binds to its devices, in particular so
> that power management works OK.
>
> This leaves us with 3 alternatives.
>
> 1* Add hwmon support to the intel-agp driver directly. As this driver
>   is already somewhat big (77 kB) it would probably go unnoticed. The
>   hwmon part in your driver is probably about 350 lines of code.
>
> 2* Implement hwmon as a separate module, simply use pci_get_dev()
>   during initialization of that module, and if a device is found,
>   register a platform driver and instantiate a platform device for the
>   hwmon part. This is essentially what your implementation does,
>   except that your module registers the platform driver and device
>   regardless of the presence of a supported chip, which is bad.
>
> 3* Let intel-agp instantiate the platform device for hwmon, and only
>   register the driver in the separate module. This avoid some code
>   duplication, and we can have the hwmon module auto-load. Maybe the
>   best compromise code-wise, but possibly somewhat more difficult to
>   maintain.
>
> Note that driver auto-loading should also work with option #2, although
> your implementation doesn't do it. It shouldn't be too hard to add.

   Excuse me, I don''t quite catch about "driver auto-loading". Do you
meet gm965temp build-in,
while not as a module?
   Can you give me more hint? And I will try to improve gm965temp. Thanks a lot!

> I don't have a strong opinion between these 3 choices, but I want the
> driver to auto-load as needed.
>
> --
> Jean Delvare
>

The updated sensor-detect patch based on svn code is as following:
---

From: Lu Zhihe <tombowfly@xxxxxxxxx>

Subject: [PATCH] sensors-detect add gm965temp detected for lm-sensors

Signed-off-by: Lu Zhihe <tombowfly@xxxxxxxxx>

---

--- prog/detect/sensors-detect.orig	2009-10-09 21:43:12.000000000 +0000
+++ prog/detect/sensors-detect	2009-10-09 21:50:13.000000000 +0000
@@ -147,6 +147,16 @@ $revision =~ s/ \([^()]*\)//;
 		procid	=> "Intel SCH",
 		driver	=> "i2c-isch",
 	}, {
+		vendid	=> 0x8086,
+		devid	=> 0x2a00,
+		procid	=> "Intel GM965",
+		driver	=> "gm965temp",
+	}, {
+		vendid	=> 0x8086,
+		devid	=> 0x2a10,
+		procid	=> "Intel GME965",
+		driver	=> "gm965temp",
+	}, {
 		vendid	=> 0x1106,
 		devid	=> 0x3040,
 		procid	=> "VIA Technologies VT82C586B Apollo ACPI",
@@ -1860,6 +1870,10 @@ use vars qw(@cpu_ids);
 		driver => "i5k_amb",
 		detect => \&intel_amb_detect,
 	}, {
+		name => "Intel GM/GME965 thermal sensor",
+		driver => "gm965temp",
+		detect => \&intel_gm965_detect,
+	}, {
 		name => "VIA C7 thermal and voltage sensors",
 		driver => "c7temp",
 		detect => \&c7temp_detect,
@@ -5301,6 +5315,15 @@ sub intel_amb_detect
 	return;
 }

+sub intel_gm965_detect
+{
+        if ((exists $pci_list{'8086:2a00'}) ||  # Intel GM965
+            (exists $pci_list{'8086:2a10'})) {  # Intel GME965
+                return 9;
+        }
+        return;
+}
+
 sub coretemp_detect
 {
 	my $probecpu;

---
Thx

Lu Zhihe

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux