From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765137AbdAKQ5Z (ORCPT ); Wed, 11 Jan 2017 11:57:25 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:17974 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbdAKQ5Y (ORCPT ); Wed, 11 Jan 2017 11:57:24 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 11 Jan 2017 08:57:23 -0800 Subject: Re: [PATCH] regulator: core: Don't use regulators as supplies until the parent is bound To: Mark Brown References: <1484046069-7893-1-git-send-email-jonathanh@nvidia.com> <20170110165717.7dfxoyajc5p2h5mr@sirena.org.uk> CC: Liam Girdwood , , From: Jon Hunter Message-ID: <5d9b2cf5-55ef-f389-3381-da101bda7db5@nvidia.com> Date: Wed, 11 Jan 2017 16:57:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170110165717.7dfxoyajc5p2h5mr@sirena.org.uk> X-Originating-IP: [10.21.132.143] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/17 16:57, Mark Brown wrote: > * PGP Signed by an unknown key > > On Tue, Jan 10, 2017 at 11:01:09AM +0000, Jon Hunter wrote: > >> +++ b/drivers/regulator/core.c >> @@ -1553,6 +1553,11 @@ static int regulator_resolve_supply(struct regulator_dev *rdev) >> } >> } >> >> + if (r->dev.parent && !device_is_bound(r->dev.parent)) { >> + put_device(&r->dev); >> + return -EPROBE_DEFER; >> + } >> + > > I realised earlier that this will trigger when the supply and the > consumer are part of the same PMIC which will cause issues as that's a > fairly common setup and won't be resolved by deferring. Can you please > modify this to only defer if the parent is not the same as the parent of > the regulator we're currently resolving? Sorry, should've thought of > this yesterday. OK, no problem. Will send out an update shortly. Cheers Jon -- nvpublic