Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2243652pxf; Sat, 20 Mar 2021 08:54:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDF13ukEjnC/SsubYenRFS74CYu8rw1l4AMLixeopQOjXXdK+IG/ohMEjr+3hwh3/fIBWx X-Received: by 2002:a05:6402:2215:: with SMTP id cq21mr16565632edb.281.1616255667333; Sat, 20 Mar 2021 08:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616255667; cv=none; d=google.com; s=arc-20160816; b=pIJ1vxAuHh6L/vpxksZDNF9pvrdemcWNE18dxbNoeRWfqd8JXgPfdcMx6aJpz4fGgP /wFEcNrGgDVe8yLvO2gQmKiKV5GEVDj213cAgXQtF0iGeQqxpvFvLzS4sgayRDQuYPPm k5z/9wjOThqQ43lK/ay995yjxZcemVJ2YplDFyOTBZ5jAF+gzl8lhHCdS3BwIHk5EZYg J7wuevAz/8l4ghFPKEH1/yxVHSvd9VGSokZknSp77JhuYMd96C6glPYF+IMcNf5EZ/D9 pmV4SgpdruoIHbaxvBE26VGUc8TBZgs03qVEzOeYZD/d+XPqJ7X5cIM7lD5cJ2AzuwZq LkKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D3sBsqn3tAXMhLepxXRKN7iARNcH/7a4TELfAcWIJPM=; b=0W4/GGjPTvJQlTP30JwWaYtilyZza1PdVBDn4dmzqqhJT8aqtBAqHyyv4aWzoy6v9v rFF5aidN18HL6M5OAzhQKZ94rAkSWWAOffk1Wc+VrYXXJteeKiVEjUlWfSmbMoWTv7vM 0BAlP9AUFeEugoabCLDxnTViJwMijJipR0edGqLFw8gtyo1RORU/goPW9uh9N08zUKLm gJzHI3X5Mmo0LOa28F4kU0VB4EYais5LSHu8JEBQjRSVssteQb7ArBezD6Jb4ObdfscP xohnnEILg3rjlaHha/srUjlPo/AvehFZ0KIDzFLLlsWkMWJm9XQed/VCBms589kE37b+ KPsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=qmAKcm0H; 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 kk22si6978302ejc.98.2021.03.20.08.54.04; Sat, 20 Mar 2021 08:54:27 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=qmAKcm0H; 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 S229875AbhCTPxH (ORCPT + 99 others); Sat, 20 Mar 2021 11:53:07 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:46918 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhCTPw7 (ORCPT ); Sat, 20 Mar 2021 11:52:59 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C5378D3; Sat, 20 Mar 2021 16:52:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616255577; bh=EiUtEauCYCYABkl/HNQCuW9f4LXK6zPiXwbNfVE/d5A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qmAKcm0HGaTvd+xD2xXV8sJsFifeJFfMbNT5H6rNchVPat+UFwicijfS4jrkpmBF0 Fj0fZNc+EIW/f3op9PEb1WTmmyEX6MtXdBGsA1URqAlK1oB78yn6946/R/yDr5cpwu XWegTa0nBgumGAdoZaMR5MaR2jZ7qVZduZ+6iSuo= Date: Sat, 20 Mar 2021 17:52:18 +0200 From: Laurent Pinchart To: Jacopo Mondi Cc: Kieran Bingham , niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 11/19] media: i2c: rdacm21: Add dealy after OV490 reset Message-ID: References: <20210319164148.199192-1-jacopo+renesas@jmondi.org> <20210319164148.199192-12-jacopo+renesas@jmondi.org> <99971a13-4d02-2255-6653-569915da181d@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <99971a13-4d02-2255-6653-569915da181d@ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, Thank you for the patch. On Fri, Mar 19, 2021 at 04:49:44PM +0000, Kieran Bingham wrote: > Hi Jacopo, > > s/dealy/delay/ in $SUBJECT > > On 19/03/2021 16:41, Jacopo Mondi wrote: > > Add a delay after the OV490 chip is put in reset state. The reset > > signal shall be held for at least 250 useconds. > > > > Signed-off-by: Jacopo Mondi > > --- > > drivers/media/i2c/rdacm21.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c > > index babd14b21252..875bec9f7904 100644 > > --- a/drivers/media/i2c/rdacm21.c > > +++ b/drivers/media/i2c/rdacm21.c > > @@ -448,7 +448,10 @@ static int rdacm21_init(struct v4l2_subdev *sd, unsigned int val) > > if (ret) > > return ret; > > > > - /* Enable GPIO1 and hold OV490 in reset during max9271 configuration. */ > > + /* > > + * Enable GPIO1 and hold OV490 in reset during max9271 configuration. > > + * The reset signal has to be asserted for at least 250 useconds. > > + */ > > ret = max9271_enable_gpios(&dev->serializer, MAX9271_GPIO1OUT); > > if (ret) > > return ret; > > @@ -456,6 +459,7 @@ static int rdacm21_init(struct v4l2_subdev *sd, unsigned int val) > > ret = max9271_clear_gpios(&dev->serializer, MAX9271_GPIO1OUT); > > if (ret) > > return ret; > > + usleep_range(250, 500); > > Aha, for a second there I thought the comment meant it had to be > asserted for 250 uS before clearing it again. But it's 250 uS before > using the OV490. > > Perhaps possible to update the comment a little, but nothing that matters. The commit message and comment should match the code, especially given that I'm not sure here which of the two is actually incorrect. I suspect the sleep is actually in the wrong location. > Reviewed-by: Kieran Bingham > > > > ret = max9271_configure_gmsl_link(&dev->serializer); > > if (ret) > > -- Regards, Laurent Pinchart