Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbdILJOp (ORCPT ); Tue, 12 Sep 2017 05:14:45 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:35602 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbdILJOn (ORCPT ); Tue, 12 Sep 2017 05:14:43 -0400 X-Google-Smtp-Source: AOwi7QBwRyMFZCr1FDKPlEifp1Fvh5UzNiuHpZvwNVIRDJKjPk9x+7mScjtcqI3BFdnU4t+NXNYSHL8TzsIj1PHKhbU= MIME-Version: 1.0 In-Reply-To: <021a99bb-3670-fff5-6835-b14d28827929@ti.com> References: <20170911201145.31257-1-fcooper@ti.com> <20170911201145.31257-2-fcooper@ti.com> <021a99bb-3670-fff5-6835-b14d28827929@ti.com> From: Baolin Wang Date: Tue, 12 Sep 2017 17:14:42 +0800 Message-ID: Subject: Re: [PATCH v4 1/2] i2c: davinci: Add PM Runtime Support To: Sekhar Nori Cc: Franklin S Cooper Jr , Wolfram Sang , Rob Herring , linux@armlinux.org.uk, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, LKML , linux-arm-kernel@lists.infradead.org, grygorii.strashko@ti.com, vigneshr@ti.com 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: 1048 Lines: 31 Hi, On 12 September 2017 at 16:48, Sekhar Nori wrote: > On Tuesday 12 September 2017 07:28 AM, Baolin Wang wrote: >>> @@ -802,13 +821,24 @@ static int davinci_i2c_probe(struct platform_device *pdev) >>> dev->clk = devm_clk_get(&pdev->dev, NULL); >>> if (IS_ERR(dev->clk)) >>> return PTR_ERR(dev->clk); >>> - clk_prepare_enable(dev->clk); > >> You removed clk enable here, I think it can not work if we did not >> open CONFIG_PM macro. I think you should keep clk enable here, and set > > What do you mean by "open CONFIG_PM macro" ? If you did not open CONFIG_PM macro, then the pm_runtime_xxx() will be dummy functions, but now the i2c driver can not work since you did not enable clock, right? > >> rpm active by pm_runtime_set_active() before issuing >> pm_runtime_enable(). > > Can you explain why you want to do this instead of relying on > pm_runtime_get_sync() to enable clock? What I mean is you should compatible whether CONFIG_PM is enabled or not. -- Baolin.wang Best Regards