summaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91/clk-programmable.c
diff options
context:
space:
mode:
authorRomain Izard2017-12-11 17:55:35 +0100
committerStephen Boyd2017-12-22 01:34:06 +0100
commit13967bea0bdb194b8674b4102fcdd383a8a18baa (patch)
tree6ef38889a8380a1cd0011ceae2416775f47ebcc6 /drivers/clk/at91/clk-programmable.c
parentclk: at91: pmc: Save SCSR during suspend (diff)
downloadkernel-qcow2-linux-13967bea0bdb194b8674b4102fcdd383a8a18baa.tar.gz
kernel-qcow2-linux-13967bea0bdb194b8674b4102fcdd383a8a18baa.tar.xz
kernel-qcow2-linux-13967bea0bdb194b8674b4102fcdd383a8a18baa.zip
clk: at91: pmc: Support backup for programmable clocks
When an AT91 programmable clock is declared in the device tree, register it into the Power Management Controller driver. On entering suspend mode, the driver saves and restores the Programmable Clock registers to support the backup mode for these clocks. Signed-off-by: Romain Izard <romain.izard.pro@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91/clk-programmable.c')
-rw-r--r--drivers/clk/at91/clk-programmable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c
index 85a449cf61e3..0e6aab1252fc 100644
--- a/drivers/clk/at91/clk-programmable.c
+++ b/drivers/clk/at91/clk-programmable.c
@@ -204,6 +204,8 @@ at91_clk_register_programmable(struct regmap *regmap,
if (ret) {
kfree(prog);
hw = ERR_PTR(ret);
+ } else {
+ pmc_register_pck(id);
}
return hw;