summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-01-30 20:00:48 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-02-02 15:40:39 +0100
commit1aa4f925d80c44bd70442a8e94718fc921b8a55f (patch)
tree812025c3ececb9939fe38ad52533303ae394ad9f /drivers/thermal
parent558718f4d3798fa80a9288addc09240910c07df1 (diff)
downloadlinux-1aa4f925d80c44bd70442a8e94718fc921b8a55f.tar.gz
linux-1aa4f925d80c44bd70442a8e94718fc921b8a55f.tar.bz2
linux-1aa4f925d80c44bd70442a8e94718fc921b8a55f.zip
thermal: intel: intel_pch: Rename device operations callbacks
Because the same device operations callbacks are used for all supported boards, they are in fact generic, so rename them to reflect that. Also rename the operations object itself for consistency. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Tested-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/intel/intel_pch_thermal.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 02bd7a048159..b15d1f5fd51e 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -118,7 +118,7 @@ static int pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd, int trip)
}
#endif
-static int pch_wpt_init(struct pch_thermal_device *ptd)
+static int pch_hw_init(struct pch_thermal_device *ptd)
{
int nr_trips = 0;
u16 trip_temp;
@@ -164,13 +164,13 @@ read_trips:
return nr_trips + pch_wpt_add_acpi_psv_trip(ptd, nr_trips);
}
-static int pch_wpt_get_temp(struct pch_thermal_device *ptd)
+static int pch_get_temp(struct pch_thermal_device *ptd)
{
return GET_WPT_TEMP(WPT_TEMP_TSR & readw(ptd->hw_base + WPT_TEMP));
}
/* Cool the PCH when it's overheat in .suspend_noirq phase */
-static int pch_wpt_suspend(struct pch_thermal_device *ptd)
+static int pch_suspend(struct pch_thermal_device *ptd)
{
u8 tsel;
int pch_delay_cnt = 0;
@@ -237,7 +237,7 @@ static int pch_wpt_suspend(struct pch_thermal_device *ptd)
return 0;
}
-static int pch_wpt_resume(struct pch_thermal_device *ptd)
+static int pch_resume(struct pch_thermal_device *ptd)
{
u8 tsel;
@@ -258,13 +258,11 @@ struct pch_dev_ops {
int (*resume)(struct pch_thermal_device *ptd);
};
-
-/* dev ops for Wildcat Point */
-static const struct pch_dev_ops pch_dev_ops_wpt = {
- .hw_init = pch_wpt_init,
- .get_temp = pch_wpt_get_temp,
- .suspend = pch_wpt_suspend,
- .resume = pch_wpt_resume,
+static const struct pch_dev_ops pch_dev_ops = {
+ .hw_init = pch_hw_init,
+ .get_temp = pch_get_temp,
+ .suspend = pch_suspend,
+ .resume = pch_resume,
};
static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp)
@@ -301,31 +299,31 @@ static const struct board_info {
} board_info[] = {
[board_hsw] = {
.name = "pch_haswell",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
[board_wpt] = {
.name = "pch_wildcat_point",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
[board_skl] = {
.name = "pch_skylake",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
[board_cnl] = {
.name = "pch_cannonlake",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
[board_cml] = {
.name = "pch_cometlake",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
[board_lwb] = {
.name = "pch_lewisburg",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
[board_wbg] = {
.name = "pch_wellsburg",
- .ops = &pch_dev_ops_wpt,
+ .ops = &pch_dev_ops,
},
};