aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-pxa/mfp.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-08-11 08:39:09 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 06:49:24 -0400
commitfb60870f630f926d2299b6ebd31fc94714dcd734 (patch)
tree64aec7edf3f57d0a4a5497bca8616801f576bf13 /arch/arm/plat-pxa/mfp.c
parent9304d008d6ba41ff52ef6eae44337398e83b4436 (diff)
[ARM] pxa: add MFP_PULL_FLOAT
There is currently an uncovered case for MFP configuration on PXAs which is selected by setting the PULL_SEL bit but none of the PULL{UP,DOWN}_EN bits. This case is needed to explicitly let pins float, even if the selected alternate function would default to a configuration with a pull resistor enabled. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/plat-pxa/mfp.c')
-rw-r--r--arch/arm/plat-pxa/mfp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c
index e716c622a17c..9405d0379c85 100644
--- a/arch/arm/plat-pxa/mfp.c
+++ b/arch/arm/plat-pxa/mfp.c
@@ -77,11 +77,13 @@
77 * MFPR_PULL_LOW 1 0 1 77 * MFPR_PULL_LOW 1 0 1
78 * MFPR_PULL_HIGH 1 1 0 78 * MFPR_PULL_HIGH 1 1 0
79 * MFPR_PULL_BOTH 1 1 1 79 * MFPR_PULL_BOTH 1 1 1
80 * MFPR_PULL_FLOAT 1 0 0
80 */ 81 */
81#define MFPR_PULL_NONE (0) 82#define MFPR_PULL_NONE (0)
82#define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN) 83#define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN)
83#define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN) 84#define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN)
84#define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN) 85#define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN)
86#define MFPR_PULL_FLOAT (MFPR_PULL_SEL)
85 87
86/* mfp_spin_lock is used to ensure that MFP register configuration 88/* mfp_spin_lock is used to ensure that MFP register configuration
87 * (most likely a read-modify-write operation) is atomic, and that 89 * (most likely a read-modify-write operation) is atomic, and that
@@ -116,6 +118,7 @@ static const unsigned long mfpr_pull[] = {
116 MFPR_PULL_LOW, 118 MFPR_PULL_LOW,
117 MFPR_PULL_HIGH, 119 MFPR_PULL_HIGH,
118 MFPR_PULL_BOTH, 120 MFPR_PULL_BOTH,
121 MFPR_PULL_FLOAT,
119}; 122};
120 123
121/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */ 124/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */