Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp642148yba; Fri, 12 Apr 2019 10:36:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCyhZPAEkO/RCtAoSx4mwJKQznxIc2gHMeQmbAXGP4pcE5iTinGqQtJxzMeF07QlvCV1Ah X-Received: by 2002:a63:1912:: with SMTP id z18mr55216324pgl.115.1555090567194; Fri, 12 Apr 2019 10:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555090567; cv=none; d=google.com; s=arc-20160816; b=bnNoZXn3tpMOLTTBj9FR2ZgPW47peWwRcDJIglRty5tI7lQJb8SLLMpwYAYlxmcD6f 304hcpWhVVsvfIupFErp0uXSbAqpzQFqyToe7z+OspIzHMi9jgl7SWa7IuZuiD5qtoZk VwTkQPI/Av/FHJw6ET7P3RuRXvtR/vj1Bz+XNR+4/3E7EGACeR/eIBX/ad1xkEAmMLuZ sYOeBoNtNSrW+7LvYEpZPZtT2ugQHeoVz3TOZo40YOuBgvknlaQEqzw7It1/8UNsIssP /9gXYT4Ptc9Mb0z6Tk5saFmOtZq2urL3qlMekJfzISLzUYvzJfWXdYKH2QZnuOhLn8rL Q1HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=jkaa5jmzbhTsKzYwSroYi/O0CDBrW65uQeV5PjzRPNo=; b=Bs4BdO92eK2ZhCuTwhFtsdTHf/gx4PIn4Rv3SRC59j4SD+ntDl7PiTxzMvbwYLiDSs TWdAcHz3cC163SdSwBH1LjyB4bAaBmkO6GTL1FbRDRLRQWElqdLZjScvoljcY1/P74i1 y2QzvE8nWy6pQLZJbQTYUUPikH4wWKdh7aPDP+vhTgZxWEyY5AC9jl4vhGjMHCKqUYJz TMCKaNnkDtu/NJ9McPGa/Emy72gILcfqIc30TZQuffqRBVdkKzrK4kOhmbFs91qrI3eh S9l0uQS1V17lodIipex6fuiy/nHUVqe1ip1B8MhlkfmTyfuIGtTwuNxTb7bszJp6UvTK q+oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BlD9l5WV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18si32423233pgv.209.2019.04.12.10.35.50; Fri, 12 Apr 2019 10:36:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BlD9l5WV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbfDLRfP (ORCPT + 99 others); Fri, 12 Apr 2019 13:35:15 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:34067 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfDLRfP (ORCPT ); Fri, 12 Apr 2019 13:35:15 -0400 Received: by mail-pg1-f193.google.com with SMTP id v12so5542171pgq.1; Fri, 12 Apr 2019 10:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jkaa5jmzbhTsKzYwSroYi/O0CDBrW65uQeV5PjzRPNo=; b=BlD9l5WV/+LxcB+yPbks6VYgHQjYcrn3dXmhweu3olLIFZtPo2nLV2AIF4ttFT1FhH Pp76BJ6NY28xpWgmEwQGVDF+JB0zHa26ZyGOet6vSe9iZUASgtRtrbgFplChfG3NQHDv yUgocDjy5aoh5oEpk8a2bf0TIAwF5LGA4Yh6MZHEqw3dB0w+vRvGl9jl3coFXvRtpD5U YieOQ8r3JYlupFwpw9UUz370zgir3drGDeulaYPa5jYCzgMUoQptGWFKgk6JfvXnmBOr tTSZPujBosE+igf/t+FoVYWCNqkOold/8Tre5v32ka82d6RGfQeoPjEXfRKy6PDHScMj aB8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jkaa5jmzbhTsKzYwSroYi/O0CDBrW65uQeV5PjzRPNo=; b=pa6NzB7STY2E+XrkxirwByqMaIpHkASz0393D5M9P9xzVZ4Gj+Lpuv9QpO5/fwa3Fn V7bZGheGO2ae41+AUDkpufh01YcKDTBmwldPtPx9NTYDVzDD6/F4cFNWfWPY3jHoSEdL gyxGSY6vtOPUk/1M/vZSgOwTw+HuHKRMg/zOJf0LVft5YB2N+267o2xqkxw5mR4sRsBP 9/Xt4JsUawGB006eDZ8bANN1tB8eM9CzQslJTx2nt71a7btHCTh9yS3tEByRZzLShNwd SBV7kAk7t+RmJf0MS33llCo8AK1I+BjFa1H4l52KCY8li2B40vB+lvGnFuYQZN6bNIip YPww== X-Gm-Message-State: APjAAAW4gaYMTOuy3qNPSUnDp+FA3UkeBRBPDpw3W0tI9e8+UsBvZvtY sHY/nyYp93wvecPMWQpSDoD/hZib X-Received: by 2002:a63:1203:: with SMTP id h3mr55584847pgl.164.1555090513762; Fri, 12 Apr 2019 10:35:13 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id n65sm115262036pfb.160.2019.04.12.10.35.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 10:35:12 -0700 (PDT) Subject: Re: [PATCH V5 0/3] hwmon: pwm-fan: Add RPM support To: Stefan Wahren , Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Rob Herring , Mark Rutland , Robin Murphy Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1554989411-23666-1-git-send-email-stefan.wahren@i2se.com> From: Guenter Roeck Message-ID: Date: Fri, 12 Apr 2019 10:35:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1554989411-23666-1-git-send-email-stefan.wahren@i2se.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/11/19 6:30 AM, Stefan Wahren wrote: > Contrary to the gpio-fan the pwm-fan driver isn't easy to setup > with pwmconfig/fancontrol because of the missing hwmon sysfs entry > for actual revolutions per minute. This series adds this feature. > Series applied to hwmon-next. Thanks, Guenter > Changes in V5: > - address Guenter's and Robin's comments: > - use of_property_read_u32 to get pulses-per-revolution > - call platform_get_irq ealier to avoid glitches on the regulator > - simplify pwm_fan_attrs_visible > > Changes in V4: > - remove copy & paste artifact in dt-binding example > - switch to u64 for rpm calculation > - drop overflow handling and init atomic > - handle 0 not as valid irq > - reduce range of pulses_per_revolution > - handle probe defer of platform_get_irq > - delete timer properly in bail-out path > > Changes in V3: > - rename property interrupt-ratio to pulses-per-revolution > to avoid confusion with interrupt binding > - handle error case pulses-per-revolution = 0 > - bail out properly in case we are unable to request the irq > > Changes in V2: > - address Guenter's comments: > - improve description of interrupts > - use atomic_t to avoid races of the pulse counter > - measure sample time to make rpm more reliable under load > - make sysfs entry fan1_input conditional > - add dt-property to define interrupts per fan revolution > - example for fan with RPM support > > Stefan Wahren (3): > dt-bindings: hwmon: Add tachometer interrupt to pwm-fan > Documentation: pwm-fan: Add description for RPM support > hwmon: pwm-fan: Add RPM support via external interrupt > > .../devicetree/bindings/hwmon/pwm-fan.txt | 21 +++- > Documentation/hwmon/pwm-fan | 3 + > drivers/hwmon/pwm-fan.c | 107 ++++++++++++++++++++- > 3 files changed, 126 insertions(+), 5 deletions(-) >