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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27AB7EB64DC for ; Mon, 19 Jun 2023 10:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbjFSKqN (ORCPT ); Mon, 19 Jun 2023 06:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbjFSKpq (ORCPT ); Mon, 19 Jun 2023 06:45:46 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B105D7; Mon, 19 Jun 2023 03:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687171522; x=1718707522; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=j50suO6EXOz8Oo186nH+IrtVagP+D115no47h3wo7UU=; b=NtmXgZ6SYKmYYxENFPLAAPqAtgC6lx3j821ZBuuRQjHKa9hyBeZTDpsB C3OqCr1/GB2fL1ylBluGLMRmlvbVzJN3R6VPtXg1fBXzO46n04irhKdvC juLIEh+mg72XJjdhpGIlQbLCAVWo2fgZX/XABxrho6ApxJL6WkAD2CneU 0j26I20Z+X1F0/kcfhLrXbvNxHz7pS/77NQZfjt3DG5kwEHdxkdU1Hwx4 diNXLbkCnA+XFAivphJ3WbieWH+7EdJhh41Yf0oM/hVfJECs0M7BZg1pU hulr4IYzqOkEI9R7y5ZVin1a/aGeNOQcBcuemfaJvpB83X17OkNSgqbej Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="363024614" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="363024614" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 03:45:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="713623657" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="713623657" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga002.jf.intel.com with ESMTP; 19 Jun 2023 03:44:59 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qBCNU-004y7U-2k; Mon, 19 Jun 2023 13:44:56 +0300 Date: Mon, 19 Jun 2023 13:44:56 +0300 From: Andy Shevchenko To: Tomi Valkeinen Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Luca Ceresoli , Matti Vaittinen , Laurent Pinchart , Sakari Ailus , Wolfram Sang , Rob Herring , Krzysztof Kozlowski , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Michael Tretter , Hans Verkuil , Mike Pagano , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Marek Vasut , Satish Nagireddy Subject: Re: [PATCH v14 17/18] media: i2c: ds90ub953: Restructure clkout management Message-ID: References: <20230616135922.442979-1-tomi.valkeinen@ideasonboard.com> <20230616135922.442979-18-tomi.valkeinen@ideasonboard.com> <002e0475-23dd-5106-6f5c-e4b50a0c506f@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002e0475-23dd-5106-6f5c-e4b50a0c506f@ideasonboard.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Jun 19, 2023 at 01:14:34PM +0300, Tomi Valkeinen wrote: > On 16/06/2023 17:37, Andy Shevchenko wrote: > > On Fri, Jun 16, 2023 at 04:59:21PM +0300, Tomi Valkeinen wrote: > > > Separate clkout calculations and register writes into two functions: > > > ub953_calc_clkout_params and ub953_write_clkout_regs, and add a struct > > > ub953_clkout_data that is used to store the clkout parameters. ... > > > +struct ub953_clkout_data { > > > + u32 hs_div; > > > + u32 m; > > > + u32 n; > > > > Please, use struxt u32_fract instead of m/n. > > I'm not sure how that helps. The documentation talks about m and n. Using > different terms will make it more difficult to compare the code and the > docs. You can always add a comment. (For example in drivers/clk/clk-fractional-divider.c our documentation also says about m/n, but most of the people understands that this is about fractional divider and actually with properly spelled parameters it will help others who are not experts in the CLK hardware.) -- With Best Regards, Andy Shevchenko