aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rts5229.c
diff options
context:
space:
mode:
authorWei WANG <wei_wang@realsil.com.cn>2013-08-20 02:18:52 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-08-20 04:22:00 -0400
commit5947c167d145f32d4475d647a87e2af2699efe45 (patch)
treeb75c7a66d0c946c714ed141aff8f66839cd01f6a /drivers/mfd/rts5229.c
parent773ccdfd9cc6f9bf8ec75a59fa742d7a663a5903 (diff)
mfd: rtsx: Add shutdown callback in rtsx_pci_driver
Some actions to clear power state should be handled in .shutdown callback in rtsx_pci_driver. This patch adopts the following measures to catch this goal: 1. Add a function rtsx_pci_power_off to abstract the common ops in .shutdown and .suspend 2. Add pcr->ops->force_power_down to fulfill the individual action for each reader model Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/rts5229.c')
-rw-r--r--drivers/mfd/rts5229.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mfd/rts5229.c b/drivers/mfd/rts5229.c
index 7a1ad6dd2917..a0b695af8561 100644
--- a/drivers/mfd/rts5229.c
+++ b/drivers/mfd/rts5229.c
@@ -56,6 +56,11 @@ static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr)
56 map_sd_drive(rtsx_reg_to_sd30_drive_sel_3v3(reg)); 56 map_sd_drive(rtsx_reg_to_sd30_drive_sel_3v3(reg));
57} 57}
58 58
59static void rts5229_force_power_down(struct rtsx_pcr *pcr)
60{
61 rtsx_pci_write_register(pcr, FPDCTL, 0x03, 0x03);
62}
63
59static int rts5229_extra_init_hw(struct rtsx_pcr *pcr) 64static int rts5229_extra_init_hw(struct rtsx_pcr *pcr)
60{ 65{
61 rtsx_pci_init_cmd(pcr); 66 rtsx_pci_init_cmd(pcr);
@@ -179,6 +184,7 @@ static const struct pcr_ops rts5229_pcr_ops = {
179 .switch_output_voltage = rts5229_switch_output_voltage, 184 .switch_output_voltage = rts5229_switch_output_voltage,
180 .cd_deglitch = NULL, 185 .cd_deglitch = NULL,
181 .conv_clk_and_div_n = NULL, 186 .conv_clk_and_div_n = NULL,
187 .force_power_down = rts5229_force_power_down,
182}; 188};
183 189
184/* SD Pull Control Enable: 190/* SD Pull Control Enable: