]> Gentwo Git Trees - linux/.git/commit
clk: clk-gpio: add driver for gated-fixed-clocks
authorHeiko Stuebner <heiko@sntech.de>
Fri, 6 Sep 2024 08:25:10 +0000 (10:25 +0200)
committerStephen Boyd <sboyd@kernel.org>
Wed, 16 Oct 2024 18:20:42 +0000 (11:20 -0700)
commit4940071d962827467f7297be3b874c96186ca0b7
tree1c482ba8b0b437e06355e3bc5ee8daffdbd4baae
parent36abe81d9c3fa200a57ef2363e93a2991e387e19
clk: clk-gpio: add driver for gated-fixed-clocks

In contrast to fixed clocks that are described as ungateable, boards
sometimes use additional oscillators for things like PCIe reference
clocks, that need actual supplies to get enabled and enable-gpios to be
toggled for them to work.

This adds a driver for those generic gated-fixed-clocks
that can show up in schematics looking like

         ----------------
Enable - | 100MHz,3.3V, | - VDD
         |    3225      |
   GND - |              | - OUT
         ----------------

The new driver gets grouped together with the existing gpio-gate and
gpio-mux, as it for one re-uses a lot of the gpio-gate functions
and also in its core it's just another gpio-controlled clock, just
with a fixed rate and a regulator-supply added in.

The regulator-API provides function stubs for the !CONFIG_REGULATOR case,
so no special handling is necessary.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20240906082511.2963890-5-heiko@sntech.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-gpio.c