Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp697137pxj; Wed, 16 Jun 2021 11:25:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyssxyZM5FS19Dd3b6TvusQKUVUwRee1Z7H/pX/lg8N1gx0OL9fLR2ne+/OOKV/dh20/tt6 X-Received: by 2002:a05:6402:366:: with SMTP id s6mr1297969edw.209.1623867952849; Wed, 16 Jun 2021 11:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623867952; cv=none; d=google.com; s=arc-20160816; b=BMEpfHZhj0TPkf27cra1v9HzqzPkOM4ZoMysmD9prHRwPRPcpS+FAcvIyxpDQ+pTaW OU5ZkV+FWUmZYcP6Vld4bDOvaP5jFiPMOc1dzV0clthMcQmOmaN+PK+jMmvQakKwBNyX wJnaEE5gC5J1OsVAgNhya6OtzU9jZOjCkhN0Nq94tHYKUfX8C2mTwmrVwTU0zBA1PkIj 1CIS3N/xG9qYvrqxz9aQNMiC4GRkZ6W5hcYvlPQ7QCEPOlKt5VTNMXcEJguDaVRF2tdO aCifIHnxLvgjjGbUefN8Y9hd/mhJEfJ1xWc6vv5sa8dkNbzdTfGp8NgTGcJIf/pI57rE 6g7w== 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=kpN3x+Jx7BntRE4l2gmxUi2dndp5s0jRRgMvzKD6uwc=; b=MdvJjsIuZV0FuBAni3tMhxgowQQoknM6tR8fJYHt5zh62hOgOioDbfyl1uHhKaAiIR k74K/sZ/vowZb7W3IwVt/ghB/KdbAjapo14BkgcnTr56WhmBloAMF/XxRydok5ubTpW+ 0B99CTx4RxDKv764s6ucFf5FwsQ6FW8FThygIA4IwCDIX2Jby56PDnsu4J9Q6eoxfCpp kV7e+qn+SUosiRjYlTFqsP0Uw6D8AHdyYq+IQ9YMzPMR2sJVA6s2ryJjP0VrnSINYc+r wTRHiY2KyTsJxQSj2KFeG5ZfgNeScZ/9qtn0oJWCScCYccfvb0q4HbatUzlEwDCbnE0K AsvA== 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 di7si3069455ejc.71.2021.06.16.11.25.30; Wed, 16 Jun 2021 11:25:52 -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 S232853AbhFPMrv (ORCPT + 99 others); Wed, 16 Jun 2021 08:47:51 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:42903 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230269AbhFPMrt (ORCPT ); Wed, 16 Jun 2021 08:47:49 -0400 Received: (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 800B01C0016; Wed, 16 Jun 2021 12:45:40 +0000 (UTC) From: Jacopo Mondi To: Hans Verkuil , 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 v5 02/15] media: i2c: max9286: Rename reverse_channel_mv Date: Wed, 16 Jun 2021 14:46:03 +0200 Message-Id: <20210616124616.49249-3-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210616124616.49249-1-jacopo+renesas@jmondi.org> References: <20210616124616.49249-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. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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.31.1