linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update
@ 2021-01-22  2:34 Thara Gopinath
  2021-01-22  2:34 ` [PATCH v2 1/3] iwlwifi: mvm: tt: Replace thermal_notify_framework Thara Gopinath
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thara Gopinath @ 2021-01-22  2:34 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, davem, kuba, luciano.coelho
  Cc: linux-wireless, linux-kernel, netdev, linux-pm, amitk, nathan.errera

thermal_notify_framework just updates for a single trip point where as
thermal_zone_device_update does other bookkeeping like updating the
temperature of the thermal zone, running through the list of trip points
and setting the next trip point etc. Since  the later is a more thorough
version of former, replace thermal_notify_framework with
thermal_zone_device_update.

v1->v2:
	- Removed net: wireless: intel: from subject header of Patch 1
	  in the series as per Kalle Valo and added his Acked-by.
	- Introduced Patch 3 removing thermal_notify_framework from
	  thermal documentation.

Thara Gopinath (3):
  net: wireless: intel: iwlwifi: mvm: tt: Replace
    thermal_notify_framework
  drivers: thermal: Remove thermal_notify_framework
  Documentation: driver-api: thermal: Remove thermal_notify_framework
    from documentation

 Documentation/driver-api/thermal/sysfs-api.rst | 12 +-----------
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c    |  4 ++--
 drivers/thermal/thermal_core.c                 | 18 ------------------
 include/linux/thermal.h                        |  4 ----
 4 files changed, 3 insertions(+), 35 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] iwlwifi: mvm: tt: Replace thermal_notify_framework
  2021-01-22  2:34 [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
@ 2021-01-22  2:34 ` Thara Gopinath
  2021-01-22  2:34 ` [PATCH v2 2/3] drivers: thermal: Remove thermal_notify_framework Thara Gopinath
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Thara Gopinath @ 2021-01-22  2:34 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, davem, kuba, luciano.coelho
  Cc: linux-wireless, linux-kernel, netdev, linux-pm, amitk, nathan.errera

thermal_notify_framework just updates for a single trip point where as
thermal_zone_device_update does other bookkeeping like updating the
temperature of the thermal zone and setting the next trip point etc.
Replace thermal_notify_framework with thermal_zone_device_update as the
later is more thorough.

Acked-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---

v1->v2:
	- Removed net: wireless: intel: from subject header of Patch 1
          in the series as per Kalle Valo and added his Acked-by.

 drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index 507625f96dd7..a0c6be03903a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -146,8 +146,8 @@ void iwl_mvm_temp_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
 	if (mvm->tz_device.tzone) {
 		struct iwl_mvm_thermal_device *tz_dev = &mvm->tz_device;
 
-		thermal_notify_framework(tz_dev->tzone,
-					 tz_dev->fw_trips_index[ths_crossed]);
+		thermal_zone_device_update(tz_dev->tzone,
+					   THERMAL_TRIP_VIOLATED);
 	}
 #endif /* CONFIG_THERMAL */
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] drivers: thermal: Remove thermal_notify_framework
  2021-01-22  2:34 [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
  2021-01-22  2:34 ` [PATCH v2 1/3] iwlwifi: mvm: tt: Replace thermal_notify_framework Thara Gopinath
@ 2021-01-22  2:34 ` Thara Gopinath
  2021-01-22  2:34 ` [PATCH v2 3/3] Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation Thara Gopinath
  2021-02-02 14:39 ` [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
  3 siblings, 0 replies; 5+ messages in thread
From: Thara Gopinath @ 2021-01-22  2:34 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, davem, kuba, luciano.coelho
  Cc: linux-wireless, linux-kernel, netdev, linux-pm, amitk, nathan.errera

thermal_notify_framework just updates for a single trip point where as
thermal_zone_device_update does other bookkeeping like updating the
temperature of the thermal zone and setting the next trip point. The only
driver that was using thermal_notify_framework was updated in the previous
patch to use thermal_zone_device_update instead. Since there are no users
for thermal_notify_framework remove it.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---
 drivers/thermal/thermal_core.c | 18 ------------------
 include/linux/thermal.h        |  4 ----
 2 files changed, 22 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 4a291d205d5c..04f7581b70c5 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -575,24 +575,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
 }
 EXPORT_SYMBOL_GPL(thermal_zone_device_update);
 
-/**
- * thermal_notify_framework - Sensor drivers use this API to notify framework
- * @tz:		thermal zone device
- * @trip:	indicates which trip point has been crossed
- *
- * This function handles the trip events from sensor drivers. It starts
- * throttling the cooling devices according to the policy configured.
- * For CRITICAL and HOT trip points, this notifies the respective drivers,
- * and does actual throttling for other trip points i.e ACTIVE and PASSIVE.
- * The throttling policy is based on the configured platform data; if no
- * platform data is provided, this uses the step_wise throttling policy.
- */
-void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
-{
-	handle_thermal_trip(tz, trip);
-}
-EXPORT_SYMBOL_GPL(thermal_notify_framework);
-
 static void thermal_zone_device_check(struct work_struct *work)
 {
 	struct thermal_zone_device *tz = container_of(work, struct
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 31b84404f047..77a0b8d060a5 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -398,7 +398,6 @@ int thermal_zone_get_slope(struct thermal_zone_device *tz);
 int thermal_zone_get_offset(struct thermal_zone_device *tz);
 
 void thermal_cdev_update(struct thermal_cooling_device *);
-void thermal_notify_framework(struct thermal_zone_device *, int);
 int thermal_zone_device_enable(struct thermal_zone_device *tz);
 int thermal_zone_device_disable(struct thermal_zone_device *tz);
 void thermal_zone_device_critical(struct thermal_zone_device *tz);
@@ -446,9 +445,6 @@ static inline int thermal_zone_get_offset(
 
 static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)
 { }
-static inline void thermal_notify_framework(struct thermal_zone_device *tz,
-	int trip)
-{ }
 
 static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
 { return -ENODEV; }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation
  2021-01-22  2:34 [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
  2021-01-22  2:34 ` [PATCH v2 1/3] iwlwifi: mvm: tt: Replace thermal_notify_framework Thara Gopinath
  2021-01-22  2:34 ` [PATCH v2 2/3] drivers: thermal: Remove thermal_notify_framework Thara Gopinath
@ 2021-01-22  2:34 ` Thara Gopinath
  2021-02-02 14:39 ` [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
  3 siblings, 0 replies; 5+ messages in thread
From: Thara Gopinath @ 2021-01-22  2:34 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, davem, kuba, luciano.coelho
  Cc: linux-wireless, linux-kernel, netdev, linux-pm, amitk, nathan.errera

Since thermal_notify_framework is no longer supported/implemented
remove the entry from sysfs-api.rst.
---
 Documentation/driver-api/thermal/sysfs-api.rst | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst
index e7520cb439ac..d5b6ca812873 100644
--- a/Documentation/driver-api/thermal/sysfs-api.rst
+++ b/Documentation/driver-api/thermal/sysfs-api.rst
@@ -743,17 +743,7 @@ This function returns the thermal_instance corresponding to a given
 {thermal_zone, cooling_device, trip_point} combination. Returns NULL
 if such an instance does not exist.
 
-4.3. thermal_notify_framework
------------------------------
-
-This function handles the trip events from sensor drivers. It starts
-throttling the cooling devices according to the policy configured.
-For CRITICAL and HOT trip points, this notifies the respective drivers,
-and does actual throttling for other trip points i.e ACTIVE and PASSIVE.
-The throttling policy is based on the configured platform data; if no
-platform data is provided, this uses the step_wise throttling policy.
-
-4.4. thermal_cdev_update
+4.3. thermal_cdev_update
 ------------------------
 
 This function serves as an arbitrator to set the state of a cooling
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update
  2021-01-22  2:34 [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
                   ` (2 preceding siblings ...)
  2021-01-22  2:34 ` [PATCH v2 3/3] Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation Thara Gopinath
@ 2021-02-02 14:39 ` Thara Gopinath
  3 siblings, 0 replies; 5+ messages in thread
From: Thara Gopinath @ 2021-02-02 14:39 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, davem, kuba, luciano.coelho
  Cc: linux-wireless, linux-kernel, netdev, linux-pm, amitk, nathan.errera



On 1/21/21 9:34 PM, Thara Gopinath wrote:
> thermal_notify_framework just updates for a single trip point where as
> thermal_zone_device_update does other bookkeeping like updating the
> temperature of the thermal zone, running through the list of trip points
> and setting the next trip point etc. Since  the later is a more thorough
> version of former, replace thermal_notify_framework with
> thermal_zone_device_update.

Hi!

Any more comments for this series? Can this be merged, please ?


Warm Regards
Thara
> 
> v1->v2:
> 	- Removed net: wireless: intel: from subject header of Patch 1
> 	  in the series as per Kalle Valo and added his Acked-by.
> 	- Introduced Patch 3 removing thermal_notify_framework from
> 	  thermal documentation.
> 
> Thara Gopinath (3):
>    net: wireless: intel: iwlwifi: mvm: tt: Replace
>      thermal_notify_framework
>    drivers: thermal: Remove thermal_notify_framework
>    Documentation: driver-api: thermal: Remove thermal_notify_framework
>      from documentation
> 
>   Documentation/driver-api/thermal/sysfs-api.rst | 12 +-----------
>   drivers/net/wireless/intel/iwlwifi/mvm/tt.c    |  4 ++--
>   drivers/thermal/thermal_core.c                 | 18 ------------------
>   include/linux/thermal.h                        |  4 ----
>   4 files changed, 3 insertions(+), 35 deletions(-)
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-02 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22  2:34 [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath
2021-01-22  2:34 ` [PATCH v2 1/3] iwlwifi: mvm: tt: Replace thermal_notify_framework Thara Gopinath
2021-01-22  2:34 ` [PATCH v2 2/3] drivers: thermal: Remove thermal_notify_framework Thara Gopinath
2021-01-22  2:34 ` [PATCH v2 3/3] Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation Thara Gopinath
2021-02-02 14:39 ` [PATCH v2 0/3] thermal: Replace thermal_notify_framework with thermal_zone_device_update Thara Gopinath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).