From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org, ulf.hansson@linaro.org
Cc: linux-pm@vger.kernel.org,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Ricky WU <ricky_wu@realtek.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Yang Li <yang.lee@linux.alibaba.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] misc: rtsx: Cleanup power management ops
Date: Thu, 20 Jan 2022 22:50:04 +0800 [thread overview]
Message-ID: <20220120145006.1682014-3-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20220120145006.1682014-1-kai.heng.feng@canonical.com>
- Use cancel_delayed_work_sync to ensure there's no race with
carddet_work.
- Remove device_wakeup_disable to save some CPU cycles. If the device
really has ACPI _DSW then the wakeup should be disabled in probe
routine.
- Remove fetch_vendor_settings from runtime resume routine, since they
are already saved in "struct rtsx_pcr".
Cc: Ricky WU <ricky_wu@realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/misc/cardreader/rtsx_pcr.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index 1dcf98b597569..8107c85028c37 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -1671,14 +1671,12 @@ static int __maybe_unused rtsx_pci_suspend(struct device *dev_d)
handle = pci_get_drvdata(pcidev);
pcr = handle->pcr;
- cancel_delayed_work(&pcr->carddet_work);
+ cancel_delayed_work_sync(&pcr->carddet_work);
mutex_lock(&pcr->pcr_mutex);
rtsx_pci_power_off(pcr, HOST_ENTER_S3);
- device_wakeup_disable(dev_d);
-
mutex_unlock(&pcr->pcr_mutex);
return 0;
}
@@ -1791,9 +1789,6 @@ static int rtsx_pci_runtime_resume(struct device *device)
rtsx_pci_write_register(pcr, HOST_SLEEP_STATE, 0x03, 0x00);
- if (pcr->ops->fetch_vendor_settings)
- pcr->ops->fetch_vendor_settings(pcr);
-
rtsx_pci_init_hw(pcr);
if (pcr->slots[RTSX_SD_CARD].p_dev != NULL) {
--
2.33.1
next prev parent reply other threads:[~2022-01-20 14:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 14:50 [PATCH 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-20 14:50 ` [PATCH 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-21 1:40 ` [PATCH v2 " Kai-Heng Feng
2022-01-21 3:57 ` Ricky WU
2022-01-21 4:08 ` Kai-Heng Feng
2022-01-21 4:15 ` Ricky WU
2022-01-21 4:17 ` Kai-Heng Feng
2022-01-21 6:31 ` [PATCH v3 " Kai-Heng Feng
2022-01-21 9:58 ` Ricky WU
2022-01-21 12:39 ` Kai-Heng Feng
2022-01-24 3:26 ` Ricky WU
2022-01-24 4:53 ` Kai-Heng Feng
2022-01-24 5:10 ` Ricky WU
2022-01-24 5:26 ` Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
2022-01-25 5:50 ` [PATCH v6 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-25 5:50 ` [PATCH v6 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-25 6:38 ` Ricky WU
2022-01-25 5:50 ` [PATCH v6 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-25 6:38 ` Ricky WU
2022-01-25 5:50 ` [PATCH v6 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
2022-01-25 6:38 ` Ricky WU
2022-01-25 6:37 ` [PATCH v6 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Ricky WU
2022-02-04 12:28 ` Ulf Hansson
2022-02-16 4:21 ` Kai-Heng Feng
2022-02-16 10:22 ` Ulf Hansson
2022-01-20 14:50 ` Kai-Heng Feng [this message]
2022-01-20 14:50 ` [PATCH 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
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=20220120145006.1682014-3-kai.heng.feng@canonical.com \
--to=kai.heng.feng@canonical.com \
--cc=arnd@arndb.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ricky_wu@realtek.com \
--cc=ulf.hansson@linaro.org \
--cc=yang.lee@linux.alibaba.com \
/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
all inboxes | Powered by JetHome®