diff options
| author | Olof Johansson <olof@lixom.net> | 2013-02-04 22:56:41 -0800 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2013-02-04 22:56:41 -0800 |
| commit | 469da62096e23adc755c1268b00b5fc7a214151b (patch) | |
| tree | fefd055fdae584e38d551f44d1339eb22cee4ed9 /drivers/mfd/rts5209.c | |
| parent | 4227961650884a06757f80877d5dce0bddc723d4 (diff) | |
| parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff) | |
| download | olio-linux-3.10-469da62096e23adc755c1268b00b5fc7a214151b.tar.xz olio-linux-3.10-469da62096e23adc755c1268b00b5fc7a214151b.zip | |
Merge tag 'v3.8-rc6' into next/soc
Linux 3.8-rc6
Diffstat (limited to 'drivers/mfd/rts5209.c')
| -rw-r--r-- | drivers/mfd/rts5209.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c index 283a4f14808..98fe0f39463 100644 --- a/drivers/mfd/rts5209.c +++ b/drivers/mfd/rts5209.c @@ -144,6 +144,25 @@ static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card) return rtsx_pci_send_cmd(pcr, 100); } +static int rts5209_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) +{ + int err; + + if (voltage == OUTPUT_3V3) { + err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24); + if (err < 0) + return err; + } else if (voltage == OUTPUT_1V8) { + err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24); + if (err < 0) + return err; + } else { + return -EINVAL; + } + + return 0; +} + static const struct pcr_ops rts5209_pcr_ops = { .extra_init_hw = rts5209_extra_init_hw, .optimize_phy = rts5209_optimize_phy, @@ -153,7 +172,9 @@ static const struct pcr_ops rts5209_pcr_ops = { .disable_auto_blink = rts5209_disable_auto_blink, .card_power_on = rts5209_card_power_on, .card_power_off = rts5209_card_power_off, + .switch_output_voltage = rts5209_switch_output_voltage, .cd_deglitch = NULL, + .conv_clk_and_div_n = NULL, }; /* SD Pull Control Enable: |