All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 v4] hwmon: (aspeed-pwm-tacho) reduce fan_tach period
@ 2017-06-24 15:39 Patrick Venture
  2017-06-24 15:58 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Venture @ 2017-06-24 15:39 UTC (permalink / raw)
  To: venture, joel, linux; +Cc: linux-hwmon, emilyshaffer, peterh

Reduce the fan_tach period such that the fan controller uses a shorter
period to measure the rpm.

The original period of 0x1000 was chosen as a conversative value from the
reference implementation.  Through experimentation on the quanta-q71l
board, I was able to drive the number down which ultimately reduced the
time the controller would use to determine the fan_tach.  This value was
recently tested and accepted downstream on the IBM Zaius board which uses
the ast2500.

Future work: It may be worthwhile as this is a tunable parameter to the
system, to allow overriding it through the device tree.

Testing: Tested on an ast2400 sitting on a quanta-q71l and ast2500 on
power9.

Signed-off-by: Patrick Venture <venture@google.com>
---
v4: Added explanation for value.
v3: Added missing change log
v2: Updated commit message language
---
 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 86e2ea8287a7..b2ab5612d8a4 100644
--- a/drivers/hwmon/aspeed-pwm-tacho.c
+++ b/drivers/hwmon/aspeed-pwm-tacho.c
@@ -160,7 +160,7 @@
  * 11: reserved.
  */
 #define M_TACH_MODE 0x02 /* 10b */
-#define M_TACH_UNIT 0x1000
+#define M_TACH_UNIT 0x00c0
 #define INIT_FAN_CTRL 0xFF
 
 struct aspeed_pwm_tacho_data {
-- 
2.13.1.611.g7e3b11ae1-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2 v4] hwmon: (aspeed-pwm-tacho) reduce fan_tach period
  2017-06-24 15:39 [PATCH 1/2 v4] hwmon: (aspeed-pwm-tacho) reduce fan_tach period Patrick Venture
@ 2017-06-24 15:58 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2017-06-24 15:58 UTC (permalink / raw)
  To: Patrick Venture, joel; +Cc: linux-hwmon, emilyshaffer, peterh

On 06/24/2017 08:39 AM, Patrick Venture wrote:
> Reduce the fan_tach period such that the fan controller uses a shorter
> period to measure the rpm.
> 
> The original period of 0x1000 was chosen as a conversative value from the
> reference implementation.  Through experimentation on the quanta-q71l
> board, I was able to drive the number down which ultimately reduced the
> time the controller would use to determine the fan_tach.  This value was
> recently tested and accepted downstream on the IBM Zaius board which uses
> the ast2500.
> 
> Future work: It may be worthwhile as this is a tunable parameter to the
> system, to allow overriding it through the device tree.
> 
> Testing: Tested on an ast2400 sitting on a quanta-q71l and ast2500 on
> power9.
> 
> Signed-off-by: Patrick Venture <venture@google.com>

Applied, thanks.

Guenter

> ---
> v4: Added explanation for value.
> v3: Added missing change log
> v2: Updated commit message language
> ---
>   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 86e2ea8287a7..b2ab5612d8a4 100644
> --- a/drivers/hwmon/aspeed-pwm-tacho.c
> +++ b/drivers/hwmon/aspeed-pwm-tacho.c
> @@ -160,7 +160,7 @@
>    * 11: reserved.
>    */
>   #define M_TACH_MODE 0x02 /* 10b */
> -#define M_TACH_UNIT 0x1000
> +#define M_TACH_UNIT 0x00c0
>   #define INIT_FAN_CTRL 0xFF
>   
>   struct aspeed_pwm_tacho_data {
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-24 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24 15:39 [PATCH 1/2 v4] hwmon: (aspeed-pwm-tacho) reduce fan_tach period Patrick Venture
2017-06-24 15:58 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.