From patchwork Wed Jul 27 14:10:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 9249865 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 86B8060757 for ; Wed, 27 Jul 2016 14:13:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77088269B2 for ; Wed, 27 Jul 2016 14:13:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B61F26D06; Wed, 27 Jul 2016 14:13:33 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77048269B2 for ; Wed, 27 Jul 2016 14:13:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSPYZ-0006E4-Mr; Wed, 27 Jul 2016 14:11:31 +0000 Received: from mail-pa0-f68.google.com ([209.85.220.68]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSPYN-0006AP-EY; Wed, 27 Jul 2016 14:11:20 +0000 Received: by mail-pa0-f68.google.com with SMTP id hh10so1852305pac.1; Wed, 27 Jul 2016 07:10:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zHOFgRejrfyQyg0vaX0x5ig13fxr/i+MbiOJYexDxEE=; b=P2KxwmjFfra2eHR1UJ3uJrPz1Vx0plXnKB8CtvJBnxzdVzhIDm3rLb5y9Fi1mOi9fB Z6lOaC5pRsG1Wj1BbtELKBCi6MLk2jbuyc725flmlwyN5lzyO1bTeDG5HmlnLeBYMRMt OL7LXNsJ+yLDxM31NQQuOMj7+LNmq6ntQUDorLnRclEggAK/iG5JhmFaH9w86cDKK7F1 JMBtT+1N+EMEMq6X6LK+Bp5Wp3kfUSopMmVJfv6FuBRqW9uws/eK1PvAxcdufoWklUlI lauPvew7wxCO7UzFLxvz4Ib6roVv+YyOy7zAzQz9X9VVHPLnSOGzF8bM9M+BNTmIBVwE cqeg== X-Gm-Message-State: AEkooutAdQMQlMQwdGRwXKUc7qoAMl4eEYaq/d+gdxKBqX0bo5M47QRwilG47KrtLb8upg== X-Received: by 10.66.124.136 with SMTP id mi8mr49578965pab.26.1469628658615; Wed, 27 Jul 2016 07:10:58 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id b90sm9728138pfc.29.2016.07.27.07.10.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 07:10:57 -0700 (PDT) From: Caesar Wang To: Eduardo Valentin Subject: [PATCH 2/2] thermal: rockchip: optimize sensor auto accessing period Date: Wed, 27 Jul 2016 22:10:43 +0800 Message-Id: <1469628643-29661-2-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469628643-29661-1-git-send-email-wxt@rock-chips.com> References: <1469628643-29661-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160727_071119_597277_D2CCCA9C X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, briannorris@chromium.org, dianders@chromium.org, smbarber@chromium.org, linux-rockchip@lists.infradead.org, Zhang Rui , Rocky Hao , linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rocky Hao In less than 10 ms, the temperature of soc will arise 10 degree. 250 ms is too big for soc tempeture control. Setting 2.5 ms will speed up temperature accessing speed but introduce no more cpu's computing overhead. We set AUTO_PERIOD_TIME and TSADCV3_AUTO_PERIOD_HT_TIME the same value, because normal temperature update speed is also our consern in IPA. Signed-off-by: Rocky Hao Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: Heiko Stuebner Cc: linux-pm@vger.kernel.org Tested-by: Stephen Barber --- drivers/thermal/rockchip_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index a90423d..1f165c9 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -213,8 +213,8 @@ struct rockchip_thermal_data { #define TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT 4 #define TSADCV2_AUTO_PERIOD_TIME 250 /* 250ms */ #define TSADCV2_AUTO_PERIOD_HT_TIME 50 /* 50ms */ -#define TSADCV3_AUTO_PERIOD_TIME 187500 /* 250ms */ -#define TSADCV3_AUTO_PERIOD_HT_TIME 37500 /* 50ms */ +#define TSADCV3_AUTO_PERIOD_TIME 1875 /* 2.5ms */ +#define TSADCV3_AUTO_PERIOD_HT_TIME 1875 /* 2.5ms */ #define TSADCV2_USER_INTER_PD_SOC 0x340 /* 13 clocks */