aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2015-10-28 08:42:30 -0400
committerLee Jones <lee.jones@linaro.org>2016-01-14 03:43:58 -0500
commitb79a980f7161ca09855cc641091d1afe4ef08dd8 (patch)
tree0c0f998d24e362d30dd3e19a0ed9b9778b75bb6c /drivers/mfd
parent3103d44e4509f6da8b667d185b45eb0ae0beaa85 (diff)
mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(5); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); total: 0 errors, 4 warnings, 1407 lines checked Cc: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/arizona-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 4bb486679110..5319f252790b 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -238,7 +238,7 @@ static int arizona_poll_reg(struct arizona *arizona,
238 if ((val & mask) == target) 238 if ((val & mask) == target)
239 return 0; 239 return 0;
240 240
241 msleep(1); 241 usleep_range(1000, 5000);
242 } 242 }
243 243
244 dev_err(arizona->dev, "Polling reg %u timed out: %x\n", reg, val); 244 dev_err(arizona->dev, "Polling reg %u timed out: %x\n", reg, val);
@@ -279,14 +279,14 @@ static void arizona_disable_reset(struct arizona *arizona)
279 case WM5110: 279 case WM5110:
280 case WM8280: 280 case WM8280:
281 /* Meet requirements for minimum reset duration */ 281 /* Meet requirements for minimum reset duration */
282 msleep(5); 282 usleep_range(5000, 10000);
283 break; 283 break;
284 default: 284 default:
285 break; 285 break;
286 } 286 }
287 287
288 gpio_set_value_cansleep(arizona->pdata.reset, 1); 288 gpio_set_value_cansleep(arizona->pdata.reset, 1);
289 msleep(1); 289 usleep_range(1000, 5000);
290 } 290 }
291} 291}
292 292
@@ -1132,7 +1132,7 @@ int arizona_dev_init(struct arizona *arizona)
1132 goto err_reset; 1132 goto err_reset;
1133 } 1133 }
1134 1134
1135 msleep(1); 1135 usleep_range(1000, 5000);
1136 } 1136 }
1137 1137
1138 /* Ensure device startup is complete */ 1138 /* Ensure device startup is complete */