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>
This commit is contained in:
Mark Brown
2010-12-21 23:49:31 +00:00
committed by Liam Girdwood
parent 21cf891a47
commit 1130e5b3ff
2 changed files with 41 additions and 2 deletions

View File

@@ -175,9 +175,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 */
@@ -195,6 +195,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,