Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751731AbbKBXEc (ORCPT ); Mon, 2 Nov 2015 18:04:32 -0500 Received: from mail-ig0-f171.google.com ([209.85.213.171]:36540 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbbKBXE3 (ORCPT ); Mon, 2 Nov 2015 18:04:29 -0500 MIME-Version: 1.0 In-Reply-To: <20151102225856.GL20228@sirena.org.uk> References: <20151102204620.GF24668@usrtlx11787.corpusers.net> <20151102225856.GL20228@sirena.org.uk> Date: Mon, 2 Nov 2015 15:04:29 -0800 Message-ID: Subject: Re: MMC/regulator boot hang in -next From: John Stultz To: Mark Brown Cc: Bjorn Andersson , Sascha Hauer , Ulf Hansson , lkml Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1106 Lines: 31 On Mon, Nov 2, 2015 at 2:58 PM, Mark Brown 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/