Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2357058ybv; Fri, 21 Feb 2020 14:05:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzwNJjsvO9GZ9QGx+guJ2LIQb2lHr65nn4r1amM3W2z2TlNjbrQkeUf3oYMBfE8zzzHfguS X-Received: by 2002:aca:af50:: with SMTP id y77mr3937560oie.8.1582322714896; Fri, 21 Feb 2020 14:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582322714; cv=none; d=google.com; s=arc-20160816; b=09Q9gkAUxsnbKgtpT5nfH08F6SYcFRtoO+/RNraWxlCKsAlIbTxGyRkRo1sqkveJB5 TZ0RlRXU5po9W8QcqFVt3U3mEiRWxNJMShaHU60CSmUpyR5VFo4/wmYFnEPCjalRrq6J NGDK9yQJKP6oT0u7oMXDQzHsKwvGbflCh+QILUH7MRf0DiogIR9KUIfUi+k8JkXGGdGf m9bspUCLSWKq4Q/IJZjvEh4aV+fyVNa/M8Cl/QzPR7ZB6xJ1Jm1UHnPA7QfVsJCO8Y6n l53oCbc4xW5tM5sF0Tnu4vqKBW+5n/bguX6dU3sqHxiDv3jxudeVUd0uDSqh1WrYG+Da 69/A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=HIILDZjGMab0ngZu0oCmjzwiRqbsv0tSUBIRORn39WU=; b=GP6eWQ8FnpkbVelipxnKN0MnxUuWqBFDqTbkr7hmKUhF0pz+psdqOuU4w4O43UcaV8 byQhwc9x3wa50LYZaHqucZuP0bt3GCXO5Eu+uDFWXBAoz5HOCiEIEnG+NBSIreXSqJUu 4PmpfsEnc/kMzoSfmL6B+E4s8LVZj571DOrIRgADfRLI70NogNGa1O7NCKNn0Chs2Lx7 eEk79OsqGz4tys04R+7dwH41JuOTPNAOWKlADKRZNW4IbmuyPV92Ctjugpw7aU+kAWjv jk8lSjSW8t5cM/rBGGEQIcpb3oRzXGQgqjcOot5uU8mrzY6EjN6Ix5tGaElID+9MdeV4 P/CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hE+MPvG/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h28si2227959otg.63.2020.02.21.14.05.01; Fri, 21 Feb 2020 14:05:14 -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; dkim=pass header.i=@kernel.org header.s=default header.b="hE+MPvG/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbgBUWE7 (ORCPT + 99 others); Fri, 21 Feb 2020 17:04:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:49572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgBUWE7 (ORCPT ); Fri, 21 Feb 2020 17:04:59 -0500 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 58CD72072C; Fri, 21 Feb 2020 22:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582322698; bh=ixkaQsOyXc65L7U5cAzBy/t7QDxhcFt3SZW7c7F25dw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hE+MPvG/9HlApVb7a1C28KlYECMfNuRDiN5O/RjQeGCMCTPwZif/S/YvJ3If4HBTr Zcf5e4RSkOSoTbbHRzOeqS1MPWOHar1v8y4TTptGKAnNkZlw4pcEM412p0OvN5oN2S N6+5cm3k6Gaukxa1iLXjUVY1CJuM9VvipF3t7LrA= Received: by mail-qt1-f181.google.com with SMTP id n17so2428773qtv.2; Fri, 21 Feb 2020 14:04:58 -0800 (PST) X-Gm-Message-State: APjAAAX5ccd/wo+Yi5RqNKmlZzcMfwAwJfJdzxQBsrVW/Yt432JeySLU q5OnmIU6fMdpNPPyoR4nERzfkFpV0GbVVluKLA== X-Received: by 2002:aed:2344:: with SMTP id i4mr34521971qtc.136.1582322697489; Fri, 21 Feb 2020 14:04:57 -0800 (PST) MIME-Version: 1.0 References: <20200221041631.10960-1-chris.packham@alliedtelesis.co.nz> <20200221041631.10960-4-chris.packham@alliedtelesis.co.nz> <20200221155259.GA11868@roeck-us.net> In-Reply-To: <20200221155259.GA11868@roeck-us.net> From: Rob Herring Date: Fri, 21 Feb 2020 16:04:45 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/5] dt-bindings: hwmon: Document adt7475 invert-pwm property To: Guenter Roeck Cc: Chris Packham , Jean Delvare , Mark Rutland , Linux HWMON List , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Logan Shaw 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 Fri, Feb 21, 2020 at 9:53 AM Guenter Roeck wrote: > > On Fri, Feb 21, 2020 at 09:40:00AM -0600, Rob Herring wrote: > > On Thu, Feb 20, 2020 at 10:16 PM Chris Packham > > wrote: > > > > > > Add binding information for the invert-pwm property. > > > > > > Signed-off-by: Chris Packham > > > --- > > > > > > Notes: > > > Changes in v4: > > > - use $ref uint32 and enum > > > - add adi vendor prefix > > > > > > Cahnges in v3: > > > - new > > > > > > Documentation/devicetree/bindings/hwmon/adt7475.yaml | 12 ++++++++++++ > > > 1 file changed, 12 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.yaml b/Documentation/devicetree/bindings/hwmon/adt7475.yaml > > > index e40612ee075f..6a358b30586c 100644 > > > --- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml > > > +++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml > > > @@ -50,6 +50,17 @@ patternProperties: > > > - $ref: /schemas/types.yaml#/definitions/uint32 > > > - enum: [0, 1] > > > > > > + "^adi,invert-pwm[1-3]$": > > > + description: | > > > + Configures the pwm output to use inverted logic. If set to 1 > > > + the pwm uses a logic low output for 100% duty cycle. If set > > > + to 0 the pwm uses a logic high output for 100% duty cycle. > > > + If the property is absent the pwm retains it's configuration > > > + from the bios/bootloader. > > > > I believe we already have an inverted flag for consumers. That doesn't > > work if you don't have a consumer described in DT, but then the > > question is should you? Or is this something the user will want to > > configure from userspace. > > > > Normally that is a system property. It is difficult to imagine > that it would ever have to be configured from userspace at runtime. > Most of the time users won't have any idea, and the board datasheet > (if avaible) won't list such information. Yes, I agree and for those cases I'd expect the consumer is described in DT too. I read and refreshed my memory on this binding after sending this. I believe this is for a fan which I'd expect to be in DT as fans need power and there's different types. The userspace case I was thinking of was more the hobbyist boards with PWM to a connector. Rob