From patchwork Sun Dec 3 11:11:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 10089205 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20E5F60595 for ; Sun, 3 Dec 2017 11:19:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C046290DB for ; Sun, 3 Dec 2017 11:19:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01033290E1; Sun, 3 Dec 2017 11:19:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF76B290DC for ; Sun, 3 Dec 2017 11:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbdLCLS4 (ORCPT ); Sun, 3 Dec 2017 06:18:56 -0500 Received: from guitar.tcltek.co.il ([192.115.133.116]:57353 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbdLCLSx (ORCPT ); Sun, 3 Dec 2017 06:18:53 -0500 Received: from sapphire.lan (unknown [10.0.4.3]) by mx.tkos.co.il (Postfix) with ESMTPA id 89F364409C6; Sun, 3 Dec 2017 13:18:51 +0200 (IST) From: Baruch Siach To: Zhang Rui , Eduardo Valentin Cc: devicetree@vger.kernel.org, Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Russell King , Miquel Raynal , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Baruch Siach Subject: [PATCH v2 4/4] thermal: armada: use msleep for long delays Date: Sun, 3 Dec 2017 13:11:24 +0200 Message-Id: <0f09adfb9790009eb4ee4cdc62ce83307c0feede.1512299484.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.15.0 In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use msleep for long (> 10ms) delays, instead of the busy waiting mdelay. All delays are called from the probe routine, where scheduling is allowed. Signed-off-by: Baruch Siach --- v2: New patch --- drivers/thermal/armada_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 59b75f63945d..d86538d4f519 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -119,7 +119,7 @@ static void armada370_init_sensor(struct platform_device *pdev, reg &= ~PMU_TDC0_START_CAL_MASK; writel(reg, priv->control); - mdelay(10); + msleep(10); } static void armada375_init_sensor(struct platform_device *pdev, @@ -133,11 +133,11 @@ static void armada375_init_sensor(struct platform_device *pdev, reg &= ~A375_HW_RESETn; writel(reg, priv->control + 4); - mdelay(20); + msleep(20); reg |= A375_HW_RESETn; writel(reg, priv->control + 4); - mdelay(50); + msleep(50); } static void armada380_init_sensor(struct platform_device *pdev, @@ -151,7 +151,7 @@ static void armada380_init_sensor(struct platform_device *pdev, if (!(reg & A380_HW_RESET)) { reg |= A380_HW_RESET; writel(reg, control_msb); - mdelay(10); + msleep(10); } }