Received: by 10.213.65.68 with SMTP id h4csp3912553imn; Tue, 10 Apr 2018 06:35:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nxyQML7ndUgwwqZZ1DG0AiCCkCGf7iq8eRlmY5fFRHNgt3JON7ypNMFUtQhTodWB6ZP0Z X-Received: by 10.101.71.194 with SMTP id f2mr335369pgs.312.1523367312722; Tue, 10 Apr 2018 06:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523367312; cv=none; d=google.com; s=arc-20160816; b=clWrrdSEEnu6Xl9FzhvO1e4yxtZ9qXjhK32nNUw2rQF0/FspvSR1I8ZPDfDvvErMG0 HnXLsU8FqGXIKfZYw5ESlfET+K1fJw1yfuJ1Yh6eSsYDDGvqv0M9y7PWqX6aIKTDRfVh KQAXTYhhEVb99KwjbMTzFsyzPq93BIiMneThLqF5m3UHoyI5wODCZtVPv+0xM4S1wFSZ G4tzbjnDOkYPps8F81K90fcT9orKj9MtnoGHzpRrKEglZ15y+sk9+sqYhTOSW6tg9cyo UkcV5r5czVPlUiRVpM+zIcBk98WZ+Im1VdNlHf2qqd5pNRn5mN/GXnDNBJUjR4db1jb1 VxUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=G1i6Et1SQ6yv2+k7JYOlW02LqyxIyzqhCLA7zswP3xk=; b=iy5MmFzjh5u50J/aPzUT5WKQ3BMNyVl8emUKr8gyH5jl43d5KgRr0njQrCdDarqOL1 5X0XAP/a4iDI+C81lxXrdi8aKRImZdoSbzIVP4615rBojtGPiDci6NBBA+hp69Mjhslq x8gS0d+4vjaSuDyoCeHH5NPaZ1ONoHngnS5hbXKT/JESNnlnOL0oAasCeatuRDt12wKh wRjPMddaIzcNWPO3JF8qANtzxUsisZwDrV6T0DT7ZdeIPKshJ8K/ergJpT+3Iau999gI yPXXdV4BWJKE86H1+jE5QnkvTD6ZA8bC0xS0t5z9OwBR7rq/rgStwTB8BcLN5IYUxtqu AWbA== 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 a87si2089455pfe.399.2018.04.10.06.34.35; Tue, 10 Apr 2018 06:35:12 -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; 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 S1754045AbeDJNbK (ORCPT + 99 others); Tue, 10 Apr 2018 09:31:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:58074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752943AbeDJNbH (ORCPT ); Tue, 10 Apr 2018 09:31:07 -0400 Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A06BF21771; Tue, 10 Apr 2018 13:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A06BF21771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh@kernel.org Received: by mail-qk0-f174.google.com with SMTP id 132so13312969qkd.5; Tue, 10 Apr 2018 06:31:06 -0700 (PDT) X-Gm-Message-State: ALQs6tBYQ9PbeGWkALn7d0chWsfdv45An1Ctbl8zcZfvU0BLDY8NWmbe z1XTDhE9U3DpDJOxooCkSNHYskUypZghQ8jQow== X-Received: by 10.55.221.219 with SMTP id u88mr600905qku.147.1523367065759; Tue, 10 Apr 2018 06:31:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.213.166 with HTTP; Tue, 10 Apr 2018 06:30:45 -0700 (PDT) In-Reply-To: <615d6771-00c3-a4a7-a99f-ec4f6e667c8f@kapsi.fi> References: <1521607244-29734-1-git-send-email-rrajk@nvidia.com> <1521607244-29734-4-git-send-email-rrajk@nvidia.com> <20180327145249.xjoo42qow34ksdle@rob-hp-laptop> <867aace8-dac7-51d4-bd46-15919b58b37d@kapsi.fi> <615d6771-00c3-a4a7-a99f-ec4f6e667c8f@kapsi.fi> From: Rob Herring Date: Tue, 10 Apr 2018 08:30:45 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V2 3/9] dt-bindings: Tegra186 tachometer device tree bindings To: Mikko Perttunen Cc: Rajkumar Rampelli , Mark Rutland , Thierry Reding , Jon Hunter , Jean Delvare , Guenter Roeck , Jonathan Corbet , Catalin Marinas , Will Deacon , Kate Stewart , Greg Kroah-Hartman , Philippe Ombredanne , Manikanta Maddireddy , Mikko Perttunen , Arnd Bergmann , Timur Tabi , Andy Gross , Wei Xu , Alex Elder , "heiko@sntech.de" , Krzysztof Kozlowski , Ard Biesheuvel , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux PWM List , linux-tegra@vger.kernel.org, Linux HWMON List , linux-doc@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Laxman Dewangan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 9, 2018 at 9:37 AM, Mikko Perttunen wrote: > > > On 04/09/2018 04:21 PM, Rob Herring wrote: >> >> On Mon, Apr 9, 2018 at 12:38 AM, Mikko Perttunen wrote: >>> >>> Rob, >> >> >> Please don't top post to lists. >> >>> this binding is for a specific IP block (for measuring/aggregating input >>> pulses) on the Tegra186 SoC, so I don't think it fits into any generic >>> binding. >> >> >> What is it hooked up to to measure? You only mention "fan" five times >> in the doc. > > > In practice, fans. > >> >> You have #pwm-cells too, so this block has PWM output as well? If not, >> then where's the PWM for the fan control because there is no point in >> having fan tach without some control mechanism. > > > It doesn't provide a PWM output. The (Linux) PWM framework provides > functionality in both directions - control and capture. But if the device > tree #pwm-cells/pwms properties are only for control, we may need to > introduce a new #capture-pwm-cells/capture-pwms or similar. Yes, perhaps. But there is no point in having #capture-pwm-cells/capture-pwms if you aren't describing the connection between the fan and the fan controller. > The idea is that the generic fan node can then specify two pwms, one for > control and one for capture, to enable e.g. closed-loop control (I'm not > personally familiar with the usecase for this but I could imagine something > like that). The control PWM can be something completely different, maybe not > a PWM in the first place (e.g. some fixed voltage). Yes. As you can have different types of fans (3-wire, 4-wire, etc.) they would have different compatibles and differing properties associated with them. >> There's only so many ways to control fans and types of fans, so yes, >> the interface of control and feedback lines between a fan and its >> controller should absolutely be generic. > > > I'm not quite getting what you mean by this. Clearly we need a custom > compatibility string for the tachometer as it's a different hardware block > with different programming than others. Yes, of course. It's the interface between fan controllers and fans that I'm concerned about. > Or are you complaining about the > nvidia,pulse-per-rev/capture-window-len properties? Well, those sound like properties of a fan (at least the first one), so they belong in a fan node. The aspeed fan controller is probably the closest thing we have to a fan binding. Look at that if you haven't already. Rob