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: 9249855 X-Patchwork-Delegate: rui.zhang@intel.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 0DDA3607D8 for ; Wed, 27 Jul 2016 14:11:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F211726D06 for ; Wed, 27 Jul 2016 14:11:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6E2B26D08; Wed, 27 Jul 2016 14:11:15 +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 9248B269B2 for ; Wed, 27 Jul 2016 14:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756636AbcG0OLB (ORCPT ); Wed, 27 Jul 2016 10:11:01 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34768 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756385AbcG0OK7 (ORCPT ); Wed, 27 Jul 2016 10:10:59 -0400 Received: by mail-pa0-f66.google.com with SMTP id hh10so1852302pac.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=lwF0CHcgBTSHYkdIcUAGaiebXTogwAgiRDXY623u2W8RyGIxtFsCjDfr17+2HY5QAh UX2LjiqSseTmVvoZlwUhQL/gbYSuov5ghb1E3O0TMdZmhvSfITUc0XM/+qPoC76pbc/x dZu9hi7gewPLel+rfwVjiK6NmEmoAM+pVwufLzaNR5wwckuOsJSwwTVpr672zHMhYy+g OVJhyXEh9YvJ41mMAcAH/OEe/NCk1FrhEIUkYeA/bSUFC23Cb5eRYLVQbPPxLDhh8+Gn UZ0g84cUlvJGWUN/ZCXSczevqU3/bAMWpQSdyH+148V2OEaU+CW8Ig0Qd35FNyDx+Dt/ o0xA== X-Gm-Message-State: AEkooutu+yqZnVqUY2rUhI9i5cHZG/7ldZquEbIR00vcB8oBNvRj1BO/84CY7JCyp0f0OA== 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 Cc: smbarber@chromium.org, dianders@chromium.org, briannorris@chromium.org, Rocky Hao , Caesar Wang , Zhang Rui , Heiko Stuebner , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org 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> 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 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 */