From patchwork Tue Jun 23 16:52:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 191490 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp2151953ile; Tue, 23 Jun 2020 09:52:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXBnU+/7gPyIfNvUQFF3Tergeu8sF8BPGrQCi8Yg5hktjuIs8NZz0j3Sd1Cvngv8j2DMLB X-Received: by 2002:aa7:cd52:: with SMTP id v18mr17425954edw.196.1592931174495; Tue, 23 Jun 2020 09:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592931174; cv=none; d=google.com; s=arc-20160816; b=I1VirtQKM+WqJaM1qevWlZQmhbEjDcRZN8IXQS4+wwrwoIV+UUAxYc6MOlKQ/AEGxy 7R10sURomAXVYNJvKOsZk0MMB5we8RLRLYLRV1fs4etJCKC0r5U/lF8gsoxVM2Qxw63H WRFS9aYkYroMEiaKVXQ2axNXU70t+PJ/bcsKVfYWcstwON517tv1LICP/kLSuKWgdN0i pn2YNIrSQkqD2g82mU/YbP3DbrhNFWMZUz9JPMsT8Pj5ic8r/5ZLn5j7ZbGjikWRG2IG MsBdXcfZf1yoprpdEx9XtX1l9KJUd9qFl9WExwat6iJ1gfzk9lsPAuhWyS9anNTRgDpW +8/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=9eAoVwwU455W7Czxum9R509qblQHWN+bx3H+gQGOmvw=; b=IxfYpUREBiJt7Ary5JGWCvK9+mr4ZC+te8qZAF6D/tS6CyhJtA5KS4UxrqB72BVs1a eVp+Qa4XHEjAmpkbRtU8VN50nkSf2vCpM9lo3p9zh9cEmaQbzf2N46NTHoksUBDSe2oP a+GPfRvKD6tkZLAtmU8wkDacU2EYnZI/HwW9tF8AG4KtGx9ZySDNLtbz+9wXRD27RTyX 17j5Am1PKUyVw3peSCAyRjH5GBPuQo/yzn49miZa470CvfJjT/2K5sKXkrzLhCYhsR8j son2E7QrH+mxBafaUmGxY2Hcqx5JDm27A+9Al3hiUNTE945XOoyhS07/kpJh+uLIolL/ 4/EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nOg1elpg; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id w1si11310449ejv.375.2020.06.23.09.52.54; Tue, 23 Jun 2020 09:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-media-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 header.i=@linaro.org header.s=google header.b=nOg1elpg; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 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 S1732979AbgFWQwt (ORCPT + 4 others); Tue, 23 Jun 2020 12:52:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732292AbgFWQwt (ORCPT ); Tue, 23 Jun 2020 12:52:49 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 168F9C061573 for ; Tue, 23 Jun 2020 09:52:49 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id n23so24202131ljh.7 for ; Tue, 23 Jun 2020 09:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=9eAoVwwU455W7Czxum9R509qblQHWN+bx3H+gQGOmvw=; b=nOg1elpgMjDnL2iUKJnVpDVctBW1jvhE72nBWtCOTXcRixhdoxgqpu23EPtJijz9Wz RM3TWym8YyqJtD77Ke3onfEX/7wwyzu348UkdvOS11RVeykvCmYfosMW4mNn5MjGeDj5 qdfplHhOzj90GifR7zC1P71u46HgqJbl1ShYWUhCxFkCWgJcjyl5KidjfiBihz9YNO9w 68zKO0VTcBu0H5WVPK17creR0T1vupxTz+4/QbYO/A54YEkfQxdRP53Bk9hPkc1gGg57 6tVFhHqYnWoloJ5ORhKy+J9lZ2QhD8jcrdt84W/COE0amXGMNVI8pYEBiCJJNsPCWW0V c54A== 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; bh=9eAoVwwU455W7Czxum9R509qblQHWN+bx3H+gQGOmvw=; b=GktgXy/JXVXs4CvE3JOd5YBQb59U+8fFdfSzk4J+uFEwSQ/Ke5lNplTKnAJj1rYBC5 TvpBU1SQis8t3z/6Z4X9p7FT182YFsD50FsOodPu7QF0h38H/YRMPxxwUUuxIDgl/phh 1paMrtwmNo1XqVqGZwyFYLDyKLmS4WWBAuv9lDqjre3vUcVtwZa1fXMrAszVQR4kNpkF +ufH8CE2LypNm6zgRis6mFpGz03+PaDk9+ZAtYGivy3xtH33LynXmz9NNukF/FYM+A3I xKblr1YHSApaUUAd527YYpVbRCuYB8dFMcs7aJVpk5S4g82mQeXKqcs0G5fhTBS2vFxq 73Og== X-Gm-Message-State: AOAM532E+zjmmhQr/YlgaSjtOh/7NeKYkoDus83xbp4hfbNox3s/LnqU mcEm01JlaV128a3vfqZs33MinQ== X-Received: by 2002:a2e:9a4d:: with SMTP id k13mr11631973ljj.43.1592931167616; Tue, 23 Jun 2020 09:52:47 -0700 (PDT) Received: from localhost.localdomain (37-144-159-139.broadband.corbina.ru. [37.144.159.139]) by smtp.googlemail.com with ESMTPSA id e13sm3405325ljo.6.2020.06.23.09.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 09:52:46 -0700 (PDT) From: Andrey Konovalov To: mchehab@kernel.org, sakari.ailus@iki.fi, manivannan.sadhasivam@linaro.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, c.barrett@framos.com, a.brela@framos.com, peter.griffin@linaro.org, Andrey Konovalov Subject: [PATCH] media: i2c: imx290: replace msleep(10) with usleep_range(10000, 11000) Date: Tue, 23 Jun 2020 19:52:26 +0300 Message-Id: <20200623165226.12197-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This fixes checkpatch warnings of "msleep < 20ms can sleep for up to 20ms". Signed-off-by: Andrey Konovalov --- 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 9c97830164e9..adcddf3204f7 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -406,7 +406,7 @@ static int imx290_set_register_array(struct imx290 *imx290, } /* Provide 10ms settle time */ - msleep(10); + usleep_range(10000, 11000); return 0; } @@ -484,14 +484,14 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl) if (ctrl->val) { imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00); imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00); - msleep(10); + usleep_range(10000, 11000); imx290_write_reg(imx290, IMX290_PGCTRL, (u8)(IMX290_PGCTRL_REGEN | IMX290_PGCTRL_THRU | IMX290_PGCTRL_MODE(ctrl->val))); } else { imx290_write_reg(imx290, IMX290_PGCTRL, 0x00); - msleep(10); + usleep_range(10000, 11000); if (imx290->bpp == 10) imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x3c);