Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753863AbbHGN6w (ORCPT ); Fri, 7 Aug 2015 09:58:52 -0400 Received: from mail-yk0-f178.google.com ([209.85.160.178]:34195 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532AbbHGN6u (ORCPT ); Fri, 7 Aug 2015 09:58:50 -0400 MIME-Version: 1.0 In-Reply-To: <20150807120906.GR20873@sirena.org.uk> References: <1438870315-18689-1-git-send-email-tomeu.vizoso@collabora.com> <1438870315-18689-7-git-send-email-tomeu.vizoso@collabora.com> <20150807120906.GR20873@sirena.org.uk> From: Rob Herring Date: Fri, 7 Aug 2015 08:58:30 -0500 Message-ID: Subject: Re: [PATCH v3 06/18] regulator: core: Probe regulators on demand To: Mark Brown Cc: Tomeu Vizoso , "linux-kernel@vger.kernel.org" , Rob Herring , Stephen Warren , Javier Martinez Canillas , Thierry Reding , "Rafael J. Wysocki" , "linux-arm-kernel@lists.infradead.org" , Dmitry Torokhov , "devicetree@vger.kernel.org" , Linus Walleij , "linux-acpi@vger.kernel.org" , Arnd Bergmann 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: 1579 Lines: 45 On Fri, Aug 7, 2015 at 7:09 AM, Mark Brown wrote: > On Thu, Aug 06, 2015 at 04:11:43PM +0200, Tomeu Vizoso wrote: > >> When looking up a regulator through its OF node, probe it if it hasn't >> already. >> >> The goal is to reduce deferred probes to a minimum, as it makes it very >> cumbersome to find out why a device failed to probe, and can introduce >> very big delays in when a critical device is probed. > > Still the same problem as we had before with this stuff, why is this DT > only? The last version was more generic, but it was obvious that doing that was pointless with current code structure. You have a call sequence like either: generic get -> DT specific get -> generic poke -> DT specific poke or generic get -> DT specific get -> DT specific poke v2 did the former and this version does the latter. However, for some reason with regulators this is not all contained within of_get_regulator. > >> #include >> @@ -1336,6 +1337,7 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev, >> if (dev && dev->of_node) { >> node = of_get_regulator(dev, supply); >> if (node) { >> + of_platform_probe(node); > > And why the assumption that this is a platform device? Agreed on this point. Rob -- 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/