mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
4e7cf74fa3
At least one user currently duplicates some functions that are provided by fractional divider module. Let's export approximation algorithm and replace the open-coded variant. As a bonus the exported function will get better documentation in place. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20210812170025.67074-1-andriy.shevchenko@linux.intel.com [sboyd@kernel.org: Add header guard because why not] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
14 lines
310 B
C
14 lines
310 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _CLK_FRACTIONAL_DIV_H
|
|
#define _CLK_FRACTIONAL_DIV_H
|
|
|
|
struct clk_hw;
|
|
|
|
void clk_fractional_divider_general_approximation(struct clk_hw *hw,
|
|
unsigned long rate,
|
|
unsigned long *parent_rate,
|
|
unsigned long *m,
|
|
unsigned long *n);
|
|
|
|
#endif
|