Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1123277rdg; Fri, 13 Oct 2023 10:52:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnYUeEXEL8NI6UpyRvWGkF+b2VOdb4fQ12i9safcO9PAbox3fSDYmJ9YCly+JP0vP5MyeS X-Received: by 2002:a17:902:b18e:b0:1c7:495c:87df with SMTP id s14-20020a170902b18e00b001c7495c87dfmr22504289plr.53.1697219543123; Fri, 13 Oct 2023 10:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697219543; cv=none; d=google.com; s=arc-20160816; b=TKhU/VFSst+Spnue1pVaP7nvFiRrkzCoypaxHfPcaK+bCTUArZZ/z5gro6To4nHGar 2Wl36oBv5PIf+dYw7OEWO7QxvdAId3yRVR/F6MDtMbNwAH4rLMfVzAKj3sSvAfuM3CYy tW3zSUEP9q9oUZVi6zDmrrEynX4PgDwR+B0Rok2vFaomT6WE+PTYR5SCPlW31YhD00Go xpd8HNJYeYY2XaqaQpb2wF+q1GJ+GqDkDzTzh63OXsZdpA2YGaeGoPaYtTYEHa8S19Pk SPC0xEzJg8Mbdu5k0qT5+YkBlB4Qqk8rJog/q/vPLQNJGxrYSweNY8r3UQnIMX04gYz/ z7BQ== 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; bh=kmTWoNiIBtHi1m1CPVPncm1IrPytGRs3w67ThNOulO8=; fh=rZA7GHlrarZfn7jUcOYeNPaaxJB2jfZpjzGfVyGPxCk=; b=DdeAAIkccaoJfRTuV9UEeZElTlPD6MdF3t5JJpXZQ4P2LxgsvEystLRXhSWL21D9bI akkjGuIExs2+oPhAXLuzQVC+1AsKogT1PzwhOsW80gI0p/VEturCLx8qzCnie6yUbn7n QedOJMLxzO/16AWubD8hWJhhjp0BcZ3yMyOqiI88o+Qn5GNWGwSoKpz+1ZOHbsJwq2F2 01VbqUrAY4wAwFReyo2pAhtMedCgwhrBD+srrvAXxdbxv6948h7cTLrsf5cLGkviXAXu J22x7ptUSOdaojnwK5MvJXtFgiiOER7PSn9W52F0dwoxioR0GRrjR7hjynO0KmW5OHMm uKlg== 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:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d8-20020a170902654800b001bc2fd76db1si4904097pln.65.2023.10.13.10.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 10:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id D1C5083DD71D; Fri, 13 Oct 2023 10:52:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230458AbjJMRv4 (ORCPT + 99 others); Fri, 13 Oct 2023 13:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjJMRvz (ORCPT ); Fri, 13 Oct 2023 13:51:55 -0400 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 DA30883 for ; Fri, 13 Oct 2023 10:51:53 -0700 (PDT) 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 1qrMK5-0006CR-OY; Fri, 13 Oct 2023 19:51:41 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) 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 1qrMK5-001RiD-AW; Fri, 13 Oct 2023 19:51:41 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qrMK5-00Fiwn-16; Fri, 13 Oct 2023 19:51:41 +0200 Date: Fri, 13 Oct 2023 19:51:40 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Alexander Stein Cc: Sean Young , linux-media@vger.kernel.org, Ivaylo Dimitrov , Thierry Reding , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Stefan Wahren , linux-pwm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] pwm: bcm2835: allow pwm driver to be used in atomic context Message-ID: <20231013175140.dzlz4grrgngoyxbc@pengutronix.de> References: <6ce73b2688f059e7169935699044104cf37b2425.1697193646.git.sean@mess.org> <84429d39-aa54-462d-85cd-c5d06a614a0e@gmx.net> <5203415.ElGaqSPkdT@steina-w> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ssu5t4hquxq747is" Content-Disposition: inline In-Reply-To: <5203415.ElGaqSPkdT@steina-w> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Fri, 13 Oct 2023 10:52:20 -0700 (PDT) --ssu5t4hquxq747is Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Fri, Oct 13, 2023 at 01:13:50PM +0200, Alexander Stein wrote: > Am Freitag, 13. Oktober 2023, 13:04:48 CEST schrieb Stefan Wahren: > > Am 13.10.23 um 12:46 schrieb Sean Young: > > > clk_get_rate() may do a mutex lock. Since the clock rate cannot chang= e on > > > an rpi, simply fetch it once. > >=20 > > does it mean you checked all possible SoCs (BCM2835, BCM2836, BCM2837, > > BCM2711, BCM2712) for this change? > >=20 > > Is it impossible that the real clock can never be influenced by turbo > > mode like SPI? >=20 > Assuming the clock can change, which I would, then a clock notifier seems= =20 > appropriate. See [1] for an example. I'm not a fan. If the clock changes, the output also changes. With a clock notifier you can soften the issue and reconfigure to something similar as the original wave form, but a glitch happens for sure. I already toyed with the thought to add clk_rate_exclusive_get() to all PWM drivers, but didn't come around it yet. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --ssu5t4hquxq747is Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmUpg6wACgkQj4D7WH0S /k6zXAf8CLxtrbWX3bu/WNzhyWl92SzyhIaU0UrVF1cyUmSvSccu/9afnKYtgPfZ 2lsWg4a1AVndcN2OoIZ8Fqf6eKdMNqSnxc1cyOH3rL7o+6wYPACNRQ907zK44Ah9 FYPytiBMKZq+xXTBU1Qbm6Vrn2dQxXBv0/mOIz6pLI2mcdN66Ad1a2Bf2avkddd5 NoU5DJhuRI8ywHb34lexulqMdCQqjNZhcj46TFks3bk3FVT76aBRXhwOesaJnmy8 hSg84cJn8TiQzgsOkP5Px580mOQQ0eYFGB8DZm7tlljXRhEgiuRwcrOXeFfaITI4 lI87RD2C73qZIV7fLaOKCHWr3GQraw== =x/eO -----END PGP SIGNATURE----- --ssu5t4hquxq747is--