Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3287407pxf; Mon, 15 Mar 2021 06:20:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm+0cUouNtMomjct3woEgc0HSgP31nMuFzLLthFNFmY6KyA3++pON7FisJu44zrCwajx2i X-Received: by 2002:a17:906:5797:: with SMTP id k23mr24087321ejq.515.1615814404657; Mon, 15 Mar 2021 06:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615814404; cv=none; d=google.com; s=arc-20160816; b=g6y49TQzzmvY6yT3F/J3/6ORCMzHlpxbmuwGVvLPxfEOfYya6+DcoFT0DjMga2EDMj LxQ5OtD5yG9XkorQ0Y6bi85zfg6lroWiHjAFhALW0alSLSgtjhOLOjYHz/Wo5M6fbYCf 2VCvjT6KS4U9Vn9U1+CrNoCcIuTE890Gq6THKrh5KyMNfJVX2GJfrzUy5P9CyOHbwcLB CJhLn3A0qySqskm6s1d0xXP16XgV6iWCUifTXH1yftLn5e09pthsV4H7PVHvX8OhmbG9 34zG1gWX7TRNTLh9mgp0PjFgbTrtll2wSUbf+8WxVvxKbimOhgTYmOPkVZPixvwjGS17 81Eg== 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=MtKSmoUWQ71sljtvkrEQwjKYfzmZsr3AaKUCCzZ0iII=; b=OIL4wvrnBRit4Iw2+6ah/4Z4h9BUYgHiSkgB+m0UVi0m0ZUDhUFJkYVumWx6Nznoy5 9OSyjrXDcfVODhezg9VQ71SJYQybHevYRobEi0qwXMkhi9HeVRqp6gZfVcVcy43rUTxm 2LU1bacz3vkpuaskfS1S/FP9ve2jZwc2AW1dR9zO2AHe8tpiTQHH0bKTxhPUK2KOqZmJ KSd8Dz26jnCESMbXiUU/T2D3wHWxcAbYQLh1m5VbxBU/kGidkX6VFJIfvDSe7Oikq2bp VtDaP7RRyShusOZSfvV0lJKmwxTjVyJhOcoKQMkON23BbN/WqSVULLXCz3YxF3zmv5Oh g4vA== 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 e9si11221902edv.149.2021.03.15.06.19.42; Mon, 15 Mar 2021 06:20:04 -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 S231213AbhCONQD (ORCPT + 99 others); Mon, 15 Mar 2021 09:16:03 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:51123 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230450AbhCONPi (ORCPT ); Mon, 15 Mar 2021 09:15:38 -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 BDC11FF812; Mon, 15 Mar 2021 13:15:33 +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 15/18] media: i2c: max9286: Define high channel amplitude Date: Mon, 15 Mar 2021 14:15:09 +0100 Message-Id: <20210315131512.133720-16-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 Provide a macro to define the reverse channel amplitude to be used to compensate the remote serializer noise immunity. While at it, update a comment. Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- drivers/media/i2c/max9286.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index ed1cdefe7c30..9124d5fa6ea3 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -113,6 +113,7 @@ #define MAX9286_REV_TRF(n) ((n) << 4) #define MAX9286_REV_AMP(n) ((((n) - 30) / 10) << 1) /* in mV */ #define MAX9286_REV_AMP_X BIT(0) +#define MAX9286_REV_AMP_HIGH 170 /* Register 0x3f */ #define MAX9286_EN_REV_CFG BIT(6) #define MAX9286_REV_FLEN(n) ((n) - 20) @@ -567,12 +568,12 @@ static int max9286_notify_bound(struct v4l2_async_notifier *notifier, * channels: * * - Increase the reverse channel amplitude to compensate for the - * remote ends high threshold, if not done already + * remote ends high threshold * - Verify all configuration links are properly detected * - Disable auto-ack as communication on the control channel are now * stable. */ - max9286_reverse_channel_setup(priv, 170); + max9286_reverse_channel_setup(priv, MAX9286_REV_AMP_HIGH); max9286_check_config_link(priv, priv->source_mask); /* -- 2.30.0