Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4617700imc; Mon, 25 Feb 2019 08:01:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IbWZ3CQlpQV7umyoGuk3l5i4Vk4vjKc8laWUShuFgCesf+WcQy4gVt3ynepnYF8y8TUyago X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr20693975plr.97.1551110481073; Mon, 25 Feb 2019 08:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551110481; cv=none; d=google.com; s=arc-20160816; b=qk+7mi/m+F6/MoEoQYy5kLBSbTOgwV2h0bdLW7KbFxCrzJeEF6IiHpi75W2LT+8gEh NaBpMwKu48+Azft7pg4GprF8/J0GmtgH0VKBTMbiHARbr9QRyYSGI+Q82jf01VWpDPzc lQeHfNTuQ9pb8k2MuaBpMecoSALCX17WpyPsRfYLZF7jVuN8DQVKAj55sIYZt8BtStv0 VdIJt5RcEiSYxDoDhlfLCt+Tgds1bcAjfP8etWKscOSl8og1t1HjgGsyzVbTV7reoAGR bBwO+PlRUEPY13XdM3nt7236ijo/k69ilw24GZfF6LIbhxQnZKGiI8h6alUJGjwNamRz N3qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=UEGKtPT8wlVdKIVAY8iFBM0sRqdmjeAq/vHr431kOFc=; b=fgl7yk2yiLF5cO3vEQbSJkphgDtHqAg+Z8QS2WQo8npF2C+laa4y5ni/AERCjz1WpA wXVlrL2iOkXY92hQh6i+YVsnVK6GBoay+6GxftwaxA60+ycL0qPNHZ8pZQ0TMq3MZ9F4 IPQdXP1jDOxSnYGXejn9fChWHWWFkfB2G2q8SzinCREQleMympvAeC+rPvgC6XBhF/rW VIkfAcjvsFmU3YCWHF0sSAsYv5qv7eHSWkK28dizj9MKdCd6hlHqYNyCnpa/akDQJ9Y5 6UWnLP7Oku+v5Ouz/fd1K3jfOCy/875C5SVoDSrju6H1lNSFIzT1GsfJMxEOvyUJi4oN /5Kg== ARC-Authentication-Results: i=1; mx.google.com; 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 1si10341034pln.122.2019.02.25.08.01.03; Mon, 25 Feb 2019 08:01:21 -0800 (PST) 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; 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 S1727992AbfBYQAg (ORCPT + 99 others); Mon, 25 Feb 2019 11:00:36 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:37223 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727684AbfBYQAf (ORCPT ); Mon, 25 Feb 2019 11:00:35 -0500 Received: from stefan-Vostro-260.fritz.box ([109.104.53.79]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MsI4Q-1hIrgs0fk2-00tohy; Mon, 25 Feb 2019 16:59:56 +0100 From: Stefan Wahren To: Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH RFC V2 0/3] hwmon: pwm-fan: Add RPM support Date: Mon, 25 Feb 2019 16:59:16 +0100 Message-Id: <1551110359-19860-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:Q8/2wU265bhgF+eFx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vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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 | 19 +++++ Documentation/hwmon/pwm-fan | 3 + drivers/hwmon/pwm-fan.c | 94 +++++++++++++++++++++- 3 files changed, 115 insertions(+), 1 deletion(-) -- 2.7.4