pinctrl: merrifield: Set default bias in case no particular value given
[sfrench/cifs-2.6.git] / drivers / pinctrl / intel / pinctrl-merrifield.c
index e4ff8da1b89459ff61ecd6904950d45ac263d6a0..3ae141e0b42155200322af360db5db3a9c0700d2 100644 (file)
@@ -745,6 +745,10 @@ static int mrfld_config_set_pin(struct mrfld_pinctrl *mp, unsigned int pin,
                mask |= BUFCFG_Px_EN_MASK | BUFCFG_PUPD_VAL_MASK;
                bits |= BUFCFG_PU_EN;
 
+               /* Set default strength value in case none is given */
+               if (arg == 1)
+                       arg = 20000;
+
                switch (arg) {
                case 50000:
                        bits |= BUFCFG_PUPD_VAL_50K << BUFCFG_PUPD_VAL_SHIFT;
@@ -765,6 +769,10 @@ static int mrfld_config_set_pin(struct mrfld_pinctrl *mp, unsigned int pin,
                mask |= BUFCFG_Px_EN_MASK | BUFCFG_PUPD_VAL_MASK;
                bits |= BUFCFG_PD_EN;
 
+               /* Set default strength value in case none is given */
+               if (arg == 1)
+                       arg = 20000;
+
                switch (arg) {
                case 50000:
                        bits |= BUFCFG_PUPD_VAL_50K << BUFCFG_PUPD_VAL_SHIFT;