Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1558677pxf; Fri, 19 Mar 2021 09:44:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlZlyYd1F3V1pgYfAgpZwhWXCWuH8Pemy5PMAN37ICCuQdDuAWeAhmUikatgogiI5PqU8F X-Received: by 2002:a17:906:2e01:: with SMTP id n1mr5261299eji.537.1616172289782; Fri, 19 Mar 2021 09:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616172289; cv=none; d=google.com; s=arc-20160816; b=px/l4+P6+P2G7wRxWGofGrHswkZ1K6AtrXUPFJKQ2UyjaxEROcb+W7lYo+WO8Jvss4 ahhc97X0F717E9Pqd/B3W/yO6jbsYAB9HR4BNHYZ01E6dax+Vl8fcEY/z4HTYVpkbfub xxoB1w66DQK9y7lz4P2EBGLQE+IbHRfSVGimKIcgcUr3kdr4cWvYA2yJx+Gtyk+ocwMk k098hVVkLV3ckVFqX4DjmHnhlwV+D/jkIA8yFRGe99xP4nilL2rgcCOMCOgXK+vuyyFc gEpYuIxxQwB8NUc4yrWe5WUpXAACdkKWGaHs2grJ1KMYwPsqPXjyWAC9C1oPI2xFsHGP i0sA== 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=0iTIInXm21ZP2pLXd46CRwZ2x9uzNXdVp2KD9cHdK/oUz8dyjCVnYjXHi0OY7K9lU3 kium9GTN5UOWVkMrXyghOmBM9FpxNSpBIrQNSv9Pn7R2q7UjoWzAWmvDamC2XYZJsS2U zj9zHmfP0o7cgBiKXtw/iGHeNsnLzJS1vvIl0kYOEBhNYDDVhvu6znX0/WL031dQxnrE bFYvDkjK7NVUvtRjAht9r3qki3WjU5Ofu2YVEPzsethRQipYUmWLkeTo6Irk0aSEsbh9 WcuOr/v16f+VG/uKSFdtyW3UJuzXioI2sn74++LxZ3Hk+26xdNJ3bm8n0W/QqlqhDt3z 8HyA== 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 cn4si4621206edb.52.2021.03.19.09.44.27; Fri, 19 Mar 2021 09:44:49 -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 S229949AbhCSQls (ORCPT + 99 others); Fri, 19 Mar 2021 12:41:48 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34453 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbhCSQlj (ORCPT ); Fri, 19 Mar 2021 12:41:39 -0400 X-Originating-IP: 5.92.35.220 Received: from uno.localdomain (mob-5-92-35-220.net.vodafone.it [5.92.35.220]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 4BDF7C0006; Fri, 19 Mar 2021 16:41:35 +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 v3 02/19] media: i2c: max9286: Rename reverse_channel_mv Date: Fri, 19 Mar 2021 17:41:31 +0100 Message-Id: <20210319164148.199192-3-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210319164148.199192-1-jacopo+renesas@jmondi.org> References: <20210319164148.199192-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