[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpomfWKiRjznXeYsg32xAAWPTBQ4Gd0D_pftbA5=zMDiH4Q@mail.gmail.com>
Date: Tue, 16 Jul 2013 15:11:54 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Lukasz Majewski <l.majewski@...sung.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>, Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <eduardo.valentin@...com>,
"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
Jonghwa Lee <jonghwa3.lee@...sung.com>, l.majewski@...ess.pl,
linux-kernel <linux-kernel@...r.kernel.org>,
Andre Przywara <andre.przywara@...aro.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Kukjin Kim <kgene.kim@...sung.com>,
Myungjoo Ham <myungjoo.ham@...sung.com>
Subject: Re: [PATCH v5 2/7] cpufreq: Add boost frequency support in core
On 4 July 2013 14:20, Lukasz Majewski <l.majewski@...sung.com> wrote:
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> +int cpufreq_boost_trigger_state(int state)
> +{
> + unsigned long flags;
> + int ret = 0;
> +
> + if (boost_enabled != state) {
> + write_lock_irqsave(&cpufreq_driver_lock, flags);
> + boost_enabled = state;
> +
> + ret = cpufreq_driver->enable_boost(state);
> + if (ret)
> + boost_enabled = 0;
> +
> + write_unlock_irqrestore(&cpufreq_driver_lock, flags);
> +
> + if (ret)
> + pr_err("%s: BOOST cannot enable (%d)\n",
Who said we are enabling it?
> + __func__, ret);
> + }
> +
> + return ret;
> +}
> +
> +int cpufreq_boost_supported(void)
> +{
> + if (cpufreq_driver)
> + return cpufreq_driver->boost_supported;
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(cpufreq_boost_supported);
> +
> +int cpufreq_boost_enabled(void)
> +{
> + return boost_enabled;
> +}
> +EXPORT_SYMBOL_GPL(cpufreq_boost_enabled);
> +
> +void cpufreq_set_boost_enabled(int state)
Maybe cpufreq_block_boost? As suggested by Rafael.
> +{
> + boost_enabled = state;
> +}
> +EXPORT_SYMBOL_GPL(cpufreq_set_boost_enabled);
> +
> +/*********************************************************************
> * REGISTER / UNREGISTER CPUFREQ DRIVER *
> *********************************************************************/
>
> @@ -2001,6 +2094,22 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
> cpufreq_driver = driver_data;
> write_unlock_irqrestore(&cpufreq_driver_lock, flags);
>
> + if (cpufreq_driver->boost_supported) {
> + /*
> + * Check if boost driver provides function to enable boost -
> + * if not, use cpufreq_boost_enable_sw as default
> + */
> + if (!cpufreq_driver->enable_boost)
> + cpufreq_driver->enable_boost = &cpufreq_boost_enable_sw;
& is redundant.
--
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