From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D625C2BB85 for ; Tue, 7 Apr 2020 12:18:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23E5C20731 for ; Tue, 7 Apr 2020 12:18:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ki3AHBrZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728590AbgDGMSb (ORCPT ); Tue, 7 Apr 2020 08:18:31 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:41218 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbgDGMSb (ORCPT ); Tue, 7 Apr 2020 08:18:31 -0400 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ACABD59E; Tue, 7 Apr 2020 14:18:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586261909; bh=fPdYE8A3jszFhj8Ia41Q61eXHMMvA97zhV0Z1oSNhpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ki3AHBrZ4A1pHq9QyVUJmBRoyYy6r5XgnCvPLxfUMdFWAd+t6vap0lPuXVl4Exjrn QGGFNT4zOWrpzji+6HaLIZro4VSBmpIW0R27U01g31cKRxQ33UG9t2g5bFRqwJzII4 BTM6sXy8JiOEaVdicsbrqxvEd0mfTiJATCkYEotA= Date: Tue, 7 Apr 2020 15:18:18 +0300 From: Laurent Pinchart To: "Lad, Prabhakar" Cc: Geert Uytterhoeven , Lad Prabhakar , Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Kieran Bingham , Geert Uytterhoeven , Linux Media Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Linux ARM Subject: Re: [PATCH v5 2/5] media: i2c: ov5645: Drop reading clock-frequency dt-property Message-ID: <20200407121818.GC4751@pendragon.ideasonboard.com> References: <1586191361-16598-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> <1586191361-16598-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Prabhakar, On Tue, Apr 07, 2020 at 08:40:06AM +0100, Lad, Prabhakar wrote: > On Tue, Apr 7, 2020 at 8:17 AM Geert Uytterhoeven wrote: > > On Mon, Apr 6, 2020 at 6:43 PM Lad Prabhakar wrote: > > > Modes in the driver are based on xvclk frequency fixed to 24MHz, but where > > > as the OV5645 sensor can support the xvclk frequency ranging from 6MHz to > > > 24MHz. So instead making clock-frequency as dt-property just let the > > > driver enforce the required clock frequency. > > > > > > Signed-off-by: Lad Prabhakar > > > > Reviewed-by: Geert Uytterhoeven > > > > However, still wondering about the "xvclk" name above and in the definition > > below. Is this the naming from the datasheet? > > The DT bindings nor the driver use the "xvclk" naming. > > > xvclk naming is from the datasheet, although the 0v5645 datasheet on > publicly available I have referred [1]/[2]. > If I am not wrong all the ov sensors have the same naming convention as xvclk. > > [1] https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf > [2] https://www.ovt.com/download/sensorpdf/126/OmniVision_OV5645.pdf The clock in DT should really have been named xvclk, but it's too late to change that. We can follow one of two approaches, either naming everything xclk, and naming everything but the DT property xvclk. Both have pros and cons, feel free to pick your preferred option, but in any case a comment to explain the issue would be useful. > > > --- a/drivers/media/i2c/ov5645.c > > > +++ b/drivers/media/i2c/ov5645.c > > > @@ -61,6 +61,8 @@ > > > #define OV5645_SDE_SAT_U 0x5583 > > > #define OV5645_SDE_SAT_V 0x5584 > > > > > > +#define OV5645_XVCLK_FREQ 24000000 > > > + -- Regards, Laurent Pinchart