lkml.org 
[lkml]   [2022]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RFC 2/9] thermal/acpi: Change to a common acpi_thermal_trip structure
Date
Do not differentiate hot, critical, passive and active trip
points. Use a single acpi_thermal_trip structure.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/acpi/thermal.c | 35 ++++++-----------------------------
1 file changed, 6 insertions(+), 29 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index b2e73e45c6d6..9620128f05d2 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -119,36 +119,13 @@ struct acpi_thermal_state_flags {
u8 reserved:6;
};

-struct acpi_thermal_critical {
- struct acpi_thermal_state_flags flags;
- unsigned long temperature;
-};
-
-struct acpi_thermal_hot {
- struct acpi_thermal_state_flags flags;
- unsigned long temperature;
-};
-
-struct acpi_thermal_passive {
+struct acpi_thermal_trip {
struct acpi_thermal_state_flags flags;
+ struct acpi_handle_list devices;
unsigned long temperature;
unsigned long tc1;
unsigned long tc2;
unsigned long tsp;
- struct acpi_handle_list devices;
-};
-
-struct acpi_thermal_active {
- struct acpi_thermal_state_flags flags;
- unsigned long temperature;
- struct acpi_handle_list devices;
-};
-
-struct acpi_thermal_trips {
- struct acpi_thermal_critical critical;
- struct acpi_thermal_hot hot;
- struct acpi_thermal_passive passive;
- struct acpi_thermal_active active[ACPI_THERMAL_MAX_ACTIVE];
};

struct acpi_thermal_flags {
@@ -166,10 +143,10 @@ struct acpi_thermal {
volatile u8 zombie;
struct acpi_thermal_flags flags;
struct acpi_thermal_state state;
- struct acpi_thermal_critical critical;
- struct acpi_thermal_hot hot;
- struct acpi_thermal_passive passive;
- struct acpi_thermal_active active[ACPI_THERMAL_MAX_ACTIVE];
+ struct acpi_thermal_trip critical;
+ struct acpi_thermal_trip hot;
+ struct acpi_thermal_trip passive;
+ struct acpi_thermal_trip active[ACPI_THERMAL_MAX_ACTIVE];
struct acpi_handle_list devices;
struct thermal_zone_device *thermal_zone;
int kelvin_offset; /* in millidegrees */
--
2.34.1
\
 
 \ /
  Last update: 2022-10-04 19:28    [W:0.100 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site