Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2033785ybv; Fri, 21 Feb 2020 07:42:03 -0800 (PST) X-Google-Smtp-Source: APXvYqywPAVpKliHXKA2aMqUM6KRFm1NEQFg0e4grjeAOkfiEJlF0N5E1xt+EP3jFbm7r48L6ov9 X-Received: by 2002:a9d:7652:: with SMTP id o18mr29837480otl.260.1582299723266; Fri, 21 Feb 2020 07:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582299723; cv=none; d=google.com; s=arc-20160816; b=RwhmFx4YWldWdneKBr9OHtFbK5wMuI6rwOjfkaAf8gvnIVwq99xVFoSinXB0d9M9dB sna/3PtmlO75b9Tt2orAMyecOFQsiCbFXDgp7KcxiLLH70Wz4nKKjA/5ggK83fVx64P2 1xUdQ77T3FA/x+tjOZgRrmHhxpBwIEA5MORze6awPxBbRcSyC5Dq2Gtoi3yk8UFz4h/c dLSnq+A+iaaJjkg7PSaKHjBRe6x2buiNtfYzC5EOztLLSDIUOj1vK49iGw1A9R/yUOAa rx+DvwYayyFIM95s3BJumfPfdyQN/mUQn6/Jcq9eEjpxYFIn5DwjXv85lSBPWmWcx0hs 3S+Q== 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=98Ck0FBHN8M521D882g2atrjo4VAohGIEpMEQYQf0zI=; b=wJ4UF1oIr+mgFRiNckBmILgASQ4DbAf8WKfeEx4ziHWEQIGS2de5qB7Z9Hj+x4H4/v fpUXUK7fGCIP7DSFAfC+f8zV+uGmWK3wrF05i8M1emmUEtkmzzrxwkkqE0agnVxhEzE/ 50Ab2M/C9e3ocxWGH7cN/or+ZXz9koHKBn7086nqIq1d60Rb5fVeq9MzczwoEIIhg1W8 MiXgcgbPH7wpZxsAoJ81lK+p36Dm0X+byOW6p3HaV6jqV8GHEiAiLdcFyMLUdDR1ulN3 lPPmuL2fTq3T4pv4dMEPEAN+OgYuTuKGoaKbzqJR9Oz+wF1RsH2QwDi0bEwtieo+BcOi evRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C50UxxII; 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 t11si860467oih.187.2020.02.21.07.41.50; Fri, 21 Feb 2020 07:42:03 -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=C50UxxII; 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 S1728976AbgBUPkN (ORCPT + 99 others); Fri, 21 Feb 2020 10:40:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:33888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728815AbgBUPkM (ORCPT ); Fri, 21 Feb 2020 10:40:12 -0500 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 3325F208E4; Fri, 21 Feb 2020 15:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582299612; bh=+DoRoBMJXa06a9s5rF/Tg0R2Bb7OUU1w4NYR6LGt5us=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=C50UxxIIkUBAA2owQJBxXLzj5mfErfF8Pc2OBetl4t/cV2KyEMFMjn8eC4BwC7mmB kCwDosbSs53gE4Sdr5Fg43Ax+XA9Ho+WY/6Ra20KzNoV0s1vrbxL2eSWxW29kf/Mqk pkg+U+QsIhllO3E7zJbObensr46EDR31k4fiVQ/w= Received: by mail-qk1-f176.google.com with SMTP id u124so2142822qkh.13; Fri, 21 Feb 2020 07:40:12 -0800 (PST) X-Gm-Message-State: APjAAAVWTnkvg0TT+tYQ0dwv4VG90sEhb2AlHYq/UYKheOekFsdrUtva UyaKIOjoiDlVrAqb3AWsHyj9DjU4LPJxqKXl/g== X-Received: by 2002:a05:620a:1237:: with SMTP id v23mr17847336qkj.223.1582299611320; Fri, 21 Feb 2020 07:40:11 -0800 (PST) MIME-Version: 1.0 References: <20200221041631.10960-1-chris.packham@alliedtelesis.co.nz> <20200221041631.10960-4-chris.packham@alliedtelesis.co.nz> In-Reply-To: <20200221041631.10960-4-chris.packham@alliedtelesis.co.nz> From: Rob Herring Date: Fri, 21 Feb 2020 09:40:00 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/5] dt-bindings: hwmon: Document adt7475 invert-pwm property To: Chris Packham Cc: Jean Delvare , Guenter Roeck , 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 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. The problem with 'invert' properties is they assume you know what the not inverted state is. I would also make this an array: adi,pwm-active-state = <1 0 0 1>; // PWM1 and PWM2 active low And not present means <1 1 1 1>. Rob