Message ID | 20221028165215.43662-2-fnkl.kernel@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp938749wru; Fri, 28 Oct 2022 09:59:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Q166JsFKUhOmN/JrXe13KOp7pJOmTht0J8jLYRXIC3HwfU34XvSrvbpVEXmI2NdTIttLh X-Received: by 2002:a05:6402:5406:b0:452:1560:f9d4 with SMTP id ev6-20020a056402540600b004521560f9d4mr353215edb.333.1666976377046; Fri, 28 Oct 2022 09:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666976377; cv=none; d=google.com; s=arc-20160816; b=qYFeAeFNGt2vn9MPfQgSy3ijxPn7Yg+Akhvyhn3qjjx3evItEiX4MiSLJyp/d0JUD7 5bLugtcYmiZ/xz7l8Otv0/Xx/KrH5aRMBTbyAxc0/Ys3uHWBlX2vOo4nGRVsDhYuOVq6 HPfzRJK7x9LrDJNgtaXJQocUV7JkASK3Tjv8nH4bk3emUS8ujcxw6zn1tKcpC3T/yMES Pkk+zRTcNIxeeNWXKOHEnIXKWqKXnO/OrmuMFM1AsAZmqJdNgN13Nx5s8imL8ITqxrQ1 iCKqsi0Fq6Ld1coWQdq70MPm3Z0m9Arem2YT9fhV8d3tiJN+Egqs4ox9cOiwEi620wrs /HRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C33seGVoVdC4qa6odCGMM1UoRMAEyPpQFpcRe9CmJUc=; b=GVAtmHLWF2489hu+S+4iza5SflEDfh3/lWZqZ4031L2LPLk65UKazlQM28qv9UP54O PRJk2EY1J+yZ87GcLJhejjmZBK2277QTz2EUpHWAENlQemooCsgDnoadLqBxJa17z1tR LyTrytgQkOne22SulllUk1o/MNDnSNiuq7y+lbQsX2zqb91DuCEYFDlGmUBUp7HGXRXT f7yjMMB6qtK6/6MEuEgXYTta+mXu+5NuJajtDmyvPEckjPV10dRY/m58PFh0ALhdDL0f 3KXRxCNDSZeNBK7QbCqebNRWSDEdRJI0vFj2z3HOh7P5Xj4Vx9lh4Z/Loyqgr0e3vFD+ ICWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ovzgyGUx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a508710000000b0045beaf03ddesi4713170edb.411.2022.10.28.09.59.13; Fri, 28 Oct 2022 09:59:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ovzgyGUx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbiJ1Qxk (ORCPT <rfc822;norden.jeffspam@gmail.com> + 99 others); Fri, 28 Oct 2022 12:53:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbiJ1Qxb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 12:53:31 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADE720FB2A; Fri, 28 Oct 2022 09:53:31 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id z18so3721510edb.9; Fri, 28 Oct 2022 09:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C33seGVoVdC4qa6odCGMM1UoRMAEyPpQFpcRe9CmJUc=; b=ovzgyGUxkoVOneqlKtvwiYv658V+dDonx3OJ+SBev41qlLDg1NpzyH+GqBCCnE5/wv adSab9LjklbHjXr2q9nMNuRdXkNXuB2fnFCTEWPh+xrJVTgfyXf3s8qbhbhrf373AULi dnpRsp+VcGt8w0RhxPNVBx/ZjfqOBxgbXFuABBSweMNzZmHg5YBRtx4Rj+ozu4bJhiI3 B1X9dmEuc1tqAar4mMczvCBeEQ4W/aQx2njMj4QB2SodIrSm7s9C6wtJ22KYRAtH/4Jk VHPMotD+KziMDnWeFqOY3ADQhN5TcxjbT712+cPKrZ1c0PujS0Yj8VgRasDErFjMrXCv PBpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C33seGVoVdC4qa6odCGMM1UoRMAEyPpQFpcRe9CmJUc=; b=ONX7DpgGtF38DMEf7KTw/9jLHiLuLshgW9ZZwZGwPuHYnEg/TDVtuZ4KqgnWZ6nOa4 Gm3K4p3fiIb+RKF0TT+F43eHlBs+ZP3unUBT3ToCVI+CPpQOTO6wxxSl9KJOHJPPh3kQ 60bV6mlSrjJyfEI5uNXXoVcFputl+c7knIv4z8uu9kDl7IgKcyxIiiq2pGvPwj2HNoQk cVIccGB/rg6XzPUPBt+g0ZyiLyHc1ztNeQAX0CrsZZEbHZ9M3ozeyE94UzkGd2Ztvl/G Mb8HxCOC1Bjo1/41tQCo+ViOBKV8JRfQLB1Jg39B3krg7Zp4p1EoLLGzabksGYgC3OiG LbTw== X-Gm-Message-State: ACrzQf0ixubwYylJxkJbo1NG2WAEirvFj5vvU9COiSHO0trpGVao951d x9bddcurifEyWx+91snATww= X-Received: by 2002:a05:6402:5ca:b0:43b:6e01:482c with SMTP id n10-20020a05640205ca00b0043b6e01482cmr340391edx.189.1666976009647; Fri, 28 Oct 2022 09:53:29 -0700 (PDT) Received: from localhost ([88.227.58.131]) by smtp.gmail.com with UTF8SMTPSA id j22-20020a170906411600b0073d638a7a89sm2411522ejk.99.2022.10.28.09.53.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 09:53:29 -0700 (PDT) From: Sasha Finkelstein <fnkl.kernel@gmail.com> To: thierry.reding@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: marcan@marcan.st, sven@svenpeter.dev, alyssa@rosenzweig.io, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sasha Finkelstein <fnkl.kernel@gmail.com> Subject: [PATCH 1/4] dt-bindings: pwm: Add Apple PWM controller Date: Fri, 28 Oct 2022 19:52:13 +0300 Message-Id: <20221028165215.43662-2-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20221028165215.43662-1-fnkl.kernel@gmail.com> References: <20221028165215.43662-1-fnkl.kernel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747951421341509057?= X-GMAIL-MSGID: =?utf-8?q?1747951421341509057?= |
Series |
PWM and keyboard backlight driver for ARM Macs
|
|
Commit Message
Sasha Finkelstein
Oct. 28, 2022, 4:52 p.m. UTC
Apple SoCs such as the M1 contain a PWM controller used
among other things to control the keyboard backlight.
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
---
.../devicetree/bindings/pwm/pwm-apple.yaml | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/pwm-apple.yaml
Comments
On 28/10/2022 12:52, Sasha Finkelstein wrote: > Apple SoCs such as the M1 contain a PWM controller used > among other things to control the keyboard backlight. > > Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com> > --- > .../devicetree/bindings/pwm/pwm-apple.yaml | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/pwm-apple.yaml > > diff --git a/Documentation/devicetree/bindings/pwm/pwm-apple.yaml b/Documentation/devicetree/bindings/pwm/pwm-apple.yaml > new file mode 100644 > index 000000000000..39dc32e00a3f > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/pwm-apple.yaml Filename matching compatible, so apple,s5l-fpwm.yaml > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/pwm-apple.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Apple FPWM controller > + > +maintainers: > + - asahi@lists.linux.dev > + - Sasha Finkelstein <fnkl.kernel@gmail.com> > + > +description: |+ Drop |+ > + PWM controller used for keyboard backlight on ARM Macs > + > +properties: > + compatible: > + items: > + - enum: > + - apple,t8103-fpwm > + - apple,t6000-fpwm > + - apple,t8112-fpwm > + - const: apple,s5l-fpwm Is it then derived from Samsung platform? If yes, it is candidate for merging. > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + "#pwm-cells": > + const: 2 > + > +required: > + - compatible > + - reg > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + pwm: fpwm@235044000 { Generic node name, so just "pwm". Drop also label - it's not used in the example. Best regards, Krzysztof
On Fri, 28 Oct 2022 at 20:53, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 28/10/2022 12:52, Sasha Finkelstein wrote: > > + PWM controller used for keyboard backlight on ARM Macs > > + > > +properties: > > + compatible: > > + items: > > + - enum: > > + - apple,t8103-fpwm > > + - apple,t6000-fpwm > > + - apple,t8112-fpwm > > + - const: apple,s5l-fpwm > > Is it then derived from Samsung platform? If yes, it is candidate for > merging. Apple calls it the 'AppleS5L8920XFPWM' which suggests some samsung lineage, but the register interface is different from the one in pwm-samsung driver.
On Fri, 28 Oct 2022 19:52:13 +0300, Sasha Finkelstein wrote: > Apple SoCs such as the M1 contain a PWM controller used > among other things to control the keyboard backlight. > > Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com> > --- > .../devicetree/bindings/pwm/pwm-apple.yaml | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/pwm-apple.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pwm/pwm-apple.example.dtb: fpwm@235044000: compatible:0: 'apple,s5l-fpwm' is not one of ['apple,t8103-fpwm', 'apple,t6000-fpwm', 'apple,t8112-fpwm'] From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pwm/pwm-apple.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pwm/pwm-apple.example.dtb: fpwm@235044000: compatible: ['apple,s5l-fpwm'] is too short From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pwm/pwm-apple.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pwm/pwm-apple.example.dtb: fpwm@235044000: reg: [[2, 889470976], [0, 16384]] is too long From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pwm/pwm-apple.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/ This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On 28/10/2022 12:52, Sasha Finkelstein wrote: > Apple SoCs such as the M1 contain a PWM controller used > among other things to control the keyboard backlight. > > Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com> > --- > .../devicetree/bindings/pwm/pwm-apple.yaml | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/pwm-apple.yaml > > diff --git a/Documentation/devicetree/bindings/pwm/pwm-apple.yaml b/Documentation/devicetree/bindings/pwm/pwm-apple.yaml > new file mode 100644 > index 000000000000..39dc32e00a3f > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/pwm-apple.yaml > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/pwm-apple.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Apple FPWM controller > + > +maintainers: > + - asahi@lists.linux.dev > + - Sasha Finkelstein <fnkl.kernel@gmail.com> > + > +description: |+ > + PWM controller used for keyboard backlight on ARM Macs > + > +properties: > + compatible: > + items: > + - enum: > + - apple,t8103-fpwm > + - apple,t6000-fpwm > + - apple,t8112-fpwm > + - const: apple,s5l-fpwm Missing blank line. > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + "#pwm-cells": > + const: 2 > + > +required: > + - compatible > + - reg > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + pwm: fpwm@235044000 { > + compatible = "apple,s5l-fpwm"; As Rob's bot pointed out, this does not match the bindings so you did not test them before sending :( Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/pwm/pwm-apple.yaml b/Documentation/devicetree/bindings/pwm/pwm-apple.yaml new file mode 100644 index 000000000000..39dc32e00a3f --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-apple.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/pwm-apple.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple FPWM controller + +maintainers: + - asahi@lists.linux.dev + - Sasha Finkelstein <fnkl.kernel@gmail.com> + +description: |+ + PWM controller used for keyboard backlight on ARM Macs + +properties: + compatible: + items: + - enum: + - apple,t8103-fpwm + - apple,t6000-fpwm + - apple,t8112-fpwm + - const: apple,s5l-fpwm + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + power-domains: + maxItems: 1 + + "#pwm-cells": + const: 2 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + pwm: fpwm@235044000 { + compatible = "apple,s5l-fpwm"; + reg = <0x2 0x35044000 0x0 0x4000>; + power-domains = <&ps_fpwm1>; + clocks = <&clkref>; + #pwm-cells = <2>; + };