On Mon, Nov 2, 2015 at 2:58 PM, Mark Brown <broo...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to