History log of /drivers/mfd/rtl8411.c
Revision Date Author Comments
b5167bc466ef5a267cbd2c1acc4bfb8959d26f47 20-Dec-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn> mfd: rtsx: Fix sparse non static symbol warning

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>
56cb3cc1872923b69fdeeb00362b7da4d6cf5590 18-Dec-2013 Micky Ching <micky_ching@realsil.com.cn> mfd: rtsx: Add support for card reader rtl8402

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>
0da14eeba216932db2e4b8805ab58dae72e44a45 18-Dec-2013 Micky Ching <micky_ching@realsil.com.cn> mfd: rtsx: Add set pull control macro and simplify rtl8411

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>
4db59238906becd0047aba8293b25591dd0d018a 03-Dec-2013 Lee Jones <lee.jones@linaro.org> mfd: rtsx: Prevent 'used uninitialised' warnings

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>
84d72f9cc21d6e41c620dd34b8248734cd02d995 21-Aug-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: mmc: rtsx: Change default tx phase

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>
09fd86780bb4603df1886e17127f5beb97f70ffb 20-Aug-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: rtsx: Copyright modifications

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>
eb891c65c9c87e55f728d95bcc514dea337aed12 20-Aug-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: rtsx: Configure to enter a deeper power-saving mode in S3

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>
0ccc0065c90284f283314e52a96e76ae8a8dce0a 20-Aug-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: rtsx: Clear hardware PFM mode in rtl8411b

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>
5947c167d145f32d4475d647a87e2af2699efe45 20-Aug-2013 Wei WANG <wei_wang@realsil.com.cn> 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>
773ccdfd9cc6f9bf8ec75a59fa742d7a663a5903 20-Aug-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: rtsx: Read vendor setting from config space

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>
9032eabdd3fcfc00aa513a9eef54002cbabb8c9a 19-Apr-2013 Roger Tseng <rogerable@realtek.com> mfd: rtsx: Add support for RTL8411B

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>
88a7ee37f3c5c73b000f7ba2000b27c5002a5286 04-Feb-2013 Roger Tseng <rogerable@realtek.com> 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>
ab4e8f8b7bdfeff0c961fdbbdacb262d68f094c0 23-Jan-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: rtsx: Add clock divider hook

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>
d817ac4e181710cd02b582b759d3123ad2cfa8d8 23-Jan-2013 Wei WANG <wei_wang@realsil.com.cn> mfd: rtsx: Add output voltage switch hook

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>
67d16a4686c9b94c8f52a66afe7521909aeb75b4 09-Nov-2012 Wei WANG <wei_wang@realsil.com.cn> drivers/mfd: Add realtek pcie card reader driver

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>
ada8a8a13b13a2749818524a7949935f68d2b3eb 29-Oct-2012 Wei WANG <wei_wang@realsil.com.cn> mfd: Add realtek pcie card reader driver

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: Samuel Ortiz <sameo@linux.intel.com>