return rockchip_pmu_ops.power_domain_is_on(pd->id);
}
+static int clk_pd_prepare(struct clk_hw *hw)
+{
+ __clk_pd_notify(hw->clk, RK_CLK_PD_PREPARE);
+
+ return 0;
+}
+
+static void clk_pd_unprepare(struct clk_hw *hw)
+{
+ __clk_pd_notify(hw->clk, RK_CLK_PD_UNPREPARE);
+}
+
const struct clk_ops clk_pd_ops = {
+ .prepare = clk_pd_prepare,
+ .unprepare = clk_pd_unprepare,
.enable = clk_pd_enable,
.disable = clk_pd_disable,
.is_enabled = clk_pd_is_enabled,
}
const struct clk_ops clk_pd_virt_ops = {
+ .prepare = clk_pd_prepare,
+ .unprepare = clk_pd_unprepare,
.enable = clk_pd_virt_enable,
.disable = clk_pd_virt_disable,
};
#define RK_CLK_PD_POST_ENABLE BIT(1)
#define RK_CLK_PD_PRE_DISABLE BIT(2)
#define RK_CLK_PD_POST_DISABLE BIT(3)
+#define RK_CLK_PD_PREPARE BIT(4)
+#define RK_CLK_PD_UNPREPARE BIT(5)
+
struct clk_pd_notifier {
struct clk *clk;