Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbbFXJJ4 (ORCPT ); Wed, 24 Jun 2015 05:09:56 -0400 Received: from mail-yh0-f50.google.com ([209.85.213.50]:35695 "EHLO mail-yh0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbbFXJJt (ORCPT ); Wed, 24 Jun 2015 05:09:49 -0400 MIME-Version: 1.0 In-Reply-To: <20150624085658.GF27188@linux> References: <1433766561-1330-1-git-send-email-pi-cheng.chen@linaro.org> <1433766561-1330-3-git-send-email-pi-cheng.chen@linaro.org> <20150622114511.GA28340@linux> <20150624005759.GA6424@linux> <20150624085658.GF27188@linux> Date: Wed, 24 Jun 2015 17:09:49 +0800 Message-ID: Subject: Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver From: Pi-Cheng Chen To: Viresh Kumar Cc: Mike Turquette , Matthias Brugger , Mark Rutland , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , "linux-pm@vger.kernel.org" , Linaro Kernel Mailman List , linux-mediatek@lists.infradead.org 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: 1528 Lines: 43 On Wed, Jun 24, 2015 at 4:56 PM, Viresh Kumar wrote: > On 24-06-15, 16:44, Pi-Cheng Chen wrote: >> One reason to put those initialization and resource allocation in probe is >> that it's easier to handle the return value -PROBE_DEFER from clock >> and regulator framework when trying to get clocks and regulators >> consumed by cpufreq driver. > > This is the sequence of events if you move these things to ->init(). > > - your driver's probe() > -> cpufreq_register_driver() > -> init() > -> clk/reg get, failed, return -EPROBE_DEFER > > And the failure here will be propagated to probe(). So, it should > work IMHO. I will try it. > >> The other reason is when the whole system is resuming from suspend, >> the other subsystem e.g. i2c on which cpufreq driver depends might not >> ready yet during cpufreq driver initialization. In this case, the cpufreq >> driver will be blocked when trying to get resources e.g. regulator on i2c >> bus, and the whole system will stuck for seconds. > > That's something else you must investigate on. This dependency should > be resolved in some other way, I thought DT might have taken care of > such dependencies. I will check if it could be solved in some other way. Thanks. Pi-Cheng > > -- > viresh -- 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/