]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
devfreq: Add busy field
authorArto Merilainen <amerilainen@nvidia.com>
Mon, 10 Feb 2014 08:57:28 +0000 (10:57 +0200)
committerHiroshi Doyu <hdoyu@nvidia.com>
Fri, 21 Feb 2014 07:29:01 +0000 (23:29 -0800)
We have found it useful to know whether the device is busy at the moment
when we query the status of the device. This patch adds busy field to
devfreq status structure.

Bug 1454499

Change-Id: I94093b994495adb0e4cbe20d80e8422b85b71f5b
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/365421
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>
include/linux/devfreq.h

index 882e55440e526348e306b6c9897ab6e29f1f69ea..83cd456573fcd30ee543f505e15084e7eb1d93dc 100644 (file)
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2011 Samsung Electronics
  *     MyungJoo Ham <myungjoo.ham@samsung.com>
+ * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -35,6 +36,8 @@ struct devfreq;
  *                     own protocol with private_data. However, because
  *                     this is governor-specific, a governor using this
  *                     will be only compatible with devices aware of it.
+ * @busy:              The current status of the device; True if the
+ *                     device is busy, false if it is not.
  */
 struct devfreq_dev_status {
        /* both since the last measure */
@@ -42,6 +45,7 @@ struct devfreq_dev_status {
        unsigned long busy_time;
        unsigned long current_frequency;
        void *private_data;
+       bool busy;
 };
 
 /*