OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f7c14a
)
misc: rtsx: init of rts522a add OCP power off when no card is present
author
Ricky Wu
<ricky_wu@realtek.com>
Thu, 4 Feb 2021 08:31:15 +0000
(16:31 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 4 Feb 2021 16:09:32 +0000
(17:09 +0100)
Power down OCP for power consumption
when no SD/MMC card is present
Cc: stable@vger.kernel.org
Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
Link:
https://lore.kernel.org/r/20210204083115.9471-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cardreader/rts5227.c
patch
|
blob
|
history
diff --git
a/drivers/misc/cardreader/rts5227.c
b/drivers/misc/cardreader/rts5227.c
index
8859011
..
8200af2
100644
(file)
--- a/
drivers/misc/cardreader/rts5227.c
+++ b/
drivers/misc/cardreader/rts5227.c
@@
-398,6
+398,11
@@
static int rts522a_extra_init_hw(struct rtsx_pcr *pcr)
{
rts5227_extra_init_hw(pcr);
+ /* Power down OCP for power consumption */
+ if (!pcr->card_exist)
+ rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN,
+ OC_POWER_DOWN);
+
rtsx_pci_write_register(pcr, FUNC_FORCE_CTL, FUNC_FORCE_UPME_XMT_DBG,
FUNC_FORCE_UPME_XMT_DBG);
rtsx_pci_write_register(pcr, PCLK_CTL, 0x04, 0x04);