summaryrefslogtreecommitdiff
path: root/drivers/mfd/rts5227.c
diff options
context:
space:
mode:
authorWei WANG <wei_wang@realsil.com.cn>2013-08-20 10:18:55 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-08-20 12:22:01 +0400
commiteb891c65c9c87e55f728d95bcc514dea337aed12 (patch)
tree691325f4eb2d39ab93db3490e6d15d37840ab405 /drivers/mfd/rts5227.c
parent0ccc0065c90284f283314e52a96e76ae8a8dce0a (diff)
downloadlinux-eb891c65c9c87e55f728d95bcc514dea337aed12.tar.xz
mfd: rtsx: Configure to enter a deeper power-saving mode in S3
Set a bit to enable rts5227 and rts5249 to enter a deeper internal power-saving mode in S3, and recover it after resuming. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/rts5227.c')
-rw-r--r--drivers/mfd/rts5227.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mfd/rts5227.c b/drivers/mfd/rts5227.c
index 724ce4c54523..c72abd6b9c81 100644
--- a/drivers/mfd/rts5227.c
+++ b/drivers/mfd/rts5227.c
@@ -83,13 +83,16 @@ static void rts5227_fetch_vendor_settings(struct rtsx_pcr *pcr)
pcr->flags |= PCR_REVERSE_SOCKET;
}
-static void rts5227_force_power_down(struct rtsx_pcr *pcr)
+static void rts5227_force_power_down(struct rtsx_pcr *pcr, u8 pm_state)
{
/* Set relink_time to 0 */
rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 1, 0xFF, 0);
rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 2, 0xFF, 0);
rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 3, 0x01, 0);
+ if (pm_state == HOST_ENTER_S3)
+ rtsx_pci_write_register(pcr, PM_CTRL3, 0x10, 0x10);
+
rtsx_pci_write_register(pcr, FPDCTL, 0x03, 0x03);
}
@@ -123,6 +126,7 @@ static int rts5227_extra_init_hw(struct rtsx_pcr *pcr)
else
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD,
AUTOLOAD_CFG_BASE + 3, 0xB8, 0x88);
+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PM_CTRL3, 0x10, 0x00);
return rtsx_pci_send_cmd(pcr, 100);
}