Merge branch 'acpi-thermal'

Merge ACPI thermal driver changes are related thermal core changes for
v6.7-rc1:

 - Untangle the initialization and updates of passive and active trip
   points in the ACPI thermal driver (Rafael Wysocki).

 - Reduce code duplication related to the initialization and updates
   of trip points in the ACPI thermal driver (Rafael Wysocki).

 - Use trip pointers for cooling device binding in the ACPI thermal
   driver (Rafael Wysocki).

 - Simplify critical and hot trips representation in the ACPI thermal
   driver (Rafael Wysocki).

* acpi-thermal: (26 commits)
  thermal: trip: Drop lockdep assertion from thermal_zone_trip_id()
  thermal: trip: Remove lockdep assertion from for_each_thermal_trip()
  thermal: core: Drop thermal_zone_device_exec()
  ACPI: thermal: Use thermal_zone_for_each_trip() for updating trips
  ACPI: thermal: Combine passive and active trip update functions
  ACPI: thermal: Move get_active_temp()
  ACPI: thermal: Fix up function header formatting in two places
  ACPI: thermal: Drop list of device ACPI handles from struct acpi_thermal
  ACPI: thermal: Rename structure fields holding temperature in deci-Kelvin
  ACPI: thermal: Drop critical_valid and hot_valid trip flags
  ACPI: thermal: Do not use trip indices for cooling device binding
  ACPI: thermal: Mark uninitialized active trips as invalid
  ACPI: thermal: Merge trip initialization functions
  ACPI: thermal: Collapse trip devices update function wrappers
  ACPI: thermal: Collapse trip devices update functions
  ACPI: thermal: Add device list to struct acpi_thermal_trip
  ACPI: thermal: Fix a small leak in acpi_thermal_add()
  ACPI: thermal: Drop valid flag from struct acpi_thermal_trip
  ACPI: thermal: Drop redundant trip point flags
  ACPI: thermal: Untangle initialization and updates of active trips
  ...
This commit is contained in:
Rafael J. Wysocki 2023-10-23 19:51:26 +02:00
commit 27fa2b6043
4 changed files with 423 additions and 473 deletions

File diff suppressed because it is too large Load Diff

View File

@ -495,25 +495,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
}
EXPORT_SYMBOL_GPL(thermal_zone_device_update);
/**
* thermal_zone_device_exec - Run a callback under the zone lock.
* @tz: Thermal zone.
* @cb: Callback to run.
* @data: Data to pass to the callback.
*/
void thermal_zone_device_exec(struct thermal_zone_device *tz,
void (*cb)(struct thermal_zone_device *,
unsigned long),
unsigned long data)
{
mutex_lock(&tz->lock);
cb(tz, data);
mutex_unlock(&tz->lock);
}
EXPORT_SYMBOL_GPL(thermal_zone_device_exec);
static void thermal_zone_device_check(struct work_struct *work)
{
struct thermal_zone_device *tz = container_of(work, struct

View File

@ -15,8 +15,6 @@ int for_each_thermal_trip(struct thermal_zone_device *tz,
{
int i, ret;
lockdep_assert_held(&tz->lock);
for (i = 0; i < tz->num_trips; i++) {
ret = cb(&tz->trips[i], data);
if (ret)
@ -177,8 +175,6 @@ int thermal_zone_trip_id(struct thermal_zone_device *tz,
{
int i;
lockdep_assert_held(&tz->lock);
for (i = 0; i < tz->num_trips; i++) {
if (&tz->trips[i] == trip)
return i;

View File

@ -339,10 +339,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *);
void thermal_zone_device_update(struct thermal_zone_device *,
enum thermal_notify_event);
void thermal_zone_device_exec(struct thermal_zone_device *tz,
void (*cb)(struct thermal_zone_device *,
unsigned long),
unsigned long data);
struct thermal_cooling_device *thermal_cooling_device_register(const char *,
void *, const struct thermal_cooling_device_ops *);