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 6E701C25B4E for ; Tue, 24 Jan 2023 10:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233762AbjAXKim (ORCPT ); Tue, 24 Jan 2023 05:38:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233743AbjAXKi1 (ORCPT ); Tue, 24 Jan 2023 05:38:27 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2146E43461 for ; Tue, 24 Jan 2023 02:38:04 -0800 (PST) X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="324942481" X-IronPort-AV: E=Sophos;i="5.97,242,1669104000"; d="scan'208";a="324942481" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2023 02:37:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="692552649" X-IronPort-AV: E=Sophos;i="5.97,242,1669104000"; d="scan'208";a="692552649" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 24 Jan 2023 02:37:47 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pKGgT-00EIIN-0B; Tue, 24 Jan 2023 12:37:45 +0200 Date: Tue, 24 Jan 2023 12:37:44 +0200 From: Andy Shevchenko To: Hans de Goede Cc: Mauro Carvalho Chehab , Sakari Ailus , Tsuchiya Yuto , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 35/57] media: atomisp: ov2680: Make setting the modes algorithm based Message-ID: References: <20230123125205.622152-1-hdegoede@redhat.com> <20230123125205.622152-36-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230123125205.622152-36-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Mon, Jan 23, 2023 at 01:51:43PM +0100, Hans de Goede wrote: > Instead of using a long fixed register settings list for each resolution, > calculate the register settings based on the requested width + height. > > This will allow future enhancements like adding hblank and vblank controls > and adding selection support. ... > + ret = ovxxxx_write_reg16(client, OV2680_HORIZONTAL_START_H, sensor->mode.h_start); > + if (ret) > + return ret; > + > + ret = ovxxxx_write_reg16(client, OV2680_VERTICAL_START_H, sensor->mode.v_start); > + if (ret) > + return ret; Wondering if those registers are always being accessed as 16-bit. In such case I would consider to drop _L definitions along with _H suffixes. -- With Best Regards, Andy Shevchenko