Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298580
b: refs/heads/master
c: 2f2cc27
h: refs/heads/master
v: v3
  • Loading branch information
Ying-Chun Liu (PaulLiu) authored and Mark Brown committed Mar 28, 2012
1 parent 233e620 commit 5b6da02
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 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: 9300928692f835f76f5604b3b51c3085977edf68
refs/heads/master: 2f2cc27f50e3d232602d3b7c972071b4a30e5e38
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Anatop Voltage regulators

Required properties:
- compatible: Must be "fsl,anatop-regulator"
- anatop-reg-offset: Anatop MFD register offset
- anatop-vol-bit-shift: Bit shift for the register
- anatop-vol-bit-width: Number of bits used in the register
- anatop-min-bit-val: Minimum value of this register
- anatop-min-voltage: Minimum voltage of this regulator
- anatop-max-voltage: Maximum voltage of this regulator

Any property defined as part of the core regulator
binding, defined in regulator.txt, can also be used.

Example:

regulator-vddpu {
compatible = "fsl,anatop-regulator";
regulator-name = "vddpu";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1300000>;
regulator-always-on;
anatop-reg-offset = <0x140>;
anatop-vol-bit-shift = <9>;
anatop-vol-bit-width = <5>;
anatop-min-bit-val = <1>;
anatop-min-voltage = <725000>;
anatop-max-voltage = <1300000>;
};
5 changes: 3 additions & 2 deletions trunk/drivers/regulator/anatop-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
rdesc->type = REGULATOR_VOLTAGE;
rdesc->owner = THIS_MODULE;
sreg->mfd = anatopmfd;
ret = of_property_read_u32(np, "reg", &sreg->control_reg);
ret = of_property_read_u32(np, "anatop-reg-offset",
&sreg->control_reg);
if (ret) {
dev_err(dev, "no reg property set\n");
dev_err(dev, "no anatop-reg-offset property set\n");
goto anatop_probe_end;
}
ret = of_property_read_u32(np, "anatop-vol-bit-width",
Expand Down

0 comments on commit 5b6da02

Please sign in to comment.