Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343142
b: refs/heads/master
c: 216f2b9
h: refs/heads/master
v: v3
  • Loading branch information
Lee Jones authored and Mark Brown committed Nov 14, 2012
1 parent 642e90e commit 0c201ac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8a9f757cb425c4784b80b001c7a77c7810b499f
refs/heads/master: 216f2b9c95ac6e4f00b08df807bc4454434a9afb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ GPIO controlled regulators

Required properties:
- compatible : Must be "regulator-gpio".
- states : Selection of available voltages and GPIO configs.
if there are no states, then use a fixed regulator

Optional properties:
- enable-gpio : GPIO to use to enable/disable the regulator.
- gpios : GPIO group used to control voltage.
- states : Selection of available voltages and GPIO configs.
- startup-delay-us : Startup time in microseconds.
- enable-active-high : Polarity of GPIO is active high (default is low).

Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/regulator/gpio-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)

/* Fetch states. */
prop = of_find_property(np, "states", NULL);
if (!prop) {
dev_err(dev, "No 'states' property found\n");
return ERR_PTR(-EINVAL);
}

proplen = prop->length / sizeof(int);

config->states = devm_kzalloc(dev,
Expand Down

0 comments on commit 0c201ac

Please sign in to comment.