linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: linux-pm@vger.kernel.org
Cc: linux-wireless@vger.kernel.org, daniel.lezcano@linaro.org,
	andrzej.p@collabora.com, b.zolnierkie@samsung.com,
	luca@coelho.fi, rui.zhang@intel.com
Subject: [PATCH 1/6] iwlwifi: use thermal_zone_device_update() for temperature change
Date: Thu, 30 Apr 2020 14:32:24 +0800	[thread overview]
Message-ID: <20200430063229.6182-2-rui.zhang@intel.com> (raw)
In-Reply-To: <20200430063229.6182-1-rui.zhang@intel.com>

thermal_notify_framework() is an obsolete API, and iwlwifi is the only
user of it.
Convert iwlwifi driver to use thermal_zone_device_update() instead.

Note that, thermal_zone_device_update() is able to handle the crossed
threshold by comparing the current temperature with every trip point, so
ths_crossed variant in iwl_mvm_temp_notif() is probably not needed.
It is still left there in this patch, in case the debug information is
still needed.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index 418e59b..6344b6b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -203,9 +203,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_EVENT_UNSPECIFIED);
 	}
 #endif /* CONFIG_THERMAL */
 }
-- 
2.7.4


  reply	other threads:[~2020-04-30  6:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30  6:32 [PATCH 0/6] thermal: improve handling of disabled thermal zone Zhang Rui
2020-04-30  6:32 ` Zhang Rui [this message]
2020-05-12  1:58   ` [PATCH 1/6] iwlwifi: use thermal_zone_device_update() for temperature change Zhang Rui
2020-05-18 11:21     ` Luca Coelho
2020-05-25  6:04       ` Zhang Rui
2020-05-25 13:33   ` Rafael J. Wysocki
2020-04-30  6:32 ` [PATCH 2/6] thermal: core: delete thermal_notify_framework() Zhang Rui
2020-04-30  8:47   ` Andrzej Pietrasiewicz
2020-04-30  8:58     ` Zhang, Rui
2020-04-30 11:32       ` Andrzej Pietrasiewicz
2020-04-30 11:33         ` Andrzej Pietrasiewicz
2020-05-04 10:18   ` Andrzej Pietrasiewicz
2020-04-30  6:32 ` [PATCH 3/6] thermal: core: update polling after all trips handled Zhang Rui
2020-05-04  7:01   ` Bartlomiej Zolnierkiewicz
2020-04-30  6:32 ` [PATCH 4/6] thermal: core: stop polling timer for disabled thermal zone Zhang Rui
2020-05-04  7:02   ` Bartlomiej Zolnierkiewicz
2020-04-30  6:32 ` [PATCH 5/6] thermal: core: introduce tz_disabled() helper function Zhang Rui
2020-05-04  7:09   ` Bartlomiej Zolnierkiewicz
2020-05-12  1:59     ` Zhang Rui
2020-04-30  6:32 ` [PATCH RFC 6/6] iwlwifi: enable thermal zone only when firmware loaded Zhang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200430063229.6182-2-rui.zhang@intel.com \
    --to=rui.zhang@intel.com \
    --cc=andrzej.p@collabora.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca@coelho.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).