From patchwork Thu Jul 3 02:19:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 33010 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4719620672 for ; Thu, 3 Jul 2014 02:19:34 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf63035199pab.1 for ; Wed, 02 Jul 2014 19:19:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=6htFvnP7zs1cIxsNQeCg9i5INNbN072IC8bxOTpW/qU=; b=mJvXTw+lf31XB5kmQfEs0ZWsFqD6z1b5ka7P2XG0SCX7TGCFo3dVMBFyMYMXUdcycl S37fbtJ5Kvyn90ODGBohHZdOeM4tM7m0FT8NHmNCp0mbcNW16mfNq4Fy/+umHWKdHcLC FXbWfYpgKNn4Oj1MddYT/e1L82vyhpbUnMKrTyWAYVLLKqrwhqtPh5xo+iuAkmxdkplD 8IRPK3zrGH4e4CT9yv/fN/PhBis6wrvX2I/UvNFpcf830y5+BrapH4dGPhcIFii5SeYm I9mi7Ru+CeuOsOwAukoDnNxLUm0IlEau5zoKkwEDThUDIBXsPhkCpVjVJq4CiPxeXaKn +5Cg== X-Gm-Message-State: ALoCoQkKjJDFM+rGli2cQVXXhRMevG0c7+28pbMi9m8zy7voJumf3D5vG5CURtsmw3qpig3+iiXH X-Received: by 10.66.162.38 with SMTP id xx6mr912317pab.46.1404353973516; Wed, 02 Jul 2014 19:19:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.1 with SMTP id p1ls322139qga.97.gmail; Wed, 02 Jul 2014 19:19:33 -0700 (PDT) X-Received: by 10.58.228.74 with SMTP id sg10mr1098256vec.6.1404353973415; Wed, 02 Jul 2014 19:19:33 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id s7si13658964vcl.50.2014.07.02.19.19.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 19:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jz11so12467785veb.3 for ; Wed, 02 Jul 2014 19:19:33 -0700 (PDT) X-Received: by 10.220.69.68 with SMTP id y4mr1070559vci.21.1404353973330; Wed, 02 Jul 2014 19:19:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp337703vcb; Wed, 2 Jul 2014 19:19:32 -0700 (PDT) X-Received: by 10.68.163.100 with SMTP id yh4mr1666868pbb.122.1404353972449; Wed, 02 Jul 2014 19:19:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lf13si31663920pab.199.2014.07.02.19.19.31; Wed, 02 Jul 2014 19:19:31 -0700 (PDT) Received-SPF: none (google.com: linux-arm-msm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754077AbaGCCTa (ORCPT + 3 others); Wed, 2 Jul 2014 22:19:30 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:65175 "EHLO mail-oa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbaGCCTa (ORCPT ); Wed, 2 Jul 2014 22:19:30 -0400 Received: by mail-oa0-f44.google.com with SMTP id i7so13253506oag.17 for ; Wed, 02 Jul 2014 19:19:29 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.176.103 with SMTP id ch7mr1587901oec.64.1404353969499; Wed, 02 Jul 2014 19:19:29 -0700 (PDT) Received: by 10.182.233.166 with HTTP; Wed, 2 Jul 2014 19:19:29 -0700 (PDT) In-Reply-To: <53B4A607.7030001@codeaurora.org> References: <20140702055330.GA3454@dragon> <53B4A607.7030001@codeaurora.org> Date: Thu, 3 Jul 2014 07:49:29 +0530 Message-ID: Subject: Re: [PATCH 06/14] cpufreq: cpu0: defer probe if clock isn't registered yet From: Viresh Kumar To: Stephen Boyd Cc: Shawn Guo , "Rafael J. Wysocki" , Lists linaro-kernel , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , Arvind Chauhan , linux-arm-msm@vger.kernel.org, Sachin Kamat , Thomas P Abraham , Nishanth Menon , Tomasz Figa Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 3 July 2014 06:08, Stephen Boyd wrote: > Please make this a dev_dbg() or just remove it entirely. Sending a > message to the log on probe defer just duplicates what the driver core > is already doing. Updated as: Author: Viresh Kumar Date: Thu Jun 26 10:40:21 2014 +0530 cpufreq: cpu0: print relevant error when we defer probe Currently, we defer probe if regulator_get() returned -EPROBE_DEFER, i.e. regulator isn't registered yet. We do a dev_err() in this case. Sending a message to the log on probe defer just duplicates what the driver core is already doing. Convert it to dev_dbg() instead. We should defer in case of clk_get() as well. Current code already does it, but it wasn't intentional probably. Its just that we are returning the right error with wrong print message. Fix print message to convey right error. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-cpu0.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index 4273a5f..8a1166c 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -140,7 +140,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) * not yet registered, we should try defering probe. */ if (PTR_ERR(cpu_reg) == -EPROBE_DEFER) { - dev_err(cpu_dev, "cpu0 regulator not ready, retry\n"); + dev_dbg(cpu_dev, "cpu0 regulator not ready, retry\n"); ret = -EPROBE_DEFER; goto out_put_node; } @@ -151,7 +151,16 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) cpu_clk = clk_get(cpu_dev, NULL); if (IS_ERR(cpu_clk)) { ret = PTR_ERR(cpu_clk); - pr_err("failed to get cpu0 clock: %d\n", ret); + + /* + * If cpu's clk node is present, but clock is not yet + * registered, we should try defering probe. + */ + if (ret == -EPROBE_DEFER) + dev_dbg(cpu_dev, "cpu0 clock not ready, retry\n"); + else + dev_err(cpu_dev, "failed to get cpu0 clock: %d\n", ret); + goto out_put_reg; } -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in