From: Tomasz Figa Date: Thu, 12 Dec 2013 16:07:15 +0000 (+0100) Subject: clk: max77686: Provide .recalc_rate() operation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf7d4a6f845ea9e57fb6dacccf823b7c7eff4e8a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git clk: max77686: Provide .recalc_rate() operation It is usually nice to know frequency of a clock, so this patch adds a .recalc_rate() callback returning rates of provided clocks. Signed-off-by: Tomasz Figa Acked-by: Kyungmin Park Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c index 9e66115a326b..d050d0b156d3 100644 --- a/drivers/clk/clk-max77686.c +++ b/drivers/clk/clk-max77686.c @@ -81,10 +81,17 @@ static int max77686_clk_is_prepared(struct clk_hw *hw) return val & max77686->mask; } +static unsigned long max77686_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + return 32768; +} + static struct clk_ops max77686_clk_ops = { .prepare = max77686_clk_prepare, .unprepare = max77686_clk_unprepare, .is_prepared = max77686_clk_is_prepared, + .recalc_rate = max77686_recalc_rate, }; static struct clk_init_data max77686_clks_init[MAX77686_CLKS_NUM] = {