Received: by 10.213.65.68 with SMTP id h4csp2999899imn; Mon, 9 Apr 2018 12:29:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49tD+Jviq2BRO8CMH740q5VrWbvzsK42Fs04CuSPUTt5RI88BfClLopd/WatxbLDvhbRvyA X-Received: by 10.99.96.193 with SMTP id u184mr26593790pgb.103.1523302187497; Mon, 09 Apr 2018 12:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523302187; cv=none; d=google.com; s=arc-20160816; b=ZaiP2twJLV4kJz3hjuWHyMS2ilmQj5FoEn6q6xmB2MnM43r6X5njW1R89ckDvSAuCF z3Z3fWuxj/IHeMTI5QpGHmS/jpyvI/G0xjMEWp77GJk+1Uuoar3tFuU9q1WW91BwhwLY 4v46vl0AFvNoeCkT4LnXNlTcHrASHvbe+2DzY2rBeIAXElRj+E6wK7s/MDbdOu2M4Kmq Df8ezZB8Yv71VNYO74Kx+F6tpYt5A6EjRc6LZKHUrKLQI2PFqbhzUGlKUQDhLMYCzuD7 hpiQ0Gj6p7jKkJisZOBOwMvzSdVB4zqWeyPWj2n1jIzq8MxURH3bzEnZn70aYZ9PIrPL r0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=XzWjg9lvqmaPFBeiFMFb8QHmxGy1JmDE5E1d06V6cDc=; b=S9BtG7nPTQ29ERClNV0SLV0v5FlyPlHWxPDeXEhNfNlUr8U/kwfo4k6GMqYys1QFcP fUHjxNJFoApCqJlgZ18XqyH58Plb5562VyrTtdhO+oNOwelqG/cG6FyNkqXCTn+kTkwn ryCdylyJqLVsTZMkC51PMor8kTL9F7zxbeSnqVs2m88psrBrgfyjHsJgTwgi93dIvmtq NWKVdIJ2/03lWaQuHtQgO2YNMZfwH8WvLoeNhod6sFqY8eEeBk7SHB/PlvrRFf6G3KV9 SCKWdHhl8lhf0ECobjpyviDkSIfSoGTO7fq6n6QfINvjwULMKNbC2yjtLHhKPd1Jf6Gm Pb7w== 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 n5si718606pfi.360.2018.04.09.12.29.10; Mon, 09 Apr 2018 12:29:47 -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 S1753352AbeDITZB (ORCPT + 99 others); Mon, 9 Apr 2018 15:25:01 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:33107 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753056AbeDITY6 (ORCPT ); Mon, 9 Apr 2018 15:24:58 -0400 Received: by mail-ot0-f195.google.com with SMTP id 23-v6so9956822otj.0; Mon, 09 Apr 2018 12:24:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XzWjg9lvqmaPFBeiFMFb8QHmxGy1JmDE5E1d06V6cDc=; b=E0H2ltgUWloGaAzOWX8+3k88lEhlcB8LdUp1jGEXqu3acszhhM9SMw6or8ThFAZxTV pgm4H3eXFzLUcjsaacdjurAa8OX/60zQkaZtzj2TufKGRWolBXMcObHp+GnICYiyz3EW ujYwBgmDFGAFz8xliOk/g6aaeGeH9kNG8Tx4tg1JUcRtggK9fcYZSG/A3bXIdpyhb2pV 5Wdcd0swnCpG+mNqDyX+aQ1h9WvBfHjHEZqT8Jb1kfJxpj0WdGpZ+sUQFCGbgGS0NgcL eLRg6wDfAxeqmWQDUOXjDo6lZaBCbTTd/2MWNxmZSsJQM/QBwkbMPRPT1K1h7SYfVQi6 CVsg== X-Gm-Message-State: ALQs6tCj03lNryO5XA3qmByO4Fj/8NbeCuaIoeu5yKbeLvbv5IrV+rbM zwZMTG6CRzEusS+ptZB6BV7LNlc= X-Received: by 2002:a9d:4794:: with SMTP id b20-v6mr12439223otf.183.1523301897708; Mon, 09 Apr 2018 12:24:57 -0700 (PDT) Received: from localhost (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.gmail.com with ESMTPSA id z51-v6sm653407otc.25.2018.04.09.12.24.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Apr 2018 12:24:56 -0700 (PDT) Date: Mon, 9 Apr 2018 14:24:56 -0500 From: Rob Herring To: Tim Harvey Cc: Guenter Roeck , Lee Jones , Mark Rutland , Mark Brown , Dmitry Torokhov , Wim Van Sebroeck , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-input@vger.kernel.org, linux-watchdog@vger.kernel.org Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: Add Gateworks System Controller bindings Message-ID: <20180409192456.ne4zgdqozucquk42@rob-hp-laptop> References: <1522250043-8065-1-git-send-email-tharvey@gateworks.com> <1522250043-8065-2-git-send-email-tharvey@gateworks.com> <20180328162416.GB25325@roeck-us.net> <20180328202321.GA21664@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 28, 2018 at 01:53:53PM -0700, Tim Harvey wrote: > On Wed, Mar 28, 2018 at 1:23 PM, Guenter Roeck wrote: > > On Wed, Mar 28, 2018 at 12:17:34PM -0700, Tim Harvey wrote: > >> On Wed, Mar 28, 2018 at 9:24 AM, Guenter Roeck wrote: > >> > On Wed, Mar 28, 2018 at 08:14:00AM -0700, Tim Harvey wrote: > >> >> This patch adds documentation of device-tree bindings for the > >> >> Gateworks System Controller (GSC). > >> >> > >> >> Signed-off-by: Tim Harvey > >> >> --- > >> >> v3: > >> >> - replaced _ with - > >> >> - remove input bindings > >> >> - added full description of hwmon > >> >> - fix unit address of hwmon child nodes > >> >> > >> >> --- > >> >> .../devicetree/bindings/mfd/gateworks-gsc.txt | 135 +++++++++++++++++++++ > >> >> 1 file changed, 135 insertions(+) > >> >> create mode 100644 Documentation/devicetree/bindings/mfd/gateworks-gsc.txt > >> >> > >> >> diff --git a/Documentation/devicetree/bindings/mfd/gateworks-gsc.txt b/Documentation/devicetree/bindings/mfd/gateworks-gsc.txt > >> >> new file mode 100644 > >> >> index 0000000..8f530ed > >> >> --- /dev/null > >> >> +++ b/Documentation/devicetree/bindings/mfd/gateworks-gsc.txt > >> >> @@ -0,0 +1,135 @@ > >> >> +Gateworks System Controller multi-function device > >> >> + > >> >> +The GSC is a Multifunction I2C slave device with the following submodules: > >> >> +- WDT > >> >> +- GPIO > >> >> +- Pushbutton controller > >> >> +- HWMON > >> >> + > >> >> +Required properties: > >> >> +- compatible : Must be "gw,gsc" > >> >> +- reg: I2C address of the device > >> >> +- interrupts: interrupt triggered by GSC_IRQ# signal > >> >> +- interrupt-parent: Interrupt controller GSC is connected to > >> >> +- #interrupt-cells: should be <1>, index of the interrupt within the > >> >> + controller, in accordance with the "one cell" variant of > >> >> + > >> >> + > >> >> +Optional nodes: > >> >> +* watchdog: > >> >> +The GSC provides a Watchdog monitor which can power cycle the board's > >> >> +primary power supply on most board models when tripped. > >> >> + > >> >> +Required watchdog properties: > >> >> +- compatible: must be "gw,gsc-watchdog" > >> >> + > >> >> +* hwmon: > >> >> +The GSC provides a set of Analog to Digitcal Converter (ADC) pins used for > >> >> +temperature and/or voltage monitoring. > >> >> + > >> >> +Required hwmon properties: > >> >> +- compatible: must be "gw,gsc-hwmon" > >> >> + > >> > > >> > "hwmon" is a very Linux specific term. It might make sense to find a more > >> > generic term. > >> > >> The 'hwmon' driver supports child nodes that fall into the following category: > >> - temperature sensor (GSC internal temperature sensor - i2c registers > >> returns value in C*10) > >> - voltage rails (two types here; cooked: i2c registers return > >> pre-scaled value in mV), raw: i2c registers return a raw ADC value > >> that must be scaled based on ADC internal ref voltage and resolution > >> and adjusted for a voltage divider to convert to mV > >> - fan setpoints (I'll explain these below) > >> > >> I called the node 'gw,gsc-hwmon' because the driver fits into the > >> 'hwmon' API. Isn't that appropriate here for the driver compatible > >> string? > >> > > > > Devicetree properties are supposed to be OS independent. +1 > > > >> > > >> >> +Optional hwmon properties: > >> >> +- gw,reference-voltage: ADC reference voltage (mV) used in scaling raw ADCs > >> > > >> > AFAIK devicetree likes to specify voltages in uV. > >> > >> There are currently plenty of dt props specified in mV (grep -r mV > >> Documentation/devicetree/bindings/). > >> > > > > "But so many others are speeding, why do I get a ticket ?" > > > > Please discuss with Rob. > > Yes - hoping for feedback on mV vs uV as well as naming of hwmon mfd child node. Use what is defined in Documentation/devicetree/bindings/property-units.txt. If you don't like what is there, then add to it first. But generally you should have some reason why what's there doesn't work for you. Rob