From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Wahren Subject: [PATCH V3 0/3] hwmon: pwm-fan: Add RPM support Date: Fri, 22 Mar 2019 09:24:00 +0100 Message-ID: <1553243043-19486-1-git-send-email-stefan.wahren@i2se.com> Return-path: Sender: linux-kernel-owner@vger.kernel.org To: Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland , Robin Murphy Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren List-Id: devicetree@vger.kernel.org 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. 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 | 22 ++++- Documentation/hwmon/pwm-fan | 3 + drivers/hwmon/pwm-fan.c | 100 ++++++++++++++++++++- 3 files changed, 123 insertions(+), 2 deletions(-) -- 2.7.4