Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754720Ab3F1GvY (ORCPT ); Fri, 28 Jun 2013 02:51:24 -0400 Received: from mail-oa0-f53.google.com ([209.85.219.53]:58548 "EHLO mail-oa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754534Ab3F1GvW (ORCPT ); Fri, 28 Jun 2013 02:51:22 -0400 MIME-Version: 1.0 In-Reply-To: <20130628084939.1921a717@amdc308.digital.local> References: <1370502472-7249-1-git-send-email-l.majewski@samsung.com> <1371661969-7660-1-git-send-email-l.majewski@samsung.com> <1371661969-7660-3-git-send-email-l.majewski@samsung.com> <20130627175546.677d9f9b@amdc308.digital.local> <20130628084939.1921a717@amdc308.digital.local> Date: Fri, 28 Jun 2013 12:21:21 +0530 Message-ID: Subject: Re: [PATCH v4 2/7] cpufreq: Add boost frequency support in core From: Viresh Kumar To: Lukasz Majewski Cc: "Rafael J. Wysocky" , "cpufreq@vger.kernel.org" , Linux PM list , Vincent Guittot , Jonghwa Lee , Myungjoo Ham , linux-kernel , Lukasz Majewski , Andre Przywara , Daniel Lezcano , Kukjin Kim , Zhang Rui , Eduardo Valentin Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 33 On 28 June 2013 12:19, Lukasz Majewski wrote: > No, I will use: > > if (boost_enabled != state) { > write_lock_irqsave(&cpufreq_driver_lock, flags); > boost_enabled = state; > > ret = cpufreq_driver->enable_boost(state); > ^^^^^^^^^^^^^^^^^^^^ only one callback call > if (ret) > boost_enabled = 0; > > write_unlock_irqrestore(&cpufreq_driver_lock, flags); > > if (ret) > pr_err("%s: BOOST cannot enable (%d)\n", > __func__, ret); > } > > and @ cpufreq_register_driver() I will add following line: > > if (!cpufreq_driver->enable_boost) > cpufreq_driver->enable_boost = &cpufreq_boost_enable_sw; > > When cpufreq driver doesn't define callback for enable_boost it will be > filled with default SW cpufreq_boost_enable_sw callback. That's some smart code. Good. :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/