[0/5] Add ACPI trip points parser helpers

Message ID 20221212205843.3119407-1-daniel.lezcano@kernel.org
Headers
Series Add ACPI trip points parser helpers |

Message

Daniel Lezcano Dec. 12, 2022, 8:58 p.m. UTC
  Regarding thermal, the ACPI code parsing the trip points is duplicated
inside different Intel drivers. The generic ACPI thermal driver also
duplicates this code.

Those ACPI parsing actions are used to define trip points and these
ones are defined by, and specific to, the backend driver.

The different get_trip_* ops, also very similar between each other,
are using the specific trip point structure to return the requested
trip point information.

From there, there is nothing new, all this can be converted to the
generic trip point.

The first patch provides the functions to parse trip point description
from the ACPI table but based on the generic trip point structure. The
other patches convert the different Intel driver to use the ACPI
functions along with a migration to the generic trip point.

Daniel Lezcano (5):
  thermal/acpi: Add ACPI trip point routines
  thermal/drivers/intel: Use generic trip points for intel_pch
  thermal/drivers/intel: Use generic trip points int340x
  thermal/drivers/intel: Use generic trip points for quark_dts
  thermal/drivers/intel: Use generic trip points for
    processor_thermal_device_pci

 drivers/thermal/Kconfig                       |  13 +
 drivers/thermal/Makefile                      |   1 +
 .../int340x_thermal/int340x_thermal_zone.c    | 175 +++---------
 .../int340x_thermal/int340x_thermal_zone.h    |  10 +-
 .../processor_thermal_device_pci.c            |  53 ++--
 drivers/thermal/intel/intel_pch_thermal.c     |  88 ++-----
 .../thermal/intel/intel_quark_dts_thermal.c   |  45 ++--
 drivers/thermal/thermal_acpi.c                | 249 ++++++++++++++++++
 include/linux/thermal.h                       |  15 ++
 9 files changed, 377 insertions(+), 272 deletions(-)
 create mode 100644 drivers/thermal/thermal_acpi.c
  

Comments

Rafael J. Wysocki Dec. 14, 2022, 2:10 p.m. UTC | #1
On Mon, Dec 12, 2022 at 9:59 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> Regarding thermal, the ACPI code parsing the trip points is duplicated
> inside different Intel drivers. The generic ACPI thermal driver also
> duplicates this code.
>
> Those ACPI parsing actions are used to define trip points and these
> ones are defined by, and specific to, the backend driver.
>
> The different get_trip_* ops, also very similar between each other,
> are using the specific trip point structure to return the requested
> trip point information.
>
> From there, there is nothing new, all this can be converted to the
> generic trip point.
>
> The first patch provides the functions to parse trip point description
> from the ACPI table but based on the generic trip point structure. The
> other patches convert the different Intel driver to use the ACPI
> functions along with a migration to the generic trip point.

First off, please resend this series with CCs to linux-acpi.

Second, what does it depend on?  I think that it depends on the new
material that hasn't been integrated yet, doesn't it?

> Daniel Lezcano (5):
>   thermal/acpi: Add ACPI trip point routines
>   thermal/drivers/intel: Use generic trip points for intel_pch
>   thermal/drivers/intel: Use generic trip points int340x
>   thermal/drivers/intel: Use generic trip points for quark_dts
>   thermal/drivers/intel: Use generic trip points for
>     processor_thermal_device_pci
>
>  drivers/thermal/Kconfig                       |  13 +
>  drivers/thermal/Makefile                      |   1 +
>  .../int340x_thermal/int340x_thermal_zone.c    | 175 +++---------
>  .../int340x_thermal/int340x_thermal_zone.h    |  10 +-
>  .../processor_thermal_device_pci.c            |  53 ++--
>  drivers/thermal/intel/intel_pch_thermal.c     |  88 ++-----
>  .../thermal/intel/intel_quark_dts_thermal.c   |  45 ++--
>  drivers/thermal/thermal_acpi.c                | 249 ++++++++++++++++++
>  include/linux/thermal.h                       |  15 ++
>  9 files changed, 377 insertions(+), 272 deletions(-)
>  create mode 100644 drivers/thermal/thermal_acpi.c
  
Daniel Lezcano Dec. 14, 2022, 2:42 p.m. UTC | #2
On 14/12/2022 15:10, Rafael J. Wysocki wrote:
> On Mon, Dec 12, 2022 at 9:59 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>>
>> Regarding thermal, the ACPI code parsing the trip points is duplicated
>> inside different Intel drivers. The generic ACPI thermal driver also
>> duplicates this code.
>>
>> Those ACPI parsing actions are used to define trip points and these
>> ones are defined by, and specific to, the backend driver.
>>
>> The different get_trip_* ops, also very similar between each other,
>> are using the specific trip point structure to return the requested
>> trip point information.
>>
>>  From there, there is nothing new, all this can be converted to the
>> generic trip point.
>>
>> The first patch provides the functions to parse trip point description
>> from the ACPI table but based on the generic trip point structure. The
>> other patches convert the different Intel driver to use the ACPI
>> functions along with a migration to the generic trip point.
> 
> First off, please resend this series with CCs to linux-acpi.
> 
> Second, what does it depend on?  I think that it depends on the new
> material that hasn't been integrated yet, doesn't it?

Right, I assumed the generic trip points series was in the way to be 
integrated