From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbdCWEdm (ORCPT ); Thu, 23 Mar 2017 00:33:42 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:36378 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbdCWEdj (ORCPT ); Thu, 23 Mar 2017 00:33:39 -0400 Date: Thu, 23 Mar 2017 10:03:34 +0530 From: Viresh Kumar To: Leonard Crestez Cc: Mark Brown , Liam Girdwood , "Rafael J. Wysocki" , Shawn Guo , Sascha Hauer , Robin Gong , Anson Huang , Irina Tirdea , Rob Herring , Mark Rutland , Fabio Estevam , Octavian Purdila , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC 2/8] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator Message-ID: <20170323043334.GD12094@vireshk-i7> References: <7f2618363d43b30db29f5f8ae822df413392f99d.1490199005.git.leonard.crestez@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f2618363d43b30db29f5f8ae822df413392f99d.1490199005.git.leonard.crestez@nxp.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-03-17, 18:53, Leonard Crestez wrote: > From: Irina Tirdea > > If there are any errors in getting the cpu0 regulators, the driver returns > -ENOENT. In case the regulators are not yet available, the devm_regulator_get > calls will return -EPROBE_DEFER, so that the driver can be probed later. > If we return -ENOENT, the driver will fail its initialization and will > not try to probe again (when the regulators become available). > > Return the actual error received from regulator_get in probe. Print a > differentiated message in case we need to probe the device later and > in case we actually failed. Also add a message to inform when the > driver has been successfully registered. > > Signed-off-by: Irina Tirdea > Signed-off-by: Leonard Crestez > --- > drivers/cpufreq/imx6q-cpufreq.c | 7 +++++++ > 1 file changed, 7 insertions(+) Acked-by: Viresh Kumar -- viresh