Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2277006rdb; Fri, 8 Dec 2023 03:47:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEdR0BNcevk/SGkN+lUCF4dZPR5Im3vbzx8vNKdg8kf/PQPAJsC8ea1feZ4iPrnHVkWBnE X-Received: by 2002:a05:6871:594:b0:1fa:eee5:ce68 with SMTP id u20-20020a056871059400b001faeee5ce68mr3973580oan.17.1702036046016; Fri, 08 Dec 2023 03:47:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702036045; cv=none; d=google.com; s=arc-20160816; b=jf+E3I+g2TqRcnSMD2ro7j0WYotsEoNd9oYewnSV3wOA7wR2C/im7epVhfrLZHy7ZD eYCWagRZpwXtq5cnuYa1hZ3N3iQ55dEUFVa8AVimiHNVTuRCNRPNRoC2oVc3eDxb/6Qs YwBlR7O6PbZimv2xhTBYeAfgJ6T4LBYVSERt5o24X4nyzFKDW0HhuD4Gel0WghCI5f8B lUHeqt20TQ/UIX71m+H3CnNUrj0rWJs+k4YPno/uXojRwHFjwZkMkn6hyAODf8DuRnpE iGkmgp1mzUlDSoWx2NWP1MU5ZSw/J9jA6jC8HJv3sP1cvMwG/nrrPW1pC9wgfPpbNG+D JwIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=6NAJc2UAgackwOobB+QpnIVJmN/HSCBFMfcYot+K0Tk=; fh=UrntHX5iiyXNx0SE4UDN5VI5ZjTzmxAEAEHx43NUqco=; b=YOPS7G8iCySprnmNWZurJ5iUnTkw3TDdXHxt0JrOQemuuoXXHGWrmkwP/5rT7w6WMl z2Q5WwwTTS3MVfKNCDDP3u0ywUf7luzt9bszGFo73GDP/6QFidMWgZrzEjLx2+GcYb/6 43Ws2UkSk24vzsv2S2U1DTRZ8c6AT5cW5p1nZBq47x+1eSnktWoO6FDPK5CIcm2mbZfh w3+6Gy9nUrN+iQ428C/qYiuA5ui0LtzObOId6/QIf9DV3r7fk78ERRApIr6+Ou/QJZp3 yk49+Z5FRQlqd5hAG8uJRMPgOmzeZvd24r5KDsXv6RgKgfpEDnwbU6EWcM11dz6ocXPD 9pIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k1-20020a632401000000b005be1ee5be37si1432820pgk.133.2023.12.08.03.47.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 03:47:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5E70C8058A21; Fri, 8 Dec 2023 03:47:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232873AbjLHLrH convert rfc822-to-8bit (ORCPT + 99 others); Fri, 8 Dec 2023 06:47:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbjLHLrG (ORCPT ); Fri, 8 Dec 2023 06:47:06 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 918F0D59 for ; Fri, 8 Dec 2023 03:47:12 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rBZJz-0004XI-NA; Fri, 08 Dec 2023 12:47:07 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBZJw-00EPCy-74; Fri, 08 Dec 2023 12:47:04 +0100 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1rBZJw-0006NC-0S; Fri, 08 Dec 2023 12:47:04 +0100 Message-ID: <92ac0bc4c43fa70ff4bcba44ba4382c0c8ebfb75.camel@pengutronix.de> Subject: Re: [PATCH v9 2/4] pwm: opencores: Add PWM driver support From: Philipp Zabel To: William Qiu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org Cc: Emil Renner Berthing , Rob Herring , Thierry Reding , Krzysztof Kozlowski , Conor Dooley , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Hal Feng , Paul Walmsley , Palmer Dabbelt , Albert Ou Date: Fri, 08 Dec 2023 12:47:04 +0100 In-Reply-To: <20231208094209.1910934-3-william.qiu@starfivetech.com> References: <20231208094209.1910934-1-william.qiu@starfivetech.com> <20231208094209.1910934-3-william.qiu@starfivetech.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 08 Dec 2023 03:47:23 -0800 (PST) Hi William, On Fr, 2023-12-08 at 17:42 +0800, William Qiu wrote: > Add driver for OpenCores PWM Controller. And add compatibility code > which based on StarFive SoC. > > Co-developed-by: Hal Feng > Signed-off-by: Hal Feng > Signed-off-by: William Qiu > --- [...] > diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig > index 4b956d661755..d87e1bb350ba 100644 > --- a/drivers/pwm/Kconfig > +++ b/drivers/pwm/Kconfig > @@ -444,6 +444,18 @@ config PWM_NTXEC > controller found in certain e-book readers designed by the original > design manufacturer Netronix. > > +config PWM_OCORES > + tristate "OpenCores PWM support" > + depends on HAS_IOMEM && OF > + depends on COMMON_CLK && RESET_CONTROLLER There is no need for reset consumers to depend on RESET_CONTROLLER. [...] > diff --git a/drivers/pwm/pwm-ocores.c b/drivers/pwm/pwm-ocores.c > new file mode 100644 > index 000000000000..996ca3805901 > --- /dev/null > +++ b/drivers/pwm/pwm-ocores.c > @@ -0,0 +1,229 @@ [...] > +static int ocores_pwm_probe(struct platform_device *pdev) > +{ [...] > + ddata->rst = devm_reset_control_get_optional_exclusive(dev, NULL); Missing error handling. > + reset_control_deassert(ddata->rst); Missing error handling. regards Philipp