All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] misc: rtsx: init of rts522a add OCP power off when no card is present
@ 2021-02-04  8:31 ricky_wu
  0 siblings, 0 replies; 3+ messages in thread
From: ricky_wu @ 2021-02-04  8:31 UTC (permalink / raw)
  To: arnd, gregkh, ricky_wu, yuehaibing, ulf.hansson, bhelgaas, linux-kernel
  Cc: stable

From: Ricky Wu <ricky_wu@realtek.com>

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>
---

v2: update the subject line and description
---
 drivers/misc/cardreader/rts5227.c | 5 +++++
 1 file changed, 5 insertions(+)

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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] misc: rtsx: init of rts522a add OCP power off when no card is present
  2021-06-04  7:25 ricky_wu
@ 2021-06-04  8:23 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-06-04  8:23 UTC (permalink / raw)
  To: ricky_wu; +Cc: stable

On Fri, Jun 04, 2021 at 03:25:08PM +0800, ricky_wu@realtek.com wrote:
> From: Ricky Wu <ricky_wu@realtek.com>
> 
> 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>
> ---
> 
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] misc: rtsx: init of rts522a add OCP power off when no card is present
@ 2021-06-04  7:25 ricky_wu
  2021-06-04  8:23 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: ricky_wu @ 2021-06-04  7:25 UTC (permalink / raw)
  To: ricky_wu; +Cc: stable

From: Ricky Wu <ricky_wu@realtek.com>

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>
---

v2: update the subject line and description
---
 drivers/misc/cardreader/rts5227.c | 5 +++++
 1 file changed, 5 insertions(+)

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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-04  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04  8:31 [PATCH v2] misc: rtsx: init of rts522a add OCP power off when no card is present ricky_wu
2021-06-04  7:25 ricky_wu
2021-06-04  8:23 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.