summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-21 23:49:31 +0000
committerNiket Sirsi <nsirsi@nvidia.com>2011-05-23 16:56:33 -0700
commitd3923800031bb867eceba101b382321e694fa062 (patch)
tree8d04403714c1c9153d8630c59e6b8cb4736dddf0 /include
parentcbb7d2b75535ed5f293bcac5b5ecd6cafa482f1a (diff)
regulator: Add initial per-regulator debugfs support
We only expose the use and open counts to userspace, providing a tiny bit of insight into what the API is up to. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> (cherry picked from commit 1130e5b3ff4a7f3f54a48d46e9d0d81b47765bd8) Reviewed-on: http://git.kernel.org/?p=linux/kernel/git/torvalds/ linux-2.6.git;a=commit;h=1130e5b3ff4a7f3f54a48d46e9d0d81b47765bd8 Change-Id: I4454e34ee8dca3ea2932fb3b8f3ff8ad668d3147 Reviewed-on: http://git-master/r/30957 Tested-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/regulator/driver.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 14d62c408c13..9c662c11b50a 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -168,9 +168,9 @@ struct regulator_desc {
*/
struct regulator_dev {
struct regulator_desc *desc;
- int use_count;
- int open_count;
int exclusive;
+ u32 use_count;
+ u32 open_count;
/* lists we belong to */
struct list_head list; /* list of all regulators */
@@ -188,6 +188,10 @@ struct regulator_dev {
struct regulator_dev *supply; /* for tree */
void *reg_data; /* regulator_dev data */
+
+#ifdef CONFIG_DEBUG_FS
+ struct dentry *debugfs;
+#endif
};
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,