Skip to content

Commit

Permalink
mfd: wm8994: Add delay after powering off regulators
Browse files Browse the repository at this point in the history
On devices where only some of the regulators can be disabled,
the device needs a bit of time to settle before enabling the
regulators again.  Otherwise, it stops responding to any i2c
transfers.

The 125ms was taken from a vendor kernel and is probably
overly conservative.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
  • Loading branch information
xc-racer99 committed Aug 12, 2019
1 parent 906b120 commit e1b619d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ static int wm8994_suspend(struct device *dev)
return ret;
}

/*
* On devices where only some of the regulators can be disabled,
* the device needs a bit of time to settle before enabling the
* regulators again. Here is an ideal time to do that.
*
* This value was taken from a vendor kernel and is probably
* overly conservative.
*/
msleep(125);

return 0;
}

Expand Down

0 comments on commit e1b619d

Please sign in to comment.