#558 Document Thermal Monitoring for GM45/G41

Open
opened 1 month ago by swiftgeek · 0 comments

https://github.com/tbfly/gm965temp/blob/master/gm965temp.c

mirror/WIP fixes: https://gitlab.com/swiftgeek/gm965temp/

Probably needs updating for newest kernels, uses "TR1 - Thermometer Read 1" (GM45)

Anything like that for ICH9M?

i945 (mobile only!) has similar registers (again 2 sensors):

"TR0 - Thermometer Read 0" - but it's not implemented in module yet

Thermal Sensor - D31:F26, but only for setting trip points?

Perhaps a reading could be made by changing "Catastrophic Trip Point" and then reading "Catastrophic Trip Indicator", with bisect algorithm. 2 Sensors are available

Current (unchanged code) compile log

  CC [M]  /tmp/gm965temp/gm965temp.o
/tmp/gm965temp/gm965temp.c:290:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_hwmon_init’
 static int __devinit gm965temp_hwmon_init(struct platform_device *pdev)
                      ^~~~~~~~~~~~~~~~~~~~
/tmp/gm965temp/gm965temp.c:319:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_add’
 static int __devinit gm965temp_add(void)
                      ^~~~~~~~~~~~~
/tmp/gm965temp/gm965temp.c:338:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965_find_registers’
 static int __devinit gm965_find_registers(struct gm965temp_data *data,
                      ^~~~~~~~~~~~~~~~~~~~
/tmp/gm965temp/gm965temp.c:392:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_probe’
 static int __devinit gm965temp_probe(struct platform_device *pdev)
                      ^~~~~~~~~~~~~~~
/tmp/gm965temp/gm965temp.c:446:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_remove’
 static int __devexit gm965temp_remove(struct platform_device *pdev)
                      ^~~~~~~~~~~~~~~~
/tmp/gm965temp/gm965temp.c:464:11: error: ‘gm965temp_probe’ undeclared here (not in a function); did you mean ‘gm965temp_group’?
  .probe = gm965temp_probe,
           ^~~~~~~~~~~~~~~
           gm965temp_group
/tmp/gm965temp/gm965temp.c:465:12: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
  .remove = __devexit_p(gm965temp_remove),
            ^~~~~~~~~~~
/tmp/gm965temp/gm965temp.c:465:24: error: ‘gm965temp_remove’ undeclared here (not in a function); did you mean ‘gm965temp_driver’?
  .remove = __devexit_p(gm965temp_remove),
                        ^~~~~~~~~~~~~~~~
                        gm965temp_driver
/tmp/gm965temp/gm965temp.c: In function ‘gm965temp_init’:
/tmp/gm965temp/gm965temp.c:474:8: error: implicit declaration of function ‘gm965temp_add’; did you mean ‘gm965temp_init’? [-Werror=implicit-function-declaration]
  res = gm965temp_add();
        ^~~~~~~~~~~~~
        gm965temp_init
At top level:
/tmp/gm965temp/gm965temp.c:377:22: warning: ‘chipset_ids’ defined but not used [-Wunused-variable]
 static unsigned long chipset_ids[] = {
                      ^~~~~~~~~~~
In file included from ./include/linux/hwmon-sysfs.h:23,
                 from /tmp/gm965temp/gm965temp.c:29:
./include/linux/device.h:591:26: warning: ‘dev_attr_name’ defined but not used [-Wunused-variable]
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                          ^~~~~~~~~
/tmp/gm965temp/gm965temp.c:99:8: note: in expansion of macro ‘DEVICE_ATTR’
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
        ^~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:310: /tmp/gm965temp/gm965temp.o] Błąd 1
make[1]: *** [Makefile:1517: _module_/tmp/gm965temp] Error 2

Resources that could help with porting code:

Kernel log after changes to make it compile:

[114388.421335] Try pci_get_device devid 0x2a00 failed
[114388.421340] Try pci_get_device devid 0x2a10 failed
[114388.421371] gm965temp gm965temp.0: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().

Another set of resources:

https://github.com/tbfly/gm965temp/blob/master/gm965temp.c mirror/WIP fixes: https://gitlab.com/swiftgeek/gm965temp/ Probably needs updating for newest kernels, uses "TR1 - Thermometer Read 1" (GM45) Anything like that for ICH9M? i945 (mobile only!) has similar registers (again 2 sensors): "TR0 - Thermometer Read 0" - but it's not implemented in module yet Thermal Sensor - D31:F26, but only for setting trip points? Perhaps a reading could be made by changing "Catastrophic Trip Point" and then reading "Catastrophic Trip Indicator", with bisect algorithm. 2 Sensors are available Current (unchanged code) compile log ``` CC [M] /tmp/gm965temp/gm965temp.o /tmp/gm965temp/gm965temp.c:290:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_hwmon_init’ static int __devinit gm965temp_hwmon_init(struct platform_device *pdev) ^~~~~~~~~~~~~~~~~~~~ /tmp/gm965temp/gm965temp.c:319:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_add’ static int __devinit gm965temp_add(void) ^~~~~~~~~~~~~ /tmp/gm965temp/gm965temp.c:338:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965_find_registers’ static int __devinit gm965_find_registers(struct gm965temp_data *data, ^~~~~~~~~~~~~~~~~~~~ /tmp/gm965temp/gm965temp.c:392:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_probe’ static int __devinit gm965temp_probe(struct platform_device *pdev) ^~~~~~~~~~~~~~~ /tmp/gm965temp/gm965temp.c:446:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gm965temp_remove’ static int __devexit gm965temp_remove(struct platform_device *pdev) ^~~~~~~~~~~~~~~~ /tmp/gm965temp/gm965temp.c:464:11: error: ‘gm965temp_probe’ undeclared here (not in a function); did you mean ‘gm965temp_group’? .probe = gm965temp_probe, ^~~~~~~~~~~~~~~ gm965temp_group /tmp/gm965temp/gm965temp.c:465:12: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration] .remove = __devexit_p(gm965temp_remove), ^~~~~~~~~~~ /tmp/gm965temp/gm965temp.c:465:24: error: ‘gm965temp_remove’ undeclared here (not in a function); did you mean ‘gm965temp_driver’? .remove = __devexit_p(gm965temp_remove), ^~~~~~~~~~~~~~~~ gm965temp_driver /tmp/gm965temp/gm965temp.c: In function ‘gm965temp_init’: /tmp/gm965temp/gm965temp.c:474:8: error: implicit declaration of function ‘gm965temp_add’; did you mean ‘gm965temp_init’? [-Werror=implicit-function-declaration] res = gm965temp_add(); ^~~~~~~~~~~~~ gm965temp_init At top level: /tmp/gm965temp/gm965temp.c:377:22: warning: ‘chipset_ids’ defined but not used [-Wunused-variable] static unsigned long chipset_ids[] = { ^~~~~~~~~~~ In file included from ./include/linux/hwmon-sysfs.h:23, from /tmp/gm965temp/gm965temp.c:29: ./include/linux/device.h:591:26: warning: ‘dev_attr_name’ defined but not used [-Wunused-variable] struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) ^~~~~~~~~ /tmp/gm965temp/gm965temp.c:99:8: note: in expansion of macro ‘DEVICE_ATTR’ static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); ^~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:310: /tmp/gm965temp/gm965temp.o] Błąd 1 make[1]: *** [Makefile:1517: _module_/tmp/gm965temp] Error 2 ``` Resources that could help with porting code: * https://elinux.org/Kernel_3.4_to_3.10_porting_guide * https://patchwork.kernel.org/patch/2012501/ Kernel log after changes to make it compile: ``` [114388.421335] Try pci_get_device devid 0x2a00 failed [114388.421340] Try pci_get_device devid 0x2a10 failed [114388.421371] gm965temp gm965temp.0: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). ``` Another set of resources: * https://patchwork.kernel.org/patch/9489743/ * https://patchwork.kernel.org/patch/9821031/ * https://patchwork.kernel.org/patch/9640331/
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.