Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149582
b: refs/heads/master
c: 9035cef
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Jun 15, 2009
1 parent a653234 commit 33d47f0
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 5a1b22beeff30d870bf2169a37e343e06cb5db3a
refs/heads/master: 9035cefc2d4b67591cbc2e4e8fbc8d73901ca9eb
15 changes: 14 additions & 1 deletion trunk/drivers/regulator/fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,22 @@ static int fixed_voltage_get_voltage(struct regulator_dev *dev)
return data->microvolts;
}

static int fixed_voltage_list_voltage(struct regulator_dev *dev,
unsigned selector)
{
struct fixed_voltage_data *data = rdev_get_drvdata(dev);

if (selector != 0)
return -EINVAL;

return data->microvolts;
}

static struct regulator_ops fixed_voltage_ops = {
.is_enabled = fixed_voltage_is_enabled,
.enable = fixed_voltage_enable,
.get_voltage = fixed_voltage_get_voltage,
.list_voltage = fixed_voltage_list_voltage,
};

static int regulator_fixed_voltage_probe(struct platform_device *pdev)
Expand All @@ -69,7 +81,8 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
}
drvdata->desc.type = REGULATOR_VOLTAGE;
drvdata->desc.owner = THIS_MODULE;
drvdata->desc.ops = &fixed_voltage_ops,
drvdata->desc.ops = &fixed_voltage_ops;
drvdata->desc.n_voltages = 1;

drvdata->microvolts = config->microvolts;

Expand Down

0 comments on commit 33d47f0

Please sign in to comment.