Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp451345ybh; Tue, 10 Mar 2020 01:51:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsVkGI0jxGu5f+HO0tHNsmMZpeS/d+1BNMDqJBpif+az95u8YI5XQt8XCK4Fc9XUS8/ny2Z X-Received: by 2002:aca:f086:: with SMTP id o128mr343842oih.41.1583830265723; Tue, 10 Mar 2020 01:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583830265; cv=none; d=google.com; s=arc-20160816; b=QxkKji0ymiEla5nMJcQ1sTSBZg09pjCLxFJ+GVW4Zfd9746M/Rk6AhQ20r85zkXwwa kWHWipoFWpYCa0Ip05L3WedKfkfxnBrM7dza6TmMzq42+FEsxj5Qm375DUSM39ZGH0eh Bi9KGNIasBDZgU5E7Mt+KGVrvmospavFFQp//xO4m9ZN4nfOh9kqOdqJTa9phCTQJztD j0dVmDstpAXhPxcnIXMSXe0SkmU4ixAs82Pbe00wCCP97XnMdJuEkE3QkXuaXRnnOmkW LlJ2IZuhO3+rSfZG67eVXDJWdnReMVllS0Tr96J5iDxGon2vP09XkFZO4f65IT3qG3wU sLEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dvxte1wcN1zbOHdtA3AQuPN+65mx736x6XF0JSg/uZA=; b=FZl0eTR//Rjnlh/cu4BNxlpaJIep9U8sE8e9q2bEF+FjCLdQtGj8j99fTBqVJdp8e0 uMBOktPDrVTRYm+DK1qov2TSJdlsosV9vT7bolQ7gE/4/F62aLjWqYmLGE2yfmzKsgMu wLb7z9Y/oxJDjicBJ2l/cKBnHn1slYMzYDRm5DYfAyYn57BuosKIkfi/M/ZvSVfy12Pt MNe7L7rPFSg1ygx45R5ZRIPeOW+7fbUVTdjuvukDvOQsLLcnnZSCGK7q0QJcYcxFa3KA 03g8lKGUgb+IwxBGBFlgHOMs/M1HPoMVCviOmrmywC4HrwBInwLe6PzosNiniKvByrs5 Qccg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a59si8024599otb.8.2020.03.10.01.50.53; Tue, 10 Mar 2020 01:51:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgCJIuf (ORCPT + 99 others); Tue, 10 Mar 2020 04:50:35 -0400 Received: from mga11.intel.com ([192.55.52.93]:47014 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbgCJIue (ORCPT ); Tue, 10 Mar 2020 04:50:34 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 01:50:33 -0700 X-IronPort-AV: E=Sophos;i="5.70,535,1574150400"; d="scan'208";a="353571216" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 01:50:30 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 8506F209DF; Tue, 10 Mar 2020 10:50:27 +0200 (EET) Date: Tue, 10 Mar 2020 10:50:27 +0200 From: Sakari Ailus To: Lad Prabhakar Cc: Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Kieran Bingham , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lad Prabhakar Subject: Re: [PATCH 2/2] media: i2c: ov5645: Switch to assigned-clock-rates Message-ID: <20200310085027.GA5379@paasikivi.fi.intel.com> References: <1583754373-16510-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> <1583754373-16510-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1583754373-16510-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, On Mon, Mar 09, 2020 at 11:46:13AM +0000, Lad Prabhakar wrote: > This patch switches to assigned-clock-rates for specifying the clock rate. > The clk-conf.c internally handles setting the clock rate, as a result > setting the clk rate from the driver is dropped. > > Correspondingly imx6qdl-wandboard.dtsi which references to ov5645 has been > updated to use assigned-clock-rates in the same patch to avoid bisect > failures. > > Signed-off-by: Lad Prabhakar > --- > arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 3 ++- > drivers/media/i2c/ov5645.c | 9 ++------- > 2 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi > index c070893..71f5f75 100644 > --- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi > +++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi > @@ -126,7 +126,8 @@ > reg = <0x3c>; > clocks = <&clks IMX6QDL_CLK_CKO2>; > clock-names = "xclk"; > - clock-frequency = <24000000>; > + assigned-clocks = <&clks IMX6QDL_CLK_CKO2>; > + assigned-clock-rates = <24000000>; > vdddo-supply = <®_1p8v>; > vdda-supply = <®_2p8v>; > vddd-supply = <®_1p5v>; Shouldn't this be a separate patch? > diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c > index a6c17d1..2aa2677 100644 > --- a/drivers/media/i2c/ov5645.c > +++ b/drivers/media/i2c/ov5645.c > @@ -1094,7 +1094,8 @@ static int ov5645_probe(struct i2c_client *client) > return PTR_ERR(ov5645->xclk); > } > > - ret = of_property_read_u32(dev->of_node, "clock-frequency", &xclk_freq); > + ret = of_property_read_u32(dev->of_node, "assigned-clock-rates", > + &xclk_freq); I think you'd still need to check for clock-frequency to be compatible with existing DT binaries. > if (ret) { > dev_err(dev, "could not get xclk frequency\n"); > return ret; > @@ -1107,12 +1108,6 @@ static int ov5645_probe(struct i2c_client *client) > return -EINVAL; > } > > - ret = clk_set_rate(ov5645->xclk, xclk_freq); > - if (ret) { > - dev_err(dev, "could not set xclk frequency\n"); > - return ret; > - } > - > for (i = 0; i < OV5645_NUM_SUPPLIES; i++) > ov5645->supplies[i].supply = ov5645_supply_name[i]; > -- Regards, Sakari Ailus