Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: ti: add new API for checking if a provided clock is an OMAP clock

omap2_clk_is_hw_omap can now be used to verify if the provided clk_hw
is an omap HW clock or not. This is done to replace the usage of CLK_IS_BASIC
flag within the TI clock drivers.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Keerthy <j-keerthy@ti.com>

+20
+19
drivers/clk/ti/clk.c
··· 559 559 560 560 return ret; 561 561 } 562 + 563 + /** 564 + * omap2_clk_is_hw_omap - check if the provided clk_hw is OMAP clock 565 + * @hw: clk_hw to check if it is an omap clock or not 566 + * 567 + * Checks if the provided clk_hw is OMAP clock or not. Returns true if 568 + * it is, false otherwise. 569 + */ 570 + bool omap2_clk_is_hw_omap(struct clk_hw *hw) 571 + { 572 + struct clk_hw_omap *oclk; 573 + 574 + list_for_each_entry(oclk, &clk_hw_omap_clocks, node) { 575 + if (&oclk->hw == hw) 576 + return true; 577 + } 578 + 579 + return false; 580 + }
+1
drivers/clk/ti/clock.h
··· 302 302 int omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw, 303 303 struct clk_rate_request *req); 304 304 int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw)); 305 + bool omap2_clk_is_hw_omap(struct clk_hw *hw); 305 306 306 307 extern struct ti_clk_ll_ops *ti_clk_ll_ops; 307 308