usb: gadget: Tegra: Disable parameters for PM QoS
Antti P Miettinen [Tue, 21 Aug 2012 07:56:38 +0000 (10:56 +0300)]
For testing purposes it is useful to be able to disable
CPU frequency boost.

Bug 1359445

Change-Id: Iab4363b23372055819adaf66265762fb9d1a0a3a
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/273043
(cherry picked from commit b929aee920208da005e4aefe51dd4fe9b5b3978a)
Reviewed-on: http://git-master/r/273591
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

drivers/usb/gadget/tegra_udc.c

index 28c9ae6..7329393 100644 (file)
@@ -106,6 +106,8 @@ static struct pm_qos_request boost_cpu_freq_req;
 static u32 ep_queue_request_count;
 static u8 boost_cpufreq_work_flag, set_cpufreq_normal_flag;
 static struct timer_list boost_timer;
+static bool boost_enable = true;
+module_param(boost_enable, bool, 0644);
 #endif
 
 static char *const tegra_udc_extcon_cable[] = {
@@ -2357,8 +2359,11 @@ static void tegra_udc_boost_cpu_frequency_work(struct work_struct *work)
        /* If CPU frequency is not boosted earlier boost it, and modify
         * timer expiry time to 2sec */
        if (boost_cpufreq_work_flag) {
-               pm_qos_update_request(&boost_cpu_freq_req,
-                       (s32)CONFIG_TEGRA_GADGET_BOOST_CPU_FREQ * 1000);
+               if (boost_enable)
+                       pm_qos_update_request(
+                               &boost_cpu_freq_req,
+                               (s32)(CONFIG_TEGRA_GADGET_BOOST_CPU_FREQ
+                                     * 1000));
                boost_cpufreq_work_flag = 0;
                DBG("%s(%d) boost CPU frequency\n", __func__, __LINE__);
        }