From dba9af81b8765aa65fed6488b29eb4bbfe90267d Mon Sep 17 00:00:00 2001 From: Taniya Das Date: Mon, 14 Nov 2016 11:54:02 +0530 Subject: clk: Add support for list_rates ops for clocks Add support for clocks debugfs to be able to display - rates_max which indicates the frequency to voltage mapping of a clock. - list_rates, the list of clock frequencies supported by root clocks. - Also display the rate_max associated with enabled clocks list. Change-Id: I0a202af6f46c7cf164036d65487db5c40aab4063 Signed-off-by: Taniya Das --- include/linux/clk-provider.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux') diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 2a4047c049a8..fd2eb059b991 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -181,6 +181,10 @@ struct clk_rate_request { * This callback is optional and required clocks could * add this callback. * + * @list_rate: Return the nth supported frequency for a given clock which is + * below rate_max on success and -ENXIO in case of no frequency + * table. + * * The clk_enable/clk_disable and clk_prepare/clk_unprepare pairs allow * implementations to split any work between atomic (enable) and sleepable * (prepare) contexts. If enabling a clock requires code that might sleep, @@ -223,6 +227,8 @@ struct clk_ops { int (*set_flags)(struct clk_hw *hw, unsigned flags); void (*list_registers)(struct seq_file *f, struct clk_hw *hw); + long (*list_rate)(struct clk_hw *hw, unsigned n, + unsigned long rate_max); }; /** -- cgit v1.2.3