diff options
author | Olof Johansson <olof@lixom.net> | 2013-02-06 01:55:59 +0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-02-06 01:55:59 +0400 |
commit | c1226ff9af84dfa6ef73d95435748569c99b5171 (patch) | |
tree | 794411d5da7c34abafe0e188e499cd8334492ce6 /drivers/mfd/rts5209.c | |
parent | 51f29d44414521cc4244958f2a384bcd39d23a6e (diff) | |
parent | c8d4bafe503ca767bbc8f3c54e4acd344ef26346 (diff) | |
download | linux-c1226ff9af84dfa6ef73d95435748569c99b5171.tar.xz |
Merge tag 'omap-for-v3.9/fixes-non-critical-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
From Tony Lindgren:
Few fixes for v3.9 merge window that are not urgent for
the -rc series.
* tag 'omap-for-v3.9/fixes-non-critical-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: using strlcpy instead of strncpy
ARM: OMAP2+: Fix selection of clockevent timer when using device-tree
ARM: OMAP: Fix the use of uninitialized dma_lch_count
ARM: OMAP: make wakeupgen_lock raw
+ 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 283a4f148084..98fe0f39463e 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: |