From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH v1 1/4] i2c: mux: Add i2c-arbitrator 'mux' driver Date: Thu, 14 Feb 2013 17:16:29 -0700 Message-ID: <511D7E5D.1030003@wwwdotorg.org> References: <1360778532-7480-1-git-send-email-dianders@chromium.org> <511BFF77.2090202@wwwdotorg.org> <511C32B5.20600@wwwdotorg.org> <511D74DD.9070600@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Doug Anderson Cc: linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Daniel Kurtz , "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Stephen Warren , Wolfram Sang , Ben Dooks , u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, Guenter Roeck , Grant Grundler , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , Jean Delvare , Alexandre Courbot , "Ben Dooks (embedded platforms)" , Girish Shivananjappa , "bhushan.r" , Naveen Krishna Chatradhi , "sreekumar.c" , Mark Brown , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Peter Korsgaard List-Id: devicetree@vger.kernel.org On 02/14/2013 04:59 PM, Doug Anderson wrote: > Stephen, > > On Thu, Feb 14, 2013 at 3:35 PM, Stephen Warren wrote: >>> [ 1.510000] platform-lcd supply lcd_vdd not found, using dummy regulator >> >> What prints that? I assume that's some error-handling logic in the >> platform-lcd driver. It's probably not detecting an -EPROBE_DEFFERED >> return from regulator_get() correctly, and hence proceeding with the >> probe() when it should simply return and let the kernel retry the >> probe() later. > > It's printed by "core.c" in drivers/regulator. > > pr_warn("%s supply %s not found, using dummy regulator\n", > devname, id); > rdev = dummy_regulator_rdev; > goto found; > > We can avoid that logic with has_full_constraints. That will be some > work to get done but also should be done at some point in time. Once > we use has_full_constraints we'll get ERR_PTR(-EPROBE_DEFER); That flag is normally set automatically: static int __init regulator_init_complete(void) ... /* * Since DT doesn't provide an idiomatic mechanism for * enabling full constraints and since it's much more natural * with DT to provide them just assume that a DT enabled * system has full constraints. */ if (of_have_populated_dt()) has_full_constraints = true; Is of_have_populated_dt() not returning true for you? Perhaps when using the initcall, your regulator_get()s are happening before regulator_init_complete() gets called, which is the source of the problem?