Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3284911pxf; Mon, 15 Mar 2021 06:16:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxesyGtN44lMiNqKnMPUy1pTMTDhQ8iVr+zJTBu3EE7FzK7CPNGxjZW2UmoumekypwV0krc X-Received: by 2002:a17:906:3881:: with SMTP id q1mr23722205ejd.490.1615814213340; Mon, 15 Mar 2021 06:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615814213; cv=none; d=google.com; s=arc-20160816; b=DcQqk7t1TYxkwbc4MvW2ik8LBtRFkOIE06wW0TJaMmUE7/r08teoRKgLNN731qs2TI 2R1D21G4QL7rXZQxHCH0s6espibFRO568F/3RPhxPU7HaQwZm3TP1TpLap8Qz6hIJGo7 Vs0XrmMu4F1vsGeZASdsGeXVvvDrdmKPEYHppRKQpegaP2qZZS45dUNj5U9JgnPTXJ+6 ccZisVM//dI1ATVIpKf+aCovH6OhmIPli9vFmtmpKoRLOHZCClwdipvz2b+4Ggy4Gu8h Sos/zHlaqC5UArbVAdzh7yOWdSnyZcSdGZvN48R0gHwPvWBM9G+CpJhNO0WoP3Y2SOpp ocpw== 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=IGRQ+5H2xNfuT2vv8+0XzYC9GUYGpsFXt2SzXX/CtaM=; b=at7LjLXNuO4gqX7PHTBPq80/fkP/Y1TZL2tzhDaYgSqh113IZYLl6q8c50en0ivyGT EUd5AAySF4MDGLtMy5EDVmne5miFT/E4iuFs7uKmeWjTCdU7xWZn/202rkkb4q+TzYDI Bc1Cc+HzGzk14gMwHdwC5g1su73e1p8IKqq9e3gRXxYp5Axp7wX51Zo74t6fVomHo7S1 vVQnv0o5AzVL6Gsh0yQ+Ve9slOEVC75EUrDTXwBooccp4bipKCbw2o5a8MuhGGoGRK26 JtifH9T53RN5lKefYjfG4GxNv7TC0tsGA3HR3Y0LbfUDqFGwNNcxQOtemADjHDTNR1hQ ZJzw== 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 z15si11325189ejr.192.2021.03.15.06.16.26; Mon, 15 Mar 2021 06:16:53 -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 S230259AbhCONPa (ORCPT + 99 others); Mon, 15 Mar 2021 09:15:30 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:53705 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbhCONO6 (ORCPT ); Mon, 15 Mar 2021 09:14:58 -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 2AABBFF815; Mon, 15 Mar 2021 13:14:53 +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 Subject: [PATCH v2 02/18] media: i2c: rdacm20: Enable noise immunity Date: Mon, 15 Mar 2021 14:14:56 +0100 Message-Id: <20210315131512.133720-3-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 Enable the noise immunity threshold at the end of the rdacm20 initialization routine. The rdacm20 camera module has been so far tested with a startup delay that allowed the embedded MCU to program the serializer. If the initialization routine is run before the MCU programs the serializer and the image sensor and their addresses gets changed by the rdacm20 driver it is required to manually enable the noise immunity threshold to make the communication on the control channel more reliable. Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi --- drivers/media/i2c/rdacm20.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c index 90eb73f0e6e9..f7fd5ae955d0 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -541,7 +541,13 @@ static int rdacm20_initialize(struct rdacm20_device *dev) dev_info(dev->dev, "Identified MAX9271 + OV10635 device\n"); - return 0; + /* + * Set reverse channel high threshold to increase noise immunity. + * + * This should be compensated by increasing the reverse channel + * amplitude on the remote deserializer side. + */ + return max9271_set_high_threshold(&dev->serializer, true); } static int rdacm20_probe(struct i2c_client *client) -- 2.30.0