Loading Documentation/devicetree/bindings/regulator/fixed-regulator.txt 0 → 100644 +29 −0 Original line number Diff line number Diff line Fixed Voltage regulators Required properties: - compatible: Must be "regulator-fixed"; Optional properties: - gpio: gpio to use for enable control - startup-delay-us: startup time in microseconds - enable-active-high: Polarity of GPIO is Active high If this property is missing, the default assumed is Active low. Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same. Example: abc: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "fixed-supply"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; gpio = <&gpio1 16 0>; startup-delay-us = <70000>; enable-active-high; regulator-boot-on }; Documentation/devicetree/bindings/regulator/regulator.txt 0 → 100644 +54 −0 Original line number Diff line number Diff line Voltage/Current Regulators Optional properties: - regulator-name: A string used as a descriptive name for regulator outputs - regulator-min-microvolt: smallest voltage consumers may set - regulator-max-microvolt: largest voltage consumers may set - regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops - regulator-min-microamp: smallest current consumers may set - regulator-max-microamp: largest current consumers may set - regulator-always-on: boolean, regulator should never be disabled - regulator-boot-on: bootloader/firmware enabled regulator - <name>-supply: phandle to the parent supply/regulator node Example: xyzreg: regulator@0 { regulator-min-microvolt = <1000000>; regulator-max-microvolt = <2500000>; regulator-always-on; vin-supply = <&vin>; }; Regulator Consumers: Consumer nodes can reference one or more of its supplies/ regulators using the below bindings. - <name>-supply: phandle to the regulator node These are the same bindings that a regulator in the above example used to reference its own supply, in which case its just seen as a special case of a regulator being a consumer itself. Example of a consumer device node (mmc) referencing two regulators (twl-reg1 and twl-reg2), twl-reg1: regulator@0 { ... ... ... }; twl-reg2: regulator@1 { ... ... ... }; mmc: mmc@0x0 { ... ... vmmc-supply = <&twl-reg1>; vmmcaux-supply = <&twl-reg2>; }; drivers/regulator/88pm8607.c +1 −1 Original line number Diff line number Diff line Loading @@ -427,7 +427,7 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev) /* replace driver_data with info */ info->regulator = regulator_register(&info->desc, &pdev->dev, pdata, info); pdata, info, NULL); if (IS_ERR(info->regulator)) { dev_err(&pdev->dev, "failed to register regulator %s\n", info->desc.name); Loading drivers/regulator/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ obj-$(CONFIG_REGULATOR) += core.o dummy.o obj-$(CONFIG_OF) += of_regulator.o obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o Loading drivers/regulator/aat2870-regulator.c +1 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev) ri->pdev = pdev; rdev = regulator_register(&ri->desc, &pdev->dev, pdev->dev.platform_data, ri); pdev->dev.platform_data, ri, NULL); if (IS_ERR(rdev)) { dev_err(&pdev->dev, "Failed to register regulator %s\n", ri->desc.name); Loading Loading
Documentation/devicetree/bindings/regulator/fixed-regulator.txt 0 → 100644 +29 −0 Original line number Diff line number Diff line Fixed Voltage regulators Required properties: - compatible: Must be "regulator-fixed"; Optional properties: - gpio: gpio to use for enable control - startup-delay-us: startup time in microseconds - enable-active-high: Polarity of GPIO is Active high If this property is missing, the default assumed is Active low. Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same. Example: abc: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "fixed-supply"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; gpio = <&gpio1 16 0>; startup-delay-us = <70000>; enable-active-high; regulator-boot-on };
Documentation/devicetree/bindings/regulator/regulator.txt 0 → 100644 +54 −0 Original line number Diff line number Diff line Voltage/Current Regulators Optional properties: - regulator-name: A string used as a descriptive name for regulator outputs - regulator-min-microvolt: smallest voltage consumers may set - regulator-max-microvolt: largest voltage consumers may set - regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops - regulator-min-microamp: smallest current consumers may set - regulator-max-microamp: largest current consumers may set - regulator-always-on: boolean, regulator should never be disabled - regulator-boot-on: bootloader/firmware enabled regulator - <name>-supply: phandle to the parent supply/regulator node Example: xyzreg: regulator@0 { regulator-min-microvolt = <1000000>; regulator-max-microvolt = <2500000>; regulator-always-on; vin-supply = <&vin>; }; Regulator Consumers: Consumer nodes can reference one or more of its supplies/ regulators using the below bindings. - <name>-supply: phandle to the regulator node These are the same bindings that a regulator in the above example used to reference its own supply, in which case its just seen as a special case of a regulator being a consumer itself. Example of a consumer device node (mmc) referencing two regulators (twl-reg1 and twl-reg2), twl-reg1: regulator@0 { ... ... ... }; twl-reg2: regulator@1 { ... ... ... }; mmc: mmc@0x0 { ... ... vmmc-supply = <&twl-reg1>; vmmcaux-supply = <&twl-reg2>; };
drivers/regulator/88pm8607.c +1 −1 Original line number Diff line number Diff line Loading @@ -427,7 +427,7 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev) /* replace driver_data with info */ info->regulator = regulator_register(&info->desc, &pdev->dev, pdata, info); pdata, info, NULL); if (IS_ERR(info->regulator)) { dev_err(&pdev->dev, "failed to register regulator %s\n", info->desc.name); Loading
drivers/regulator/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ obj-$(CONFIG_REGULATOR) += core.o dummy.o obj-$(CONFIG_OF) += of_regulator.o obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o Loading
drivers/regulator/aat2870-regulator.c +1 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev) ri->pdev = pdev; rdev = regulator_register(&ri->desc, &pdev->dev, pdev->dev.platform_data, ri); pdev->dev.platform_data, ri, NULL); if (IS_ERR(rdev)) { dev_err(&pdev->dev, "Failed to register regulator %s\n", ri->desc.name); Loading