From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <555CC1A2.9070605@nvidia.com> Date: Wed, 20 May 2015 13:17:22 -0400 From: Rhyland Klein MIME-Version: 1.0 To: Benson Leung CC: Peter De Schrijver , Mike Turquette , Stephen Warren , Stephen Boyd , Thierry Reding , Alexandre Courbot , Bill Huang , Paul Walmsley , Jim Lin , , , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 20/21] clk: tegra210: add support for Tegra210 clocks References: <1431451444-23155-1-git-send-email-rklein@nvidia.com> <1431451444-23155-22-git-send-email-rklein@nvidia.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" Return-Path: rklein@nvidia.com List-ID: On 5/14/2015 4:23 PM, Benson Leung wrote: > On Tue, May 12, 2015 at 10:24 AM, Rhyland Klein wrote: >> +static int _p_div_to_hw(struct clk_hw *hw, u8 p_div) >> +{ >> + struct tegra_clk_pll *pll = to_clk_pll(hw); >> + struct pdiv_map *p_tohw = pll->params->pdiv_tohw; >> + >> + if (p_tohw) { >> + while (p_tohw->pdiv) { >> + if (p_div <= p_tohw->pdiv) >> + return p_tohw->hw_val; >> + p_tohw++; >> + } >> + return -EINVAL; >> + } >> + return -EINVAL; >> +} > > This is the same function as the one that lives in clk-pll.c. Can you > make these common? > Sure, I'll add that for v6. -rhyland -- nvpublic