diff options
| author | Osvaldo Banuelos <osvaldob@codeaurora.org> | 2014-12-16 17:16:25 -0800 |
|---|---|---|
| committer | Rohit Vaswani <rvaswani@codeaurora.org> | 2016-03-01 12:22:36 -0800 |
| commit | db58e9bdc318201eca4eb5a457a6d4ea8d1857b5 (patch) | |
| tree | dc3514a6a440930fd9c01002bfabbe3295068736 /include/linux | |
| parent | 9a5aec1c9268ffe4c857c5298bf43a0ddb9553d7 (diff) | |
regulator: core: fix regulator bypass logic
Since the regulator debugfs consumer does not call
regulator_allow_bypass() on its regulator handles, regulators
will not be placed on bypass mode even if all other consumers
request for this. Fix this by introducing an open offset count
that can be used to selectively disregard the debugfs consumer.
Also, introduce a debugfs file to allow or disallow bypass
mode on each regulator by leveraging on the new open offset count.
Change-Id: If12534dac5e6b1c82acac9b5250137b4f816b922
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/regulator/driver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 143598e3bd7e..2593c9a44787 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -371,6 +371,7 @@ struct regulator_dev { int exclusive; u32 use_count; u32 open_count; + u32 open_offset; u32 bypass_count; /* lists we belong to */ |
