From db58e9bdc318201eca4eb5a457a6d4ea8d1857b5 Mon Sep 17 00:00:00 2001 From: Osvaldo Banuelos Date: Tue, 16 Dec 2014 17:16:25 -0800 Subject: 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 --- include/linux/regulator/driver.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') 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 */ -- cgit v1.2.3