regulator: tps65090: Poll timeout bit on enable
authorSean Paul <seanpaul@chromium.org>
Wed, 22 Aug 2012 00:04:43 +0000 (17:04 -0700)
committerGerrit <chrome-bot@google.com>
Wed, 22 Aug 2012 22:36:16 +0000 (15:36 -0700)
commit5fabedef16aabfa16c118f19f0d99d0ad0ba27c9
treed73f2ba157951b9d5f9c0646280ac4d6820afa2e
parent4f8b30df226652b084c2ee6c352b3a9b7c2f438f
regulator: tps65090: Poll timeout bit on enable

Instead of just reading power good bit once, poll the register up to 5
times. This fixes an issue where the regulator is not setup and we read
the status too early. We will now wait until either the TOFET bit is
de-asserted, or ~5 ms elapse before checking for power good.

BUG=chrome-os-partner:12762
TEST=Tested on snow, no regressions found

Change-Id: Ied6dc840dcc4a94970cecac659efbffcbb55d651
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31072
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/regulator/tps65090-regulator.c