From patchwork Thu Dec 19 18:22:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 182152 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp836049iln; Thu, 19 Dec 2019 10:23:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwOhZYuHqqRa4+oIdBhzf9cfy5j+Y0yfQnByZQRyLoW6dkyqTWqzgtp9qYwfJiaAvW2NdJf X-Received: by 2002:aca:f555:: with SMTP id t82mr2983188oih.103.1576779798779; Thu, 19 Dec 2019 10:23:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576779798; cv=none; d=google.com; s=arc-20160816; b=moJKtTCG95zwS8G+TJmgLU1KR6z02QAbMlnfrsibxk8Sd8dCARND4lZTUx5Gc9Ghah 4BMjMa9GTYKypEpdvb8nl6DwHeqWs1JYaH4tGk79wo+sGUUR8SjyeQWXUSoMskDKa8uS VCiKl2t6P/ZzM5YQq+b/EAmS9M6yX8DRGgEwHqPLN7YdN6OBZyl94xZmmK7DFhRiBLpp ux5V/C38voOPnSFqKz328oHbSoOMnMMMWzGmc/RIBbHz8+TrR16rJTMAe8N+Y7cZJUVw hPVe2+5BGVSe0DkJl2QravEhPxGBAq9M7b7kZe7+LcbyDRbJ8/RvxSJ62Jd4dxzjT+QN U3ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gPMrMi1zLN6OA6/X7P7gnmwAhoOj6bYlyFbNpwO69Qo=; b=MMWgAhuI+DMwCCLisTN6tEfZCGprFqEBXfv1HvZbxQAB0WaM0nsaEGVoB4xDwJmTbr E8izyGk+IQLmwMPRslwYm+aFRI2FcRvr2AyLqRFgyvPPHUHlzWo8bh1dbDGSrTXKEr0w UMwQtA559/xgVJErCGh+WUd1GTmAeAEjCYBZ5fyELYoOuIrBf2FM10E+4vhE0NukTVjG PtNXjTOmWJpqN85miKB7hVO7beZZRNyWKt2LUD50wjjw0twmQMUtwTJeGaKMspj98zPO 3uJ8aIT7iBbXaxCd6YH2HPzeF9q201U8vKehXHsdYY15rEPNy7LXkhZK4KKc1nuVtq30 ATsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gUtZSwI5; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si3303682oib.272.2019.12.19.10.23.18; Thu, 19 Dec 2019 10:23:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gUtZSwI5; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727181AbfLSSXR (ORCPT + 4 others); Thu, 19 Dec 2019 13:23:17 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:35765 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbfLSSXR (ORCPT ); Thu, 19 Dec 2019 13:23:17 -0500 Received: by mail-pj1-f65.google.com with SMTP id s7so2922370pjc.0 for ; Thu, 19 Dec 2019 10:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gPMrMi1zLN6OA6/X7P7gnmwAhoOj6bYlyFbNpwO69Qo=; b=gUtZSwI5Ulzsmc54LykF+cv8X0Jm7Kfs0WesiUq0DuTQnyoBmI/riCz285oek9SAJG p8V+AqewtM6MuinpONWRY9UqrOZCI3wcAp7DBhj8JS4DQTdiSrOLwRGRj/mQuohbSG83 vYk2w01/bsKxzy+QiBpNlxXiTNiUGUlNAPiB5xnDFX90vcVlcMlFZVmZYkr5TYtHjQP3 MQheafVzi8xnyP8NoAbWCD0ZxYh6PnvPmBgSvwYRvyFzE0wZDwrlyD1q3KpDplaTs90i TVGECp5NmtJo22/ecbdc1F3qfAk4oDAz2LFAXQmLNCdtQSmvn9SxirD0PyOhFISwXhKN t3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gPMrMi1zLN6OA6/X7P7gnmwAhoOj6bYlyFbNpwO69Qo=; b=QM+B1IBzTJT4QFc2/t++sXQP1sXDGTSHVJM+S4uCIbmNag9bkEz8AzeMpOysKyXOoP 0Ded8eYU8KPB7Obh/do7FeVhv2pGsqmeJlNSklBEzMnqNHp60P+XKolqMYeqxoPKh90c B38YBqTWHBRQlmPdzfRpcJr0lkhjT4Y0x8AL5YxxvS50xVV+3uCkK9PYfedj32W6r/h5 y2dBelKuZPFdlnocJKbQpEn4iGUN591tLzwP9JqiOoq6DhJTUb4gtuIN02TtFSOzbd1l vaFphU87RuI0Xd22OrGDFXlRJYFMFf4r6H9ZSLnD8x33xI0CLIEl9OMN9imeySLa8444 l0SQ== X-Gm-Message-State: APjAAAXBousdHPvMtUgqgQ83g4hZeAJqFRpY+PYNkGF98pOz23wbbt3A JJsBNYOV1+7UdMstZT/SaG2m X-Received: by 2002:a17:90a:9f04:: with SMTP id n4mr11080250pjp.76.1576779796548; Thu, 19 Dec 2019 10:23:16 -0800 (PST) Received: from localhost.localdomain ([2409:4072:6010:65a5:a416:e9bd:178a:9286]) by smtp.gmail.com with ESMTPSA id i3sm9085735pfg.94.2019.12.19.10.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 10:23:16 -0800 (PST) From: Manivannan Sadhasivam To: mchehab@kernel.org, sakari.ailus@iki.fi Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, c.barrett@framos.com, a.brela@framos.com, peter.griffin@linaro.org, Manivannan Sadhasivam Subject: [PATCH v2 6/6] media: i2c: imx290: Move the settle time delay out of loop Date: Thu, 19 Dec 2019 23:52:22 +0530 Message-Id: <20191219182222.18961-7-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191219182222.18961-1-manivannan.sadhasivam@linaro.org> References: <20191219182222.18961-1-manivannan.sadhasivam@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The 10ms settle time is needed only at the end of all consecutive register writes. So move the delay to outside of the for loop of imx290_set_register_array(). Signed-off-by: Manivannan Sadhasivam --- drivers/media/i2c/imx290.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index 52f1e470b507..fb6d3f649a5a 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -344,11 +344,11 @@ static int imx290_set_register_array(struct imx290 *imx290, ret = imx290_write_reg(imx290, settings->reg, settings->val); if (ret < 0) return ret; - - /* Settle time is 10ms for all registers */ - msleep(10); } + /* Provide 10ms settle time */ + msleep(10); + return 0; }