[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <544A6C9A.9050404@mentor.com>
Date: Fri, 24 Oct 2014 18:13:30 +0300
From: Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
To: Mikko Perttunen <mikko.perttunen@...si.fi>
CC: <swarren@...dotorg.org>, <thierry.reding@...il.com>,
<gnurou@...il.com>, <pdeschrijver@...dia.com>, <rjw@...ysocki.net>,
<viresh.kumar@...aro.org>, <mturquette@...aro.org>,
<pwalmsley@...dia.com>, <vinceh@...dia.com>, <pgaikwad@...dia.com>,
<linux-kernel@...r.kernel.org>, <linux-pm@...r.kernel.org>,
<linux-tegra@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <tuomas.tynkkynen@....fi>,
Tuomas Tynkkynen <ttynkkynen@...dia.com>
Subject: Re: [PATCH v5 03/16] clk: tegra: Add closed loop support for the
DFLL
On 24.10.2014 17:39, Mikko Perttunen wrote:
> From: Tuomas Tynkkynen <ttynkkynen@...dia.com>
>
> With closed loop support, the clock rate of the DFLL can be adjusted.
>
> The oscillator itself in the DFLL is a free-running oscillator whose
> rate is directly determined the supply voltage. However, the DFLL
> module contains logic to compare the DFLL output rate to a fixed
> reference clock (51 MHz) and make a decision to either lower or raise
> the DFLL supply voltage. The DFLL module can then autonomously change
> the supply voltage by communicating with an off-chip PMIC via either I2C
> or PWM signals. This driver currently supports only I2C.
>
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@...dia.com>
> Signed-off-by: Mikko Perttunen <mikko.perttunen@...si.fi>
> ---
> drivers/clk/tegra/clk-dfll.c | 657 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 654 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 358c5d4..e71f4fb 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
[snip]
> +/**
> * dfll_fetch_common_params - read DFLL parameters from the device tree
> * @td: DFLL instance
> *
> @@ -923,6 +1563,13 @@ static int dfll_fetch_common_params(struct tegra_dfll *td)
> bool ok = true;
>
> ok &= read_dt_param(td, "nvidia,droop-ctrl", &td->droop_ctrl);
> + ok &= read_dt_param(td, "nvidia,sample-rate", &td->sample_rate);
> + ok &= read_dt_param(td, "nvidia,force-mode", &td->force_mode);
> + ok &= read_dt_param(td, "nvidia,cf", &td->cf);
> + ok &= read_dt_param(td, "nvidia,ci", &td->ci);
> + ok &= read_dt_param(td, "nvidia,cg", &td->cg);
> + td->cg_scale = of_property_read_bool(td->dev->of_node,
> + "nvidia,cg-scale");
Oh, I see here you exploit read_dt_param() intensively.
> if (of_property_read_string(td->dev->of_node, "clock-output-names",
> &td->output_clock_name)) {
> @@ -978,6 +1625,10 @@ int tegra_dfll_register(struct platform_device *pdev,
> return ret;
> }
>
> + ret = dfll_fetch_i2c_params(td);
> + if (ret)
> + return ret;
> +
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!mem) {
> dev_err(td->dev, "no control register resource\n");
>
--
With best wishes,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists