aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rtl8411.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-03mfd: rtsx: Using pcr_dbg replace dev_dbgMicky Ching1-6/+5
pcr_dbg is a wrapper of dev_dbg, which can save some code, and help to enable/disable debug message static. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: rtsx: Fix sparse non static symbol warningWei Yongjun1-1/+1
Fixes the following sparse warning: drivers/mfd/rtl8411.c:473:6: warning: symbol 'rtl8411_init_common_params' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: rtsx: Add support for card reader rtl8402Micky Ching1-4/+40
rtl8402 is much like rtl8411, so just add it to rtl8411.c Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: rtsx: Add set pull control macro and simplify rtl8411Micky Ching1-40/+13
Add set pull control macro to reduce code for setting pull control, and use a common init function to reduce code for rtl8411.c. So this patch is used to just simplify code. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: rtsx: Prevent 'used uninitialised' warningsLee Jones1-3/+3
drivers/mfd/rtl8411.c: In function 'rtl8411_fetch_vendor_settings': drivers/mfd/rtl8411.c:58:7: warning: 'reg1' is used uninitialized in this function [-Wuninitialized] drivers/mfd/rtl8411.c: In function 'rtl8411b_fetch_vendor_settings': drivers/mfd/rtl8411.c:79:7: warning: 'reg' is used uninitialized in this function [-Wuninitialized] drivers/mfd/rtl8411.c: In function 'rtl8411_fetch_vendor_settings': drivers/mfd/rtl8411.c:69:26: warning: 'reg3' may be used uninitialized in this function [-Wuninitialized] Tested-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-30mfd: mmc: rtsx: Change default tx phaseWei WANG1-0/+4
The default phase can meet most cards' requirement, but it is not the optimal one. In some extreme situation, the rx phase point produced by the following tuning process will drift quite a distance. Before tuning UHS card, this patch will set a more proper initial tx phase point, which is calculated from statistic data, and can achieve a much better tx signal quality. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20mfd: rtsx: Copyright modificationsWei WANG1-2/+2
Update copyright date, remove author address and add Roger Tseng. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20mfd: rtsx: Configure to enter a deeper power-saving mode in S3Wei WANG1-1/+1
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>
2013-08-20mfd: rtsx: Clear hardware PFM mode in rtl8411bWei WANG1-0/+2
Clear hw_pfm_en to disable hardware PFM mode, to fix a bug that in some situation registers in 0xFDxx domain can't be accessed. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20mfd: rtsx: Add shutdown callback in rtsx_pci_driverWei WANG1-0/+7
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>
2013-08-20mfd: rtsx: Read vendor setting from config spaceWei WANG1-6/+71
Normally OEMs will set vendor setting to the config space of Realtek card reader in BIOS stage. This patch reads the setting at the first, and configure the internal registers according to it, to improve card reader's compatibility condition. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-11mfd: rtsx: Add support for RTL8411BRoger Tseng1-0/+132
Adding support of model RTL8411B. Since the model is similar to RTL8411, differences are implemented in rtl8411.c. Signed-off-by: Roger Tseng <rogerable@realtek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-02-14mfd: rtsx: Implement driving adjustment to device-dependent callbacksRoger Tseng1-3/+13
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>
2013-01-27mfd: rtsx: Add clock divider hookWei WANG1-0/+13
Add callback function conv_clk_and_div_n to convert between SSC clock and its divider N. For rtl8411, the formula to calculate SSC clock divider N is different with the other card reader models. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27mfd: rtsx: Add output voltage switch hookWei WANG1-0/+16
Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. This is needed as rtl8411 has a specific switch output voltage procedure. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-15drivers/mfd: Add realtek pcie card reader driverWei WANG1-0/+251
Realtek PCI-E card reader driver adapts requests from upper-level sdmmc/memstick layer to the real physical card reader. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>