aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2013-02-01 20:40:17 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-04 18:38:06 +0000
commit896b65f3453d434983969e3ee7c254f4f8ba1424 (patch)
treedcbec2381f7c4394852f1abd831a177be07f4da4 /drivers/regulator
parenta451405fcdf4048aa46c80ede25b36eba27ba3ec (diff)
regulator: show state for GPIO-controlled regulators
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 278584302f2..6b3550ab480 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3208,7 +3208,7 @@ static int add_regulator_attributes(struct regulator_dev *rdev)
if (status < 0)
return status;
}
- if (ops->is_enabled) {
+ if (rdev->ena_gpio || ops->is_enabled) {
status = device_create_file(dev, &dev_attr_state);
if (status < 0)
return status;