diff options
author | Ricky Wu <ricky_wu@realtek.com> | 2021-02-04 11:31:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-04 19:09:32 +0300 |
commit | 920fd8a70619074eac7687352c8f1c6f3c2a64a5 (patch) | |
tree | bece072394def52d1220f2df9e97603b028a32eb /drivers/misc/cardreader | |
parent | 1f7c14afd4ad5aae5220dfc878f29770239911b1 (diff) | |
download | linux-920fd8a70619074eac7687352c8f1c6f3c2a64a5.tar.xz |
misc: rtsx: init of rts522a add OCP power off when no card is present
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>
Diffstat (limited to 'drivers/misc/cardreader')
-rw-r--r-- | drivers/misc/cardreader/rts5227.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/cardreader/rts5227.c b/drivers/misc/cardreader/rts5227.c index 8859011672cb..8200af22b529 100644 --- 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); |