Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7434388pxb; Thu, 18 Feb 2021 09:57:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjVLKP+Vri0m0UvNa490Bshg7l80kkvgntzOM8oiQufsZD9qsBdqBjolkGPKnh1uz34uc/ X-Received: by 2002:a17:906:3e17:: with SMTP id k23mr5250934eji.332.1613671036109; Thu, 18 Feb 2021 09:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613671036; cv=none; d=google.com; s=arc-20160816; b=dKhDZijLsPt6uj3jeeKtEF1o7SUvbCMZycgrmf6wvxNOeOG4tBG8qhhBaFKMiBR+3G QzuXQF8YAc0HbW8+bOi9FKvIHa66aOqAv5WIo1TGx4pPENms+rBZfZjDYj0/fi7Iukf+ /0clURIeVkLN7ZjRFdpNFtG4MifFTpYnsOsIwgsszOy0PKbgxbYcCK2SSdUsjsc7BXYU BQZVLQgDSnuFTK0W43ll07rhj+1ixKfdyV0TrnWyPYnfaILI+0M5eyaNE8ZGBHHFRL9j lZVmtGuNpMG2+P6wkLdbb92/voSRLiqaB7pEvGUtn46cFXH+CHApfEVhGuregInMkfES 7nRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:reply-to:dkim-signature; bh=Tfnq3QIzRBhCyaDz4hFVBEY8YSGEqYE/xegjOSv+SPg=; b=hkHR6HETvRQ10/W3JbaJmviipgSgfigRtugJwE9RtGYa8/kFwnImLX9JzAyiovCw3x x4SAMfXgdEPFLvjUNlXEQhTGZjFaXAV1dZUC7u/64/M+SsWYXe1edj1mqNJ+ajSbQk7p +U5toUSM1MV4i6ac4OmMHinc/4cdDvjph2aUN5REg+EZ3sDRbjhGy7Mj7PGyGWnbte9q zGEMc3/CxBojq8P6+nC9VUV/59HzYVrvuaAiR1cIpmX9+/xuHWMDYXD+Kbbc/tactb/v 81x4eHfPXsess6n424C1HwXKthhtiqwDL0WGGZ6ze4Wbf1MfVZZ6SUZi7ni9vT7nogjk S5sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=I7tWCKzD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn25si2665064edb.503.2021.02.18.09.56.52; Thu, 18 Feb 2021 09:57:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=I7tWCKzD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234807AbhBRRxt (ORCPT + 99 others); Thu, 18 Feb 2021 12:53:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbhBRPJY (ORCPT ); Thu, 18 Feb 2021 10:09:24 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F5A2C0617A9; Thu, 18 Feb 2021 07:06:09 -0800 (PST) Received: from [192.168.0.20] (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 546383E7; Thu, 18 Feb 2021 16:06:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613660765; bh=dSBqhVkp/iAa5cgZEEnWPWhwlXHCmngOAaA5uAmLBNs=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=I7tWCKzD49p26ryzl1QeMEiSvCHKvWl9rbIEGioJtgnr+AvMalEvrkQNZ5B5teWD6 GvXB0w8YJYTWIyOBzS13TDcDYXRA0/5Vp3clfTxMEXxsHdvDi1FogO7txLbSXr38AY BJ1nL82Gy9bjMhBNAt7U58M3kOOFEcp3TZ0c7mjg= Reply-To: kieran.bingham+renesas@ideasonboard.com Subject: Re: [PATCH 10/16] media: i2c: max9286: Rename reverse_channel_mv To: Jacopo Mondi , laurent.pinchart+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210216174146.106639-1-jacopo+renesas@jmondi.org> <20210216174146.106639-11-jacopo+renesas@jmondi.org> From: Kieran Bingham Organization: Ideas on Board Message-ID: <9e1cca71-e0f0-4d66-d3f5-268760c53eec@ideasonboard.com> Date: Thu, 18 Feb 2021 15:06:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210216174146.106639-11-jacopo+renesas@jmondi.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, On 16/02/2021 17:41, Jacopo Mondi wrote: > Rename the reverse_channel_mv variable to init_rev_chan_mv as > the next patches will cache the reverse channel amplitude in > a new driver variable. > I've been trying to figure out if we really do need two variables to store this now, but I can't see an easy way to factor out the initialisation value, and I like the idea of caching the current stored value. So Reviewed-by: Kieran Bingham > Signed-off-by: Jacopo Mondi > --- > drivers/media/i2c/max9286.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c > index 1d9951215868..1f14cd817fbf 100644 > --- a/drivers/media/i2c/max9286.c > +++ b/drivers/media/i2c/max9286.c > @@ -163,7 +163,7 @@ struct max9286_priv { > unsigned int mux_channel; > bool mux_open; > > - u32 reverse_channel_mv; > + u32 init_rev_chan_mv; > > struct v4l2_ctrl_handler ctrls; > struct v4l2_ctrl *pixelrate; > @@ -563,7 +563,7 @@ static int max9286_notify_bound(struct v4l2_async_notifier *notifier, > * - Disable auto-ack as communication on the control channel are now > * stable. > */ > - if (priv->reverse_channel_mv < 170) > + if (priv->init_rev_chan_mv < 170) > max9286_reverse_channel_setup(priv, 170); > max9286_check_config_link(priv, priv->source_mask); > > @@ -971,7 +971,7 @@ static int max9286_setup(struct max9286_priv *priv) > * only. This should be disabled after the mux is initialised. > */ > max9286_configure_i2c(priv, true); > - max9286_reverse_channel_setup(priv, priv->reverse_channel_mv); > + max9286_reverse_channel_setup(priv, priv->init_rev_chan_mv); > > /* > * Enable GMSL links, mask unused ones and autodetect link > @@ -1236,9 +1236,9 @@ static int max9286_parse_dt(struct max9286_priv *priv) > if (of_property_read_u32(dev->of_node, > "maxim,reverse-channel-microvolt", > &reverse_channel_microvolt)) > - priv->reverse_channel_mv = 170; > + priv->init_rev_chan_mv = 170; > else > - priv->reverse_channel_mv = reverse_channel_microvolt / 1000U; > + priv->init_rev_chan_mv = reverse_channel_microvolt / 1000U; > > priv->route_mask = priv->source_mask; > >