Commit fc59462c authored by Michael Hennerich's avatar Michael Hennerich Committed by Stephen Boyd
Browse files

clk: clk-gpio: propagate rate change to parent



For an external clock source, which is gated via a GPIO, the
rate change should typically be propagated to the parent clock.

The situation where we are requiring this propagation, is when an
external clock is connected to override an internal clock (which typically
has a fixed rate). The external clock can have a different rate than the
internal one, and may also be variable, thus requiring the rate
propagation.

This rate change wasn't propagated until now, and it's unclear about cases
where this shouldn't be propagated. Thus, it's unclear whether this is
fixing a bug, or extending the current driver behavior. Also, it's unsure
about whether this may break any existing setups; in the case that it does,
a device-tree property may be added to disable this flag.

Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lkml.kernel.org/r/20191108071718.17985-1-alexandru.ardelean@analog.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 54ecb8f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -280,7 +280,7 @@ static int gpio_clk_driver_probe(struct platform_device *pdev)
	else
	else
		clk = clk_register_gpio_gate(&pdev->dev, node->name,
		clk = clk_register_gpio_gate(&pdev->dev, node->name,
				parent_names ?  parent_names[0] : NULL, gpiod,
				parent_names ?  parent_names[0] : NULL, gpiod,
				0);
				CLK_SET_RATE_PARENT);
	if (IS_ERR(clk))
	if (IS_ERR(clk))
		return PTR_ERR(clk);
		return PTR_ERR(clk);