hwmon.c (9a64e8e0ace51b309fdcff4b4754b3649250382a) | hwmon.c (d6dab7dd123ba6a737e69d89c8cca9c6d9b75aa9) |
---|---|
1/* 2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring 3 * 4 * This file defines the sysfs class "hwmon", for use by sensors drivers. 5 * 6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 70 unchanged lines hidden (view full) --- 79{ 80#if defined CONFIG_X86 && defined CONFIG_PCI 81 struct pci_dev *sb; 82 u16 base; 83 u8 enable; 84 85 /* Open access to 0x295-0x296 on MSI MS-7031 */ 86 sb = pci_get_device(PCI_VENDOR_ID_ATI, 0x436c, NULL); | 1/* 2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring 3 * 4 * This file defines the sysfs class "hwmon", for use by sensors drivers. 5 * 6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 70 unchanged lines hidden (view full) --- 79{ 80#if defined CONFIG_X86 && defined CONFIG_PCI 81 struct pci_dev *sb; 82 u16 base; 83 u8 enable; 84 85 /* Open access to 0x295-0x296 on MSI MS-7031 */ 86 sb = pci_get_device(PCI_VENDOR_ID_ATI, 0x436c, NULL); |
87 if (sb && 88 (sb->subsystem_vendor == 0x1462 && /* MSI */ 89 sb->subsystem_device == 0x0031)) { /* MS-7031 */ | 87 if (sb) { 88 if (sb->subsystem_vendor == 0x1462 && /* MSI */ 89 sb->subsystem_device == 0x0031) { /* MS-7031 */ 90 pci_read_config_byte(sb, 0x48, &enable); 91 pci_read_config_word(sb, 0x64, &base); |
90 | 92 |
91 pci_read_config_byte(sb, 0x48, &enable); 92 pci_read_config_word(sb, 0x64, &base); 93 94 if (base == 0 && !(enable & BIT(2))) { 95 dev_info(&sb->dev, 96 "Opening wide generic port at 0x295\n"); 97 pci_write_config_word(sb, 0x64, 0x295); 98 pci_write_config_byte(sb, 0x48, enable | BIT(2)); | 93 if (base == 0 && !(enable & BIT(2))) { 94 dev_info(&sb->dev, 95 "Opening wide generic port at 0x295\n"); 96 pci_write_config_word(sb, 0x64, 0x295); 97 pci_write_config_byte(sb, 0x48, 98 enable | BIT(2)); 99 } |
99 } | 100 } |
101 pci_dev_put(sb); |
|
100 } 101#endif 102} 103 104static int __init hwmon_init(void) 105{ 106 hwmon_pci_quirks(); 107 --- 20 unchanged lines hidden --- | 102 } 103#endif 104} 105 106static int __init hwmon_init(void) 107{ 108 hwmon_pci_quirks(); 109 --- 20 unchanged lines hidden --- |