Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1431802rdg; Sat, 14 Oct 2023 01:47:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGibAQJ7IecKs92A0ycwcYRROdCwA77M3nu09jnOJSDH9PA5ZEKtl+DlLvBOHUtRNkBMC2+ X-Received: by 2002:a17:903:54d:b0:1c6:25c3:13d3 with SMTP id jo13-20020a170903054d00b001c625c313d3mr29367828plb.6.1697273247925; Sat, 14 Oct 2023 01:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697273247; cv=none; d=google.com; s=arc-20160816; b=tMaFeNm5ckWJR1m0kuNxyxv9RLvzTeF3lh1zABRZFoUm8zevHhtprnqybpZBxVVf6g iNYSkXofGIRyCmuWNBTfELYEV68GLUROZzpB9g6SRQyndBXsB3f/a5Xek2PpvnOkt0F+ +Fe3SDMltR42VMn9yM9jJfOnxQ9+Wp5ftE2ry94cgJ2EGCkIMNm3hnqa3P7mtHeLbbb3 BJQbWBBnLgRhCU5tpcSqBtAH6LDhjvVZ2X+KnLcHsfmqk+9t37Sy2sWkom2Fb70fRFbi J67Na85ekIq7ZPDOyqDLRz0yyDCtTqTtPX8qLx0wnkrNsS3S2WoZLnKqBxoyg6ZpwV0g PRBg== 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=ISMZyLj4aJWz3MhWG6orgXy3ctNmXfVnotiSB13gtN0=; fh=17W4iGZ4iDS20EuNbdifcHfPUdR8lq701VV2cie4q6A=; b=YdE4/gLf3uQw81cIlAYJlfHQb9k1Yc1d99UNRW+teyfzXg5T4srrVM0yfFlf5vqncw LfM8W29QKyJF/ZkDCdeaf3b8w5lUQ8hIP7SDL7G7biONOItMvee8Wqd6wybGV2110qVJ GTJF5hrv2tRx/EgJ/9AtlIqAWjfwJPpa6r0AutNqV7JCa26Z9GVbxAcQ7vS25AUSfw1V hlphgkhRC091fHpKpFO347pRPHoh80gjHrjfcyd8VYzDklVsUhHY9BFyhf6D87cHVkOr Drianvfh/OER1k68yhMbRt9gwzfi3HcpeitDHPj0/AfeFi7YTN1E7D0A/4LRHsK7t1kj nuTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l15-20020a170902f68f00b001c62161b18esi6747583plg.580.2023.10.14.01.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 01:47:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id C8162802DA93; Sat, 14 Oct 2023 01:47:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232981AbjJNIrW (ORCPT + 99 others); Sat, 14 Oct 2023 04:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231377AbjJNIrU (ORCPT ); Sat, 14 Oct 2023 04:47:20 -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 8A692BB for ; Sat, 14 Oct 2023 01:47:19 -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 1qraIZ-0000cq-7e; Sat, 14 Oct 2023 10:47:03 +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 1qraIX-001aEA-Vi; Sat, 14 Oct 2023 10:47:01 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qraIX-00G784-Ls; Sat, 14 Oct 2023 10:47:01 +0200 Date: Sat, 14 Oct 2023 10:47:01 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Ivaylo Dimitrov Cc: Alexander Stein , Sean Young , linux-media@vger.kernel.org, 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: <20231014084701.6fuuwcu4pknm7jju@pengutronix.de> References: <6ce73b2688f059e7169935699044104cf37b2425.1697193646.git.sean@mess.org> <84429d39-aa54-462d-85cd-c5d06a614a0e@gmx.net> <5203415.ElGaqSPkdT@steina-w> <20231013175140.dzlz4grrgngoyxbc@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="giqnk66nh3wiw3cc" Content-Disposition: inline In-Reply-To: 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sat, 14 Oct 2023 01:47:26 -0700 (PDT) --giqnk66nh3wiw3cc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Ivaylo, On Sat, Oct 14, 2023 at 09:51:12AM +0300, Ivaylo Dimitrov wrote: > On 13.10.23 =D0=B3. 20:51 =D1=87., Uwe Kleine-K=C3=B6nig wrote: > > Hello, > >=20 > > 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 c= hange on > > > > > an rpi, simply fetch it once. > > > >=20 > > > > does it mean you checked all possible SoCs (BCM2835, BCM2836, BCM28= 37, > > > > BCM2711, BCM2712) for this change? > > > >=20 > > > > Is it impossible that the real clock can never be influenced by tur= bo > > > > mode like SPI? > > >=20 > > > Assuming the clock can change, which I would, then a clock notifier s= eems > > > appropriate. See [1] for an example. > >=20 > > 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. > >=20 >=20 > Right, but without notifier, everything rate related after the change will > be wrong So we agree clk_rate_exclusive_get() is the way to go?! It's simple, no need for a notifier and no glitches. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=C3=B6nig = | Industrial Linux Solutions | https://www.pengutronix.de/ | --giqnk66nh3wiw3cc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmUqVYUACgkQj4D7WH0S /k4wigf9HHL4tqjTV1EyBXB1X+oKJKBONPLDUgJ+rE5Gw+/6EoqDq+HBK1UMKuaT PojCSO0QM0v7tHpApWQ51j9mZxkFWF9UJZCURBEP5mPSr4zVBrpa4oMh7E8Ga/2P SL7R9xAZxpl2TJbF5FnMQUlsRNP0LJf/KKjW0nknisJeqbziyeXcVVaLEBh+B84v OzpgTugHJhfb+T4T0842KaI4sVm2yLGlY4L75EssrwWWEBIYWLknh5VPb1G1my1f sP7n71Z6FbqLR1Jk5o3TTWdsJiD0whcTkbUgfFsVUO18Pat9LzYksSOK8zP6+TSn LPcN7mgljq64D0MtjOPK7lYfGkoZcA== =YY+P -----END PGP SIGNATURE----- --giqnk66nh3wiw3cc--