Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3286027pxf; Mon, 15 Mar 2021 06:18:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfnvZzfUhs4SzxlmvgVVb5QJXbW7Yf37LVfI2TumyNzD5NycCWxELJQGSZYZCaGC+nlLLD X-Received: by 2002:a50:e882:: with SMTP id f2mr30016981edn.184.1615814296245; Mon, 15 Mar 2021 06:18:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615814296; cv=none; d=google.com; s=arc-20160816; b=OwgOfyBkTB3GZu6lj8YEyeda6natzFcvwk3hGwnv9fIIP7dx/ZYpAGdU5oVZN4Gmu2 0O1L81YUEpDIvDj3QjwZZnmw/1cnrJQgtv0ORSp1dh7DaZj7zf0jROyEM5xS4hxPtzTR Jv9LEqCvCnU8WNJzAgo0xDKB9ch/zWZ1GyU6BgzL68CWmIR7EmQN36QhA2tzKeMwACDY cHR7fJAGwK8uM3ROPLK6gNoTIse2vPHse7j8xIBsvHbIu4LVYXBY1CrQ3H5FRO7x0Ko3 BBKBOXopc2t6bK14QyGnsw5q6XHVeeH5cifL7zks8FSYnwSOhodrkjqFK6CruTBT60IU QuHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rtxAMmjWqi2wYTc7TKgA+swi2nZYgvGzvRXXc2zPvJw=; b=W2OzH8PIGxDREukpEftvbk6XYPQWvEcTbp3J9Rt1dnVkP1eigTdKNZ0aFplxHeQVqF Y5rXgaKOFqUK6TtkY2sj72QnWQXQjtbnCdKA74L1+lfW3NIGLcMdbxt22ns1xWU0RsHW OsMmQuljTnd2JpEIDv+mU/m3sk/pV+uBfZ3tPgfB7ElADAsl2UdaLOQWeT45DL0OL2Fb Cqv6OaGQwlwg4LmwzEGpJ460ae0Nd/oXeFbS2smtuzJ1vmVptweHjPMvFsSpSHgrX7/s Syi5HHUGaddLlYtfvsQcQ4mZOLYrQIsLnoi61gUN1Ym6EM07B8y4W9IfXA9l+rg/UX/4 2LBA== ARC-Authentication-Results: i=1; mx.google.com; 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 hy25si10506495ejc.333.2021.03.15.06.17.51; Mon, 15 Mar 2021 06:18:16 -0700 (PDT) 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; 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 S230443AbhCONQA (ORCPT + 99 others); Mon, 15 Mar 2021 09:16:00 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44413 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbhCONPd (ORCPT ); Mon, 15 Mar 2021 09:15:33 -0400 X-Originating-IP: 79.22.58.175 Received: from uno.homenet.telecomitalia.it (host-79-22-58-175.retail.telecomitalia.it [79.22.58.175]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 3A081FF810; Mon, 15 Mar 2021 13:15:27 +0000 (UTC) From: Jacopo Mondi To: kieran.bingham+renesas@ideasonboard.com, laurent.pinchart+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org Cc: Jacopo Mondi , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Laurent Pinchart Subject: [PATCH v2 13/18] media: i2c: max9286: Rename reverse_channel_mv Date: Mon, 15 Mar 2021 14:15:07 +0100 Message-Id: <20210315131512.133720-14-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210315131512.133720-1-jacopo+renesas@jmondi.org> References: <20210315131512.133720-1-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the reverse_channel_mv variable to init_rev_chan_mv as the next patch will cache the reverse channel amplitude in a new driver variable. Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- drivers/media/i2c/max9286.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index 1d9951215868..82ec05e96cb7 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -163,7 +163,8 @@ struct max9286_priv { unsigned int mux_channel; bool mux_open; - u32 reverse_channel_mv; + /* The initial reverse control channel amplitude. */ + u32 init_rev_chan_mv; struct v4l2_ctrl_handler ctrls; struct v4l2_ctrl *pixelrate; @@ -563,7 +564,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 +972,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 +1237,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; -- 2.30.0