Skip to contentSkip to conversation

misc: rtsx: init of rts522a add OCP power off when no card is present

PATCH In review [email protected] 2 participants 2 messages Jun 4, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 misc: rtsx: init of rts522a add OCP power off when no card is present

From: Ricky Wu <[email protected]>

Power down OCP for power consumption
when no SD/MMC card is present

---

v2: update the subject line and description

---
 drivers/misc/cardreader/rts5227.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/misc/cardreader/rts5227.c +5 -0
index 8859011672cb..8200af22b529 100644
@@ -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);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · On Fri, Jun 04, 2021 at 03:25:08PM +0800, [email protected] wrote:

From: Ricky Wu <[email protected]>

Power down OCP for power consumption
when no SD/MMC card is present

Quoted 9 lines

---

v2: update the subject line and description

---
 drivers/misc/cardreader/rts5227.c | 5 +++++
 1 file changed, 5 insertions(+)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>