Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp464294pxj; Wed, 16 Jun 2021 06:34:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY67quDdmrnaH3j+HJDo4dSPuOfVuCMNsUhjMapCP4V72wkLd7k9PUQ913sLqy0nCvhUVS X-Received: by 2002:a05:6602:204f:: with SMTP id z15mr31078iod.172.1623850466340; Wed, 16 Jun 2021 06:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623850466; cv=none; d=google.com; s=arc-20160816; b=1FKOD+TIz7sNElGtJHXMg7sOWUCG7+Q31zrSMyOCeczYHzRDPlyZnKYTRtEWpk1KnP 0UBm9nlf54HpElt+MAu2zG79f9YT09BLJq3rM2KEJ4fIUrH2SlwBItiZcnk9vcaRvgbn D5yef7ud62uIRx4kkEbkde6aBxKACywkbx6OI+aVSuQ6kaVMwESjSqMPm/STHZ4Kd46W ivaKZOalgniGRja2K9uuvNdazO1Ubp2MtmIeebIG6Lue74+xLkz9y2u9joHy+/KsBP5k 9uzLvZ8C5N7hNcX6W1JHM47NMt2hXBXeY4dDm7m65lXXsJQEte4Ultzll4EvIefIm/3a oQyw== 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=z5s98uVHxNSNSQqeL1zXvxFVRPlirgYyhIanbJT4FSg=; b=fKps1yynauPoxGNroW47ccuWRACK3uBZ/E3Cpd6TlOBmAelymrGvLqG8xW7UmTCqGu ZTbVl5MCLQ9mTlXPBKF9Ku8czfCaelevBWuPNr/s7v+4fd7l66wQi/1KTY84JwNXEgez z/SG3X2QAMHnASwNjZmZfVa2DNhgR2zJgGHx4Mo68QBfDGVhs/1R+gModyzv8h5Kj5Zu wosTWKuTuFyP7zyO9dY1JxuZvhOE+NGdzCD81Qb7gum9A9emzAv02475XOgb1uVUSNEY EEBtR91u2atRbWqxGjB+UyN5cpOcy+adPxVKKJe7PvPgvldG7WNDXckQ4P+zt3E1bGRl dUcQ== 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 m17si2685776ili.123.2021.06.16.06.34.05; Wed, 16 Jun 2021 06:34:26 -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 S232908AbhFPMr5 (ORCPT + 99 others); Wed, 16 Jun 2021 08:47:57 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60979 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232869AbhFPMry (ORCPT ); Wed, 16 Jun 2021 08:47:54 -0400 Received: (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 1BB6F1C001D; Wed, 16 Jun 2021 12:45:44 +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 04/15] media: i2c: max9286: Define high channel amplitude Date: Wed, 16 Jun 2021 14:46:05 +0200 Message-Id: <20210616124616.49249-5-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 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. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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.31.1