Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6919932rwp; Tue, 18 Jul 2023 07:37:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFkwNj8GaAVWlITLhfOQbr2RPU3YiG/FqwxyRcNGXfxjp+krJLupaxTVCPsA+gQ4G6IGaOy X-Received: by 2002:aa7:cf19:0:b0:521:a760:d411 with SMTP id a25-20020aa7cf19000000b00521a760d411mr166edy.2.1689691071018; Tue, 18 Jul 2023 07:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689691071; cv=none; d=google.com; s=arc-20160816; b=QMfi4OZ8bL6GouLIdpN8eXnSMyzijS+ae/M3peC7DCYhj9POIo6yzzHcNtpjxoswBr cL32jpa/UyljPs18yB0OPG0O+JIr9tsc6I3Wie8bviPuyn7euMhERbmgTyf+qtDsDnv3 AFtB6EpwxXidWn8q35Gq8Ip1mQdagK5lri9G8uEVrG8rlw97sry6Hp6g4sgR0Q1nUWiy 5MF44zAuilNNyQoxtEWKF+e+7OMJqAe3kClLa/h+P8bCRUZqV7dh1FcIpIGN7+HecXLx PRtAL8S7ckwTCu22IDBnHcAsgt9HBZwcndR9Qe5XKLGGlgz0nTZt38QQ3gyA6pPtMTAZ je9Q== 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=E9/Gvr4bszgQIrisL+2m7SjjV7N6E/HnjwUQkP9/vdo=; fh=KOw9ZK/vseD9zZfoepVqMaN/yIb+i1+dxpYcOgg5OiY=; b=c5Vjga62/+pHvk13Mht+3zoc9hab1eX5I9pN3ks6nuGJrmHTH3nklo5BZtCIny57Ea zooTnLe/4aT6BbEOckQxAg3xBISCCAyr77bBwSB/b7zgz6t/fYAA3WoEkaiWngGIGNLj ttkMCJYtJd4LthCS4Oa+THgICwX678eij2cXpQ2YCY973PS/A6kGpdtbDWZlmxDB2u4P 1JTt4ya42aavjJXEARTqcu8xWPdGPUEiKy92Om/NkooRugBh1cmBWvr6IS0CUlSVrrs9 +UTTRpN7Yml9Eak5pclBHTG89DGu6A8eV3+qENg9IVABZ7R/9O9Iou8+GkkKKiWn7Cmz J3Cw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a50ff15000000b0051a7bccf383si1292939edu.86.2023.07.18.07.37.26; Tue, 18 Jul 2023 07:37:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbjGRO3V convert rfc822-to-8bit (ORCPT + 99 others); Tue, 18 Jul 2023 10:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbjGRO3U (ORCPT ); Tue, 18 Jul 2023 10:29:20 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27ADD9E for ; Tue, 18 Jul 2023 07:29:20 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qLlhR-0006sb-1r; Tue, 18 Jul 2023 16:29:13 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qLlhP-000OT0-1G; Tue, 18 Jul 2023 16:29:11 +0200 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1qLlhO-000Eqt-2k; Tue, 18 Jul 2023 16:29:10 +0200 Message-ID: <6032fcba75d34b0273508166c8b79331cd5c34ef.camel@pengutronix.de> Subject: Re: [PATCH] pwm: stm32: Implement .get_state() From: Philipp Zabel To: Fabrice Gasnier , Thierry Reding , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Maxime Coquelin , Alexandre Torgue Cc: linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Tue, 18 Jul 2023 16:29:10 +0200 In-Reply-To: References: <20230608-pwm-stm32-get-state-v1-1-db7e58a7461b@pengutronix.de> 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fabrice, On Fr, 2023-06-09 at 15:06 +0200, Fabrice Gasnier wrote: [...] > > @@ -635,7 +675,10 @@ static int stm32_pwm_probe(struct platform_device *pdev) > > > > priv->chip.dev = dev; > > priv->chip.ops = &stm32pwm_ops; > > - priv->chip.npwm = stm32_pwm_detect_channels(priv); > > + priv->chip.npwm = stm32_pwm_detect_channels(priv, &n_enabled); > > + > > I'd suggest to comment a bit here, to explain it initializes the PWM > counter clock refcount in sync with PWM initial state left by the > bootloader. > > In all case, this is fine for me, you can add my: > Reviewed-by: Fabrice Gasnier Thank you, I'll add a comment here. regards Philipp