提交 1aa4f925 编写于 作者: R Rafael J. Wysocki

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: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: NZhang Rui <rui.zhang@intel.com>
Reviewed-by: NZhang Rui <rui.zhang@intel.com>
上级 558718f4
...@@ -118,7 +118,7 @@ static int pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd, int trip) ...@@ -118,7 +118,7 @@ static int pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd, int trip)
} }
#endif #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; int nr_trips = 0;
u16 trip_temp; u16 trip_temp;
...@@ -164,13 +164,13 @@ static int pch_wpt_init(struct pch_thermal_device *ptd) ...@@ -164,13 +164,13 @@ static int pch_wpt_init(struct pch_thermal_device *ptd)
return nr_trips + pch_wpt_add_acpi_psv_trip(ptd, nr_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)); return GET_WPT_TEMP(WPT_TEMP_TSR & readw(ptd->hw_base + WPT_TEMP));
} }
/* Cool the PCH when it's overheat in .suspend_noirq phase */ /* 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; u8 tsel;
int pch_delay_cnt = 0; int pch_delay_cnt = 0;
...@@ -237,7 +237,7 @@ static int pch_wpt_suspend(struct pch_thermal_device *ptd) ...@@ -237,7 +237,7 @@ static int pch_wpt_suspend(struct pch_thermal_device *ptd)
return 0; return 0;
} }
static int pch_wpt_resume(struct pch_thermal_device *ptd) static int pch_resume(struct pch_thermal_device *ptd)
{ {
u8 tsel; u8 tsel;
...@@ -258,13 +258,11 @@ struct pch_dev_ops { ...@@ -258,13 +258,11 @@ struct pch_dev_ops {
int (*resume)(struct pch_thermal_device *ptd); int (*resume)(struct pch_thermal_device *ptd);
}; };
static const struct pch_dev_ops pch_dev_ops = {
/* dev ops for Wildcat Point */ .hw_init = pch_hw_init,
static const struct pch_dev_ops pch_dev_ops_wpt = { .get_temp = pch_get_temp,
.hw_init = pch_wpt_init, .suspend = pch_suspend,
.get_temp = pch_wpt_get_temp, .resume = pch_resume,
.suspend = pch_wpt_suspend,
.resume = pch_wpt_resume,
}; };
static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp)
...@@ -301,31 +299,31 @@ static const struct board_info { ...@@ -301,31 +299,31 @@ static const struct board_info {
} board_info[] = { } board_info[] = {
[board_hsw] = { [board_hsw] = {
.name = "pch_haswell", .name = "pch_haswell",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
[board_wpt] = { [board_wpt] = {
.name = "pch_wildcat_point", .name = "pch_wildcat_point",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
[board_skl] = { [board_skl] = {
.name = "pch_skylake", .name = "pch_skylake",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
[board_cnl] = { [board_cnl] = {
.name = "pch_cannonlake", .name = "pch_cannonlake",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
[board_cml] = { [board_cml] = {
.name = "pch_cometlake", .name = "pch_cometlake",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
[board_lwb] = { [board_lwb] = {
.name = "pch_lewisburg", .name = "pch_lewisburg",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
[board_wbg] = { [board_wbg] = {
.name = "pch_wellsburg", .name = "pch_wellsburg",
.ops = &pch_dev_ops_wpt, .ops = &pch_dev_ops,
}, },
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册