misc: rtsx: modify rts522a init flow
Subsystems (2)
PATCH 1/1 misc: rtsx: modify rts522a init flow
From: Ricky Wu <[email protected]>
Power down OCP for power consumption
when card is not exist at init_hw()
--- drivers/misc/cardreader/rts5227.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/misc/cardreader/rts5227.c +5 -0
@@ -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
The subject line could be more descriptive. All patches modify something, so the only real information it contains is "rts522a" and "init". Maybe it could say something about powering off OCP (whatever that is) when no memory card is present.
Quoted 4 lines · On Tue, Feb 02, 2021 at 06:56:41PM +0800, [email protected] wrote:
From: Ricky Wu <[email protected]>
Power down OCP for power consumption
when card is not exist atinit_hw()
I assume "card is not exist" means "no SD/MMC card is present".
Why do you only do this for 5227? "card_exist" seems to be a generic concept (it's in struct rtsx_pcr and set by the generic rtsx_pci_init_hw()). Could/should this be done for other card readers as well?
Quoted 1 line
Per https://www.kernel.org/doc/html/v5.10/process/stable-kernel-rules.html
(option 1) this is sufficient. You should not include [email protected] in the cc: list above.
Quoted 24 lines
Signed-off-by Ricky Wu <[email protected]>--- drivers/misc/cardreader/rts5227.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/misc/cardreader/rts5227.c +5
-0@@ -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
Quoted 11 lines
-----Original Message-----
From: Bjorn Helgaas <[email protected]>
Sent: Tuesday, February 2, 2021 8:28 PM
To: 吳昊澄 Ricky <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] misc: rtsx: modify rts522a init flow
Quoted 5 lines
The subject line could be more descriptive. All patches modify something, so the only real information it contains is "rts522a" and "init". Maybe it could say something about powering off OCP (whatever that is) when no memory card is present.
Ok, I will update the subject line at V2
"misc: rtsx: init of rts522a add power off OCP when no card is present"
Quoted 8 lines · On Tue, Feb 02, 2021 at 06:56:41PM +0800, [email protected] wrote:
Quoted 4 lines
From: Ricky Wu <[email protected]>
Power down OCP for power consumption
when card is not exist atinit_hw()I assume "card is not exist" means "no SD/MMC card is present".
Right, it's that means, I will modify this description at V2
Quoted 4 lines
Why do you only do this for 5227? "
card_exist" seems to be a generic concept (it's in structrtsx_pcrand set by the genericrtsx_pci_init_hw()). Could/should this be done for other card readers as well?
Only rts522a need to do this, other card readers can do HW auto power down
Quoted 6 lines
Quoted 1 line
Per https://www.kernel.org/doc/html/v5.10/process/stable-kernel-rules.html
(option 1) this is sufficient. You should not include [email protected] in the
cc: list above.
I am not very clear, I want this patch to Stable tree, so I added this Tag(Cc: [email protected]) If I remove this Tag, it means this patch not go to Stable Tree?
Ricky
Quoted 28 lines
Quoted 11 lines
Signed-off-by Ricky Wu <[email protected]>--- drivers/misc/cardreader/rts5227.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/misc/cardreader/rts5227.c +0
-0drivers/misc/cardreader/rts5227.c static int rts522a_extra_init_hw(struct rtsx_pcr · line 406
Quoted 9 lines
drivers/misc/cardreader/rts5227.c +5
-0@@ -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,Quoted 5 lines
drivers/misc/cardreader/rts5227.c +0
-1FUNC_FORCE_UPME_XMT_DBG);rtsx_pci_write_register (pcr,PCLK_CTL ,0x04 ,0x04 ); --2.17.1
------Please consider the environment before printing this e-mail.
Quoted 9 lines · 吳昊澄 Ricky
Quoted 8 lines
-----Original Message-----
From: Bjorn Helgaas <[email protected]>
Sent: Tuesday, February 2, 2021 8:28 PM
To: 吳昊澄 Ricky <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] misc: rtsx: modify rts522a init flow
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Per https://www.kernel.org/doc/html/v5.10/process/stable-kernel-rules.html
(option 1) this is sufficient. You should not include [email protected] in the
cc: list above.I am not very clear, I want this patch to Stable tree, so I added this Tag(Cc: [email protected]) If I remove this Tag, it means this patch not go to Stable Tree?
Never mind, please ignore my comment. I think I was mistaken.
Bjorn