notifying clock consumers of frequency change

Sam Winchenbach swinchenbach at arka.org
Thu May 30 08:57:40 EDT 2024


Hello,

I am writing a driver for a frequency synthesizer that does not currently have any support in the kernel. This synthesizer is clocked by a fixed external oscillator.

In my driver, I:

  1.  Register the clock hardware with devm_clk_hw_register
  2.  Describe the clocks to the DTS nodes with devm_of_clk_add_hw_provider

Various external stimuli and commands (through IIO) can change the frequency of this synthesizer.
How do I notify downstream devices that the frequency has changed? Ultimately it looks like __clk_notify() is what I want to call, but that is a non-exported function.  Tracking it through, the function stack that calls this looks like it is used to request a new frequency, not to notify consumers that the frequency has changed.

Does anyone have any tips, or perhaps know of an in-tree driver I could study to understand this better?

Thanks.
-Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20240530/286408b7/attachment.html>


More information about the Kernelnewbies mailing list