From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56348C43461 for ; Tue, 15 Sep 2020 00:56:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F243D20897 for ; Tue, 15 Sep 2020 00:56:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AdtHh8uw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F243D20897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DtF3FqG5z6u78sb6VfzBr1aYEWZ7FNxbN8nVKGjZrj4=; b=AdtHh8uwrkRovEGvAa6GKz6RV lY6owgrNyWD8hxsqkDdmlp2OJUHe0e5Ty76wHJ4EKvbyknqVKao8NqKscjjHafqmOsf886qdlu3kw nIMaDWsWmNmm2EzKMBsvUnFM4pNdmXH7bHRn/eJOmrXHBIPzmdV+WHZ5C+E2cUuy54OqQMaoeBVA7 XwYqy5SboU/ZPYwHVYUiQ5hRW4KdrZ6tqIiZLcycYV3B2XdUGX4t6xb9fygmiKgSTCEtFu6dLZWtw M0ARAkeg3WRWFVnRzk+ZkWd3lGV/fcFJfjgMkGFYHLdA6SkulLwWx8sE8nLM1innJexKdHphV8lrz VylnBZPZg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHzFC-0000Qi-E9; Tue, 15 Sep 2020 00:54:50 +0000 Received: from mail-il1-f193.google.com ([209.85.166.193]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHzF9-0000QI-EQ for linux-arm-kernel@lists.infradead.org; Tue, 15 Sep 2020 00:54:48 +0000 Received: by mail-il1-f193.google.com with SMTP id q4so1418525ils.4 for ; Mon, 14 Sep 2020 17:54:47 -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:content-transfer-encoding :in-reply-to; bh=Uu60TNaJ5WiZEoTUp5Pm6cAzGAGF09qo0+Sx8E6CGrY=; b=SSeUxuqZ63q40MfLa2vongdNiW606qyFBkP08WX1RqxoPOyJx8XFZXfb3tLIfXVXWB K0uKeTbSwH65b4SadUSHFIXVLoETANHg3xmhxH5A43UTojKrdpHnaHSahT/oVCCJOZDb SGIza4MtaBNPNmR+zpkze10w5lNfPR0oWC1/gUixVNP7Jv9RwfWgZhQITdqmQgXREhUm ybtGUT9iTVZMQBGxoja9+WDi0838ZX9alpAGDikj72eB20e26B/UHv8eNQKlC9E15L8r veswjvowzpPDCejaDLbWBWmYh3io92y3T4hg6jkM6Vk5dKfWKTKCrrYhC1qsfVE29iDX XJfg== X-Gm-Message-State: AOAM532CrcdrJhPa2Srr0azea+ZRoDQQOxuF+VVYI7mA+ZTq0AlopBdg F7wVmLBdba8OZxTDkcI9qA== X-Google-Smtp-Source: ABdhPJxMkfxz3ko4AaV3oT3oSGOSwswpuwFqnR3S7izCYKAmLPhb3acF+Wxp67/e7JcOa5Neo9oUbw== X-Received: by 2002:a92:9fcc:: with SMTP id z73mr7796328ilk.234.1600131286742; Mon, 14 Sep 2020 17:54:46 -0700 (PDT) Received: from xps15 ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id y10sm6805351ioy.25.2020.09.14.17.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 17:54:45 -0700 (PDT) Received: (nullmailer pid 610633 invoked by uid 1000); Tue, 15 Sep 2020 00:54:43 -0000 Date: Mon, 14 Sep 2020 18:54:43 -0600 From: Rob Herring To: Jonathan =?iso-8859-1?Q?Neusch=E4fer?= Subject: Re: [PATCH v2 04/10] dt-bindings: pwm: Add bindings for PWM function in Netronix EC Message-ID: <20200915005443.GA604385@bogus> References: <20200905133230.1014581-1-j.neuschaefer@gmx.net> <20200905133230.1014581-5-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200905133230.1014581-5-j.neuschaefer@gmx.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_205447_501107_1403A059 X-CRM114-Status: GOOD ( 26.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Heiko Stuebner , devicetree@vger.kernel.org, Linus Walleij , Thierry Reding , Fabio Estevam , linux-rtc@vger.kernel.org, Arnd Bergmann , Mauro Carvalho Chehab , Sam Ravnborg , Daniel Palmer , Andreas Kemnade , NXP Linux Team , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , linux-pwm@vger.kernel.org, Stephan Gerhold , allen , Sascha Hauer , Lubomir Rintel , Mark Brown , Lee Jones , linux-arm-kernel@lists.infradead.org, Alessandro Zummo , linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Heiko Stuebner , Josua Mayer , Shawn Guo , "David S. Miller" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Sep 05, 2020 at 03:32:24PM +0200, Jonathan Neusch=E4fer wrote: > The Netronix embedded controller as found in Kobo Aura and Tolino Shine > supports one PWM channel, which is used to control the frontlight > brightness on these devices. > = > Signed-off-by: Jonathan Neusch=E4fer > --- > = > v2: > - Add plaintext binding to patch description, for comparison > - Fix pwm-cells property (should be 2, not 1) > - Add dummy regulator to example, because the pwm-backlight binding requi= res a > power supply > = > = > For reference, here is the binding in text form: > = > = > PWM functionality in Netronix Embedded Controller > = > Required properties: > - compatible: should be "netronix,ntxec-pwm" > - #pwm-cells: should be 2. > = > Available PWM channels: > - 0: The PWM channel controlled by registers 0xa1-0xa7 > = > Example: > = > embedded-controller@43 { > compatible =3D "netronix,ntxec"; > ... > = > ec_pwm: pwm { > compatible =3D "netronix,ntxec-pwm"; > #pwm-cells =3D <1>; > }; > }; > = > ... > = > backlight { > compatible =3D "pwm-backlight"; > pwms =3D <&ec_pwm 0 50000>; > }; > --- > .../bindings/mfd/netronix,ntxec.yaml | 19 +++++++++++ > .../bindings/pwm/netronix,ntxec-pwm.yaml | 33 +++++++++++++++++++ > 2 files changed, 52 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-= pwm.yaml > = > diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/= Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > index 596df460f98eb..73c873dda3e70 100644 > --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > @@ -31,6 +31,9 @@ properties: > description: > The EC can signal interrupts via a GPIO line > = > + pwm: > + $ref: ../pwm/netronix,ntxec-pwm.yaml > + > required: > - compatible > - reg > @@ -53,5 +56,21 @@ examples: > interrupts =3D <11 IRQ_TYPE_EDGE_FALLING>; > interrupt-controller; > #interrupt-cells =3D <1>; > + > + ec_pwm: pwm { > + compatible =3D "netronix,ntxec-pwm"; > + #pwm-cells =3D <2>; > + }; > }; > }; > + > + backlight { > + compatible =3D "pwm-backlight"; > + pwms =3D <&ec_pwm 0 50000>; > + power-supply =3D <&backlight_regulator>; > + }; > + > + backlight_regulator: regulator-dummy { > + compatible =3D "regulator-fixed"; > + regulator-name =3D "backlight"; > + }; > diff --git a/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yam= l b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml > new file mode 100644 > index 0000000000000..0c9d2801b8de1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml > @@ -0,0 +1,33 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/netronix,ntxec-pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: PWM functionality in Netronix embedded controller > + > +maintainers: > + - Jonathan Neusch=E4fer > + > +description: | > + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > + > + The Netronix EC contains PWM functionality, which is usually used to d= rive > + the backlight LED. > + > + The following PWM channels are supported: > + - 0: The PWM channel controlled by registers 0xa1-0xa7 > + > +allOf: > + - $ref: pwm.yaml# > + > +properties: > + compatible: > + const: netronix,ntxec-pwm > + > + "#pwm-cells": > + const: 2 Just move this to the parent and make the parent a pwm provider. There's = no need for child nodes for this or the rtc. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel