x86_pkg_temp_thermal: Fix the thermal zone type
The thermal zone type should not include an instance number. Otherwise each zone is considered a different type and the thermal-to-hwmon bridge fails to group them all in a single hwmon device. I also changed the type to "x86_pkg_temp", because "pkg" was too generic, and other thermal drivers use an underscore, not a dash, as a separator. Or maybe "cpu_pkg_temp" would be better? Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This commit is contained in:
parent
79786880a4
commit
3e4216531c
@ -398,7 +398,6 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
|
|||||||
int err;
|
int err;
|
||||||
u32 tj_max;
|
u32 tj_max;
|
||||||
struct phy_dev_entry *phy_dev_entry;
|
struct phy_dev_entry *phy_dev_entry;
|
||||||
char buffer[30];
|
|
||||||
int thres_count;
|
int thres_count;
|
||||||
u32 eax, ebx, ecx, edx;
|
u32 eax, ebx, ecx, edx;
|
||||||
u8 *temp;
|
u8 *temp;
|
||||||
@ -444,9 +443,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
|
|||||||
phy_dev_entry->first_cpu = cpu;
|
phy_dev_entry->first_cpu = cpu;
|
||||||
phy_dev_entry->tj_max = tj_max;
|
phy_dev_entry->tj_max = tj_max;
|
||||||
phy_dev_entry->ref_cnt = 1;
|
phy_dev_entry->ref_cnt = 1;
|
||||||
snprintf(buffer, sizeof(buffer), "pkg-temp-%d\n",
|
phy_dev_entry->tzone = thermal_zone_device_register("x86_pkg_temp",
|
||||||
phy_dev_entry->phys_proc_id);
|
|
||||||
phy_dev_entry->tzone = thermal_zone_device_register(buffer,
|
|
||||||
thres_count,
|
thres_count,
|
||||||
(thres_count == MAX_NUMBER_OF_TRIPS) ?
|
(thres_count == MAX_NUMBER_OF_TRIPS) ?
|
||||||
0x03 : 0x01,
|
0x03 : 0x01,
|
||||||
|
Loading…
Reference in New Issue
Block a user