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: 11621173 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00081618 for ; Tue, 23 Jun 2020 17:15:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C7EBD20780 for ; Tue, 23 Jun 2020 17:15:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p6iR6OME"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nOg1elpg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7EBD20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=FMlxbY1DYQAX6AbQ1nfAuE/424VfEBmT0ZpzPOdKn/U=; b=p6iR6OME3Igf3avcdBPEBQe1aw YRBhg8Cheqoe0INaflE4dck05pI3AFdizZcUvdMB0Nuw1xqj9hYuTsBQljqGcyU4Qb0oChnCxw94W hAIcppZnpfIOd0rbjIREd7tcv34PCIvUVROEbAuXbKExtthVzWO4GV6Re7LSx4fk3EjqYOSJPB8vm pX3ejZVlJzfpAnJkaJNZ8QeAtekCEq58VoG2QRqBAJP+OD8Zuct0suwYe2+bTOx8TIf0tDMrr0ylu 5gl6tlAeM4TucqDP3Oh0sW8OUOKjPuWw5g0KrCEK1kmFZsasp8RvLcD45mqUq6XMMIZ7l7HPSNbBj 9PB1zh2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnmTY-00041g-OP; Tue, 23 Jun 2020 17:12:48 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnmAH-0001Y5-0y for linux-arm-kernel@lists.infradead.org; Tue, 23 Jun 2020 16:52:57 +0000 Received: by mail-lj1-x242.google.com with SMTP id 9so24266810ljc.8 for ; Tue, 23 Jun 2020 09:52:48 -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=bD+kNAz/ZfhjJicSZcslPOMIg0Fa+8MKKHzlbLlu5nE0H3s0l0/OuJeOJGvKsruc5N CWltTFUYno4DxIK9Cj1LOrOP1GljJZwDCAiorPg4R/wPRGbfnFKZoF5OdvlCRK0uooGE YSTXgZPsJ43AIKYPvsv4ghRoI7Eo3utdfgLvBAHJmH3o+RHoNrAKFyNJgS+mmu3FxGcm m4SObiJXc/HdPapDgJWKjbCKktXk/Ocq7GgfPOPipFK366qfSfK/eRIc086Rg3nuH+bK LlHceg+ZXepKAaCoIbNcqKCvFpWXRfQ583omSCicbF2se7M5y8VEb0M5AnsR2LnFIWjw gVOA== X-Gm-Message-State: AOAM530DwQQqotWScUmE40rHxaG7pg1zpRFDsRHkezTYXRJMtdUnSz7e IoUrUSXopq5MqECL6Oq7/xSZdg== X-Google-Smtp-Source: ABdhPJy5hnqphZVKvT4tjhqXiFArb8FWO5XWovl0z0bz4em/Ks3QTF0sE1lcBeYCa96oqq5SCFQkrg== 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 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 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: c.barrett@framos.com, linux-kernel@vger.kernel.org, a.brela@framos.com, peter.griffin@linaro.org, Andrey Konovalov , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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(-) 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);