From patchwork Mon Sep 11 22:41:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Leis X-Patchwork-Id: 9948183 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 B597F6024A for ; Mon, 11 Sep 2017 22:42:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A306428A6E for ; Mon, 11 Sep 2017 22:42:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FFBB28CD8; Mon, 11 Sep 2017 22:42:55 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 2125B28F22 for ; Mon, 11 Sep 2017 22:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750936AbdIKWmB (ORCPT ); Mon, 11 Sep 2017 18:42:01 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:35016 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbdIKWmB (ORCPT ); Mon, 11 Sep 2017 18:42:01 -0400 Received: by mail-pg0-f52.google.com with SMTP id 188so17852344pgb.2 for ; Mon, 11 Sep 2017 15:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=537uWeWhjGWkB4w+jrlt29jwljjczZ4qiLuHkPSbh+E=; b=jMK1BU0PX2Aeu80NXM1RrR1bJssdSbIH4xpm6iXcSfw4KeaIfkBmJLbR9SbqVKQMbG thFujft+29nRFdrBNNywj3Vcp+0LrQT9sQ9MYETcMFcQ+VzmqR3NRvhCWoCFSurvs4cF YrxBhXMV884Sb8VkA4gFQoNJqMjWjr+aZ5zpyaC9EUV5ES+9LsjJOQAyMzbt2NTMW6mr 5OfnUn87w78nEUhrseE2Ij/slu813+Ds3Eci5AA4C5omBLuQWFM8ZGIyGdbZZhNUFRin Ko4O/s0/DMi5tls7wg8Ww8UBLdoR/SKErExzQCa9PqyaYfUJi/D6NYyCk5RKsNFldkfy tYtw== 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=537uWeWhjGWkB4w+jrlt29jwljjczZ4qiLuHkPSbh+E=; b=OhF5tZIvzmCmT+L5nnxwhsXmaY+xzZbIJCMm3UH1SMKsnt6BulCOud10tdIsSixKPO okc/aGBC/gkOUOYU1RmGzecp7IsrTcjE/vSeGqlxAT1TtiOVzUQt6BiZ7ro0jyddMQNC KwoqYfi8RsYaUVo0Kl+9QgFIyxHdpKGMKSmxLJEGFkdZ3tnOI8zlzid13T8CQlQIoUxp ZBOconbuaeZybQIcbsUV6nYI4z78Zklxb1MyhqXzIb/bJk3CU1PSc78tDZ2pKbWeW/7p mMpNfnKjRGiH3jMrOHeIWFtA7eNjbjFL8RdoiRfJjWeqqZPIYPQQTE9QHuB0oCp/w4No 1pFg== X-Gm-Message-State: AHPjjUiGu/BWtUFHVpC8v22TJQC+ObCVrECgyTjsXnHj6JqnDUeO42DT Zp6eYFiEAg3IrfO5 X-Google-Smtp-Source: ADKCNb7HB3cu/aT8dydxal1XT85hQbPvLhStM7dtLXJq6mIJBHdLRbHpdxQf1lz69NoIiuGoRCr8qA== X-Received: by 10.84.240.5 with SMTP id y5mr14848210plk.22.1505169720846; Mon, 11 Sep 2017 15:42:00 -0700 (PDT) Received: from venture.svl.corp.google.com ([100.123.242.104]) by smtp.gmail.com with ESMTPSA id z89sm16386050pff.13.2017.09.11.15.41.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Sep 2017 15:42:00 -0700 (PDT) From: Patrick Venture To: venture@google.com, joel@jms.id.au, linux@roeck-us.net Cc: kunyi@google.com, linux-hwmon@vger.kernel.org Subject: [PATCH] hwmon: (aspeed-pwm-tacho) increase fan tach period Date: Mon, 11 Sep 2017 15:41:55 -0700 Message-Id: <20170911224155.146738-1-venture@google.com> X-Mailer: git-send-email 2.14.1.581.gf28d330327-goog Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The previous value reduced the time required to determine the fan value, however, it's also used as the final timeout mechanism. The prevous value would work for any fan speed greater than around 3k RPM. This increased value, lets the fan speeds return quickly but will wait longer to handle speeds below 3k RPM. Testing: this value was determined through experimentation on the ast2400 on the Quanta-q71l. This configurations runs 8 fans attached to the controller. Signed-off-by: Patrick Venture Reviewed-by: Guenter Roeck --- drivers/hwmon/aspeed-pwm-tacho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/aspeed-pwm-tacho.c b/drivers/hwmon/aspeed-pwm-tacho.c index 69b97d45e3cb..f914e5f41048 100644 --- a/drivers/hwmon/aspeed-pwm-tacho.c +++ b/drivers/hwmon/aspeed-pwm-tacho.c @@ -161,7 +161,7 @@ * 11: reserved. */ #define M_TACH_MODE 0x02 /* 10b */ -#define M_TACH_UNIT 0x00c0 +#define M_TACH_UNIT 0x0210 #define INIT_FAN_CTRL 0xFF /* How long we sleep in us while waiting for an RPM result. */