Messages in this thread | | | Date | Mon, 2 Nov 2015 15:04:29 -0800 | Subject | Re: MMC/regulator boot hang in -next | From | John Stultz <> |
| |
On Mon, Nov 2, 2015 at 2:58 PM, Mark Brown <broonie@kernel.org> wrote: > On Mon, Nov 02, 2015 at 02:03:14PM -0800, John Stultz wrote: > >> Might the problem be here that we lock the supply in set_voltage, then >> if we call _regulator_get_voltage on the supply later, we try to grab >> the same lock and we're stuck? > > No, the internal get voltage call shouldn't be locking in the first > place (and indeed it doesn't do so AFAICT?).
drivers/regulator/core.c: @3063 static int _regulator_get_voltage(struct regulator_dev *rdev) { int sel, ret;
if (rdev->desc->ops->get_voltage_sel) { ... } else if (rdev->supply) { ret = regulator_get_voltage(rdev->supply); <----- } else {
Where _regulator_get_voltage() is called from regulator_set_voltage_unlocked(), called from regulator_set_voltage().
thanks -john
| |