diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-09 22:27:18 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-10 21:02:17 +0200 |
commit | b429b6ffbdc976d22bdf0b5ba9183c8466209cba (patch) | |
tree | f72a67076cf0d05899d30fa54038dd2b8afd15bd /drivers/thermal/intel/intel_soc_dts_iosf.h | |
parent | thermal/drivers/int340x: Do not check the thermal zone state (diff) | |
download | linux-b429b6ffbdc976d22bdf0b5ba9183c8466209cba.tar.xz linux-b429b6ffbdc976d22bdf0b5ba9183c8466209cba.zip |
thermal: intel: intel_soc_dts_iosf: Always use 2 trips
Both the existing callers of intel_soc_dts_iosf_init() pass 2 as the trip
count argument, so it can be replaced with SOC_MAX_DTS_TRIPS everywhere in
the code and the trip_count argument of that function can be dropped.
This also allows the trip_count field to be dropped from struct
intel_soc_dts_sensor_entry, as it is always equal to 2, and some
related code can be simplified.
Make changes accordingly.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'drivers/thermal/intel/intel_soc_dts_iosf.h')
-rw-r--r-- | drivers/thermal/intel/intel_soc_dts_iosf.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.h b/drivers/thermal/intel/intel_soc_dts_iosf.h index c54945748200..d10902e12592 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.h +++ b/drivers/thermal/intel/intel_soc_dts_iosf.h @@ -12,6 +12,9 @@ /* DTS0 and DTS 1 */ #define SOC_MAX_DTS_SENSORS 2 +/* Only 2 out of 4 is allowed for OSPM */ +#define SOC_MAX_DTS_TRIPS 2 + enum intel_soc_dts_interrupt_type { INTEL_SOC_DTS_INTERRUPT_NONE, INTEL_SOC_DTS_INTERRUPT_APIC, @@ -26,8 +29,7 @@ struct intel_soc_dts_sensor_entry { int id; u32 store_status; u32 trip_mask; - u32 trip_count; - enum thermal_trip_type trip_types[2]; + enum thermal_trip_type trip_types[SOC_MAX_DTS_TRIPS]; struct thermal_zone_device *tzone; struct intel_soc_dts_sensors *sensors; }; @@ -41,8 +43,7 @@ struct intel_soc_dts_sensors { }; struct intel_soc_dts_sensors *intel_soc_dts_iosf_init( - enum intel_soc_dts_interrupt_type intr_type, int trip_count, - int read_only_trip_count); + enum intel_soc_dts_interrupt_type intr_type, int read_only_trip_count); void intel_soc_dts_iosf_exit(struct intel_soc_dts_sensors *sensors); void intel_soc_dts_iosf_interrupt_handler( struct intel_soc_dts_sensors *sensors); |