diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2018-05-22 19:34:55 +0300 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2018-07-09 14:48:25 +0300 |
commit | 3054a55c5dd2619a597d6e96d8589318f2b210ad (patch) | |
tree | fe9be3961ce0ce1e7000ed28a5962b0659dfdda2 /drivers/clk/meson/clkc-audio.h | |
parent | 2eb2a01b6477ac50ec686f4b0a74f2c3b6a55fe4 (diff) | |
download | linux-3054a55c5dd2619a597d6e96d8589318f2b210ad.tar.xz |
clk: meson: add axg audio sclk divider driver
Add a driver to control the clock divider found in the sample clock
generator of the axg audio clock controller.
The sclk divider accumulates specific features which make the generic
divider unsuitable to control it:
- zero based divider (div = val + 1), but zero value gates the clock,
so minimum divider value is 2.
- lrclk variant may adjust the duty cycle depending the divider value
and the 'hi' value.
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/clkc-audio.h')
-rw-r--r-- | drivers/clk/meson/clkc-audio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clk/meson/clkc-audio.h b/drivers/clk/meson/clkc-audio.h index 286ff1201258..0a7c157ebf81 100644 --- a/drivers/clk/meson/clkc-audio.h +++ b/drivers/clk/meson/clkc-audio.h @@ -15,6 +15,14 @@ struct meson_clk_triphase_data { struct parm ph2; }; +struct meson_sclk_div_data { + struct parm div; + struct parm hi; + unsigned int cached_div; + struct clk_duty cached_duty; +}; + extern const struct clk_ops meson_clk_triphase_ops; +extern const struct clk_ops meson_sclk_div_ops; #endif /* __MESON_CLKC_AUDIO_H */ |