lkml.org 
[lkml]   [2023]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] pwm: bcm2835: allow pwm driver to be used in atomic context
Hello Ivaylo,

On Sat, Oct 14, 2023 at 09:51:12AM +0300, Ivaylo Dimitrov wrote:
> On 13.10.23 г. 20:51 ч., Uwe Kleine-König wrote:
> > 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 change on
> > > > > an rpi, simply fetch it once.
> > > >
> > > > does it mean you checked all possible SoCs (BCM2835, BCM2836, BCM2837,
> > > > BCM2711, BCM2712) for this change?
> > > >
> > > > Is it impossible that the real clock can never be influenced by turbo
> > > > mode like SPI?
> > >
> > > Assuming the clock can change, which I would, then a clock notifier seems
> > > 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.
> >
>
> 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

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-10-14 10:48    [W:0.051 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site