Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp54287rwb; Thu, 22 Sep 2022 14:20:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7V5kDejPZTZeoJTMcG8npkWleXmB49hUrPMqg1dP+/rLw2IWRVVctNLmMw+lURpcnVl6iz X-Received: by 2002:a05:6402:90e:b0:443:ec4b:2b03 with SMTP id g14-20020a056402090e00b00443ec4b2b03mr5205332edz.71.1663881599774; Thu, 22 Sep 2022 14:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663881599; cv=none; d=google.com; s=arc-20160816; b=N5CILsc1yJt60VDhQ+M1rm63fkUGFQrstluDGGFvFVGkrAGV8O4sXX9SBnhyGo/1Ow E5Ah04O2bBzhynhnITIqhRKsJsrICC/6tDyJ5B1VnNBCgXh2kMHr54XjpC4p+b1ecAnG XRC0gCAkAr13GyZ5ycACg9ulmNvSq9+5Y6+OJr4juLfosFfLU2/mxH8yojIgn69kYUJf XC5U9qS9yHp84ENvxGdLO1eqsvmS1zTrJBdWECSb5OjbpByPpRqTGkVGFBEXQQ3VVWOf 9RkMrM2SCd7wYtgsCoYdhz2by+jNUAPyVMpG4Bg3HjV98nI0jlz7ZVCsEvxvDhv5Av/U HYzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YDj+h1Y5VFJ2tL9P0OuWixh66aTjUqYEun6eXTi5uhc=; b=FVFCcM9s/XvjQseSlmiyC5RMRShNjaN+OA708q6sNrLS+U8FX1lnhnDLnYMA3wB6Fn eSzHW8LGFZRAGhxGBdDE3M0gBbMmMwSo/dcx3sW9kmNCohDcVUzhAeafEbII9zBE1LKe ngCoiYrEK1ieG6LNjDmB/DCz6YE85t8GwlYrbSM2noBfpfn90wrOumvEIx+PLHTeVUMK FT29V2qtE7OC0cyK14U/+WQopKXs2He2OHNSwk0mu3zhFWqpnOkS7ghs7TxuEPEr6AUJ ZVKs1WM2I1OlfWC/Reg59OaG1+Dz2Qer35U2mZL/Q4wc8n2S4MrPBJG2a5XQCowrpI8R dp3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DMOl9FDW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a05640235c700b0043dfc949d31si6757286edc.25.2022.09.22.14.19.19; Thu, 22 Sep 2022 14:19:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DMOl9FDW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbiIVUkA (ORCPT + 99 others); Thu, 22 Sep 2022 16:40:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229687AbiIVUj6 (ORCPT ); Thu, 22 Sep 2022 16:39:58 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB62A4F64E; Thu, 22 Sep 2022 13:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663879197; x=1695415197; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=nKjt8i5hI5NVF3hw3pzSK85gr4EvQwA7dsp365aeqTE=; b=DMOl9FDWNv69Q0o8bOdHPqZGZPLe/JGiGfFbUyTHpb2SaeLhsn65t2jf 9pEr9zGQoVd0uOVjmAAH54ZokazwlQ+D2tG0z4DW0VEnNteCU0KABVtAS MngLNcQ3ciBSPqSKh+XimK6/JUOaPdW7bOpGkTqB7YCcI4dn7Z5hY3lTS 3H5DhUc5mJT3ZI50veOrFXBskx14xntgSuxv+vHLqDCbYH0iHtrTscpeq dBGrLDg61KJZHULFtE21Ta6r1c6I7zRCFvKp9A9TH3yWVs3AUg3XUaJXu eDFUxcIv6CUYmHBPL0JIlEOcQHp8blgIr9bdQPh96X7Nfc3yH4kVAc0Ty A==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="300411398" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="300411398" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 13:39:56 -0700 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="762354903" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 13:39:50 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 60DAB2007A; Thu, 22 Sep 2022 23:39:48 +0300 (EEST) Date: Thu, 22 Sep 2022 20:39:48 +0000 From: Sakari Ailus To: Mikhail Rudenko Cc: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Hans Verkuil , Jacopo Mondi , Shawn Tu , Randy Dunlap , Daniel Scally , Christian Hemp , Laurent Pinchart , Marek Vasut , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] media: i2c: add support for ov4689 Message-ID: References: <20220911200147.375198-1-mike.rudenko@gmail.com> <20220911200147.375198-3-mike.rudenko@gmail.com> <87czbnif04.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87czbnif04.fsf@gmail.com> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mikhail, On Thu, Sep 22, 2022 at 06:23:05PM +0300, Mikhail Rudenko wrote: > > Hi Sakari, > > and thanks for reviewing this! You're welcome! > > Please see my comments below: > > On 2022-09-22 at 09:53 GMT, Sakari Ailus wrote: ... > >> +static inline u32 ov4689_cal_delay(u32 cycles) > >> +{ > >> + return DIV_ROUND_UP(cycles, OV4689_XVCLK_FREQ / 1000 / 1000); > > > > Please use the actual rate instead. > > > > Do you mean clk_get_rate(ov4689->xvclk), right? What if we have an ACPI Yes. > system and xvclk is NULL here? Please explain. There are a few ways this could work on ACPI based systems but generally you'd have "clock-frequency" property to indicate the frequency even if clocks themselves wouldn't be available (when controlled via ACPI)). -- Kind regards, Sakari Ailus