diff options
author | Roger Tseng <rogerable@realtek.com> | 2013-02-04 15:45:58 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-02-14 00:22:59 +0100 |
commit | 88a7ee37f3c5c73b000f7ba2000b27c5002a5286 (patch) | |
tree | cf73579f1eb6597ca8df1edc93597a7b0023869e /drivers/mfd/rts5209.c | |
parent | 8ea402f5646e6e36c8cd0a62053ba8939204dceb (diff) | |
download | linux-88a7ee37f3c5c73b000f7ba2000b27c5002a5286.tar.gz linux-88a7ee37f3c5c73b000f7ba2000b27c5002a5286.tar.bz2 linux-88a7ee37f3c5c73b000f7ba2000b27c5002a5286.zip |
mfd: rtsx: Implement driving adjustment to device-dependent callbacks
Implement different ways of selecting driving capability(a necessary adjustment
along with voltage change). It was origionally in device-independent
mmc/host/rtsx_pci_sdmmc.c. Moving it here to support devices which may have a
different way of adjustment.
Signed-off-by: Roger Tseng <rogerable@realtek.com>
Reviewed-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/rts5209.c')
-rw-r--r-- | drivers/mfd/rts5209.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c index 98fe0f39463e..ec78d9fb0879 100644 --- a/drivers/mfd/rts5209.c +++ b/drivers/mfd/rts5209.c @@ -149,10 +149,18 @@ static int rts5209_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) int err; if (voltage == OUTPUT_3V3) { + err = rtsx_pci_write_register(pcr, + SD30_DRIVE_SEL, 0x07, DRIVER_TYPE_D); + if (err < 0) + return err; err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24); if (err < 0) return err; } else if (voltage == OUTPUT_1V8) { + err = rtsx_pci_write_register(pcr, + SD30_DRIVE_SEL, 0x07, DRIVER_TYPE_B); + if (err < 0) + return err; err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24); if (err < 0) return err; |