Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2180725rdf; Mon, 6 Nov 2023 07:02:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF623NdB9PyE+Xz7LunFOTRgmGB7YFEKbihmP1x29GWa2JmKBWK/FclFW7TgH9/BM1WaBfT X-Received: by 2002:a05:6830:2b22:b0:6d3:28c1:bd46 with SMTP id l34-20020a0568302b2200b006d328c1bd46mr14000600otv.10.1699282957451; Mon, 06 Nov 2023 07:02:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699282957; cv=none; d=google.com; s=arc-20160816; b=sKcdaSbpDQnWXEB+RIJQxiiLduKL1owCKLxi7nrpwf79qSehuPYYZ8lokSDjlGgtfB G7j5JLYCYLzCF61JCkKtFWOHrsJRV8AZfqceYnYUmASw98WMRkAj9RlgMFOJ6bOEtkWj PXX0lsO4diCq6O2n31/Z9Hyqe6c3MAjzOp3/KxbPzn3/31G4YJXie4OQSPRFaW0UgxSj ZamXE8frjANesx7V5YFKSrCzET78LsWItxQzgWly4OU3gPpyFnRAwBwCM6YJTI4cinhX RiUxDgY9eTf1rel57wFlNmG+yvNtgUV/noKVv77cxqoBsz0LbdinjGPLgBTPEeFEprJE wqEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G7inZoEtqprtInuQeuZiTBU5Mb0u+9Yrch1vQcCqbiI=; fh=aEFvuIABLL4a8G2qJCVb5eSegsbbcrMdEctq3gnuy4Q=; b=ppBmjBEB06kv9h/4QGjEVPFBbH9m1EMvriFvt7mDL3aYXSS+0bWOLkNWxNA0lM9SMv krWuLtDHuvkf78x3PlseR9SWm7TuqSc2ymXpD4LHZwudwMpR98EbOaxwdVD6yt1tRfwO SU90VrBGOqQUh65VzMmR2Es+d4zN9W4SZooOy7yVl7dj4pHQiaxo9DhWjf1mkXA1b+Tt 7hHFlky4M2FtiSQapEOTe1m+LNKLIrN5jis3PriVY+uL8sgKRDVJ7RFmeNS8ihn/qn+7 dcex4GSCtOcRK1KcF9XEoD4BvW4m/mSHQE+/+XR9QwXfQy1Ouz3HGauqYNV0M41vKYmc WjDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZUTy7kEF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id f12-20020a9d5e8c000000b006c6431a837dsi3180268otl.3.2023.11.06.07.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 07:02:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZUTy7kEF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DC87E80B87D1; Mon, 6 Nov 2023 07:02:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232097AbjKFPCQ (ORCPT + 99 others); Mon, 6 Nov 2023 10:02:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbjKFPCE (ORCPT ); Mon, 6 Nov 2023 10:02:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E1BD69; Mon, 6 Nov 2023 07:01:53 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EE65C433C7; Mon, 6 Nov 2023 15:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699282913; bh=R/cSiyOAFRrqVhth3W2n5h61tFeVSdShjJRDQj6czH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZUTy7kEFxYsF/koXOeL9ejldwPeR/VMnlbzSAsKZczqy5XRzb+OfUaZG3VAlG2kQS thRBrISP/mcyuHif2TfZM7A/Yw106zfROyEIZTGQN8Om4RW1Aa8CDTVpzB+bckC+Vp yXa7s5lX1p0u2J3AcCTx/nOeNqf0KSkE9Nrm3hkO6YDmcg4gWoQtmoTIZN+LzXMnp1 YaBoFQohLbxhKyIM+1VaLfnPLwcvsm/7pZRnBKzz0+XsEXQf7UVHPv1J+obnd8Mi8V gN7hFzEdjVHwBRekbFUi0iRrUdb5bpiYeNlfb7kpvQIQ4bCormrcd9/Er50Vh/x+zj W5RSB+DvZf4Cg== Date: Mon, 6 Nov 2023 22:49:33 +0800 From: Jisheng Zhang To: Thierry Reding , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Guo Ren , Fu Wei Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 0/2] pwm: add driver for T-THEAD TH1520 SoC Message-ID: References: <20231005130519.3864-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231005130519.3864-1-jszhang@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 06 Nov 2023 07:02:35 -0800 (PST) On Thu, Oct 05, 2023 at 09:05:17PM +0800, Jisheng Zhang wrote: > T-HEAD SoCs such as the TH1520 contain a PWM controller used to > control the LCD backlight, fan and so on. Add the PWM driver support > for it. > > Since the clk part isn't mainlined, so SoC dts(i) changes are not > included in this series. However, it can be tested by using fixed-clock. > > since v2: > - collect Reviewed-by tag > - add CTRL_ prefix for THEAD_PWM_CTRL register bit macros > - use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() and > check its return value. > - remove unnecessary casts > - call pm_runtime_put_sync() when pwm channel is disabled > - use devm_pm_runtime_enable() and then drop .remove() > - properly consider if pwm is programmed by bootloader or other > pre-linux env. > - simplify thead_pwm_runtime_resume() code as Uwe suggested > - bool ever_started -> u8 channel_ever_started since we have 6 channels > - use 3 for #pwm-cells > > since v1: > - update commit msg and yaml filename to address Conor's comment > - use devm_clk_get_enabled() and devm_pwmchip_add() > - implement .get_state() > - properly handle overflow > - introduce thead_pwm_from_chip() inline function > - document Limitations > - address pm_runtime_get/put pingpong comment > > > Jisheng Zhang (2): > dt-bindings: pwm: Add T-HEAD PWM controller > pwm: add T-HEAD PWM driver Hi Thierry, Uwe, Kind ping, is there any chance for this series to be merged for v6.7? Thanks > > .../bindings/pwm/thead,th1520-pwm.yaml | 44 +++ > drivers/pwm/Kconfig | 11 + > drivers/pwm/Makefile | 1 + > drivers/pwm/pwm-thead.c | 270 ++++++++++++++++++ > 4 files changed, 326 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml > create mode 100644 drivers/pwm/pwm-thead.c > > -- > 2.40.1 >