summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rtsx_pcr.h
diff options
context:
space:
mode:
authorMicky Ching <micky_ching@realsil.com.cn>2013-12-18 10:03:12 +0800
committerLee Jones <lee.jones@linaro.org>2014-01-21 08:28:11 +0000
commit0da14eeba216932db2e4b8805ab58dae72e44a45 (patch)
treeca2b65702d6d2057787533da70358ece2dc62ed3 /drivers/mfd/rtsx_pcr.h
parentc1ec8fc308bb8171c76b5bed7f4028b6290e53f9 (diff)
downloadop-kernel-dev-0da14eeba216932db2e4b8805ab58dae72e44a45.zip
op-kernel-dev-0da14eeba216932db2e4b8805ab58dae72e44a45.tar.gz
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>
Diffstat (limited to 'drivers/mfd/rtsx_pcr.h')
-rw-r--r--drivers/mfd/rtsx_pcr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/rtsx_pcr.h b/drivers/mfd/rtsx_pcr.h
index 947e79b..e9feadb 100644
--- a/drivers/mfd/rtsx_pcr.h
+++ b/drivers/mfd/rtsx_pcr.h
@@ -63,4 +63,12 @@ static inline u8 map_sd_drive(int idx)
#define rtl8411_reg_to_sd30_drive_sel_3v3(reg) (((reg) >> 5) & 0x07)
#define rtl8411b_reg_to_sd30_drive_sel_3v3(reg) ((reg) & 0x03)
+#define set_pull_ctrl_tables(pcr, __device) \
+do { \
+ pcr->sd_pull_ctl_enable_tbl = __device##_sd_pull_ctl_enable_tbl; \
+ pcr->sd_pull_ctl_disable_tbl = __device##_sd_pull_ctl_disable_tbl; \
+ pcr->ms_pull_ctl_enable_tbl = __device##_ms_pull_ctl_enable_tbl; \
+ pcr->ms_pull_ctl_disable_tbl = __device##_ms_pull_ctl_disable_tbl; \
+} while (0)
+
#endif
OpenPOWER on IntegriCloud