diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2015-04-20 20:07:42 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-14 18:49:37 -0600 |
commit | af41e8db26821ae65fa10c8c4689ccb39043878f (patch) | |
tree | 6fd25150cbc31bdb10b2881a4fbf544ae8c5d8e1 /doc/device-tree-bindings/regulator/regulator.txt | |
parent | 4d9057e82be11a862db411c4867e859fe0d4ca2a (diff) |
dm: regulator: add implementation of driver model regulator uclass
This commit introduces the implementation of dm regulator API.
Device tree support allows for auto binding. And by the basic
uclass operations, it allows to driving the devices in a common
way. For detailed informations, please look into the header file.
Core files:
- drivers/power/regulator-uclass.c - provides regulator common functions api
- include/power/regulator.h - define all structures required by the regulator
Changes:
- new uclass-id: UCLASS_REGULATOR
- new config: CONFIG_DM_REGULATOR
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/device-tree-bindings/regulator/regulator.txt')
-rw-r--r-- | doc/device-tree-bindings/regulator/regulator.txt | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/device-tree-bindings/regulator/regulator.txt b/doc/device-tree-bindings/regulator/regulator.txt new file mode 100644 index 0000000000..68b02a8e74 --- /dev/null +++ b/doc/device-tree-bindings/regulator/regulator.txt @@ -0,0 +1,54 @@ +Voltage/Current regulator + +Binding: +The regulator devices don't use the "compatible" property. The binding is done +by the prefix of regulator node's name. Usually the pmic I/O driver will provide +the array of 'struct pmic_child_info' with the prefixes and compatible drivers. +The bind is done by calling function: pmic_bind_childs(). +Example drivers: +pmic: drivers/power/pmic/max77686.c +regulator: drivers/power/regulator/max77686.c + +For the node name e.g.: "prefix[:alpha:]num { ... }": +- the driver prefix should be: "prefix" or "PREFIX" - case insensitive +- the node name's "num" is set as "dev->driver_data" on bind + +Example the prefix "ldo" will pass for: "ldo1", "ldo@1", "LDO1", "LDOREG@1"... + +Required properties: +- regulator-name: a string, required by the regulator uclass + +Note +The "regulator-name" constraint is used for setting the device's uclass +platform data '.name' field. And the regulator device name is set from +it's node name. + +Optional properties: +- regulator-min-microvolt: a minimum allowed Voltage value +- regulator-max-microvolt: a maximum allowed Voltage value +- regulator-min-microamp: a minimum allowed Current value +- regulator-max-microamp: a maximum allowed Current value +- regulator-always-on: regulator should never be disabled +- regulator-boot-on: enabled by bootloader/firmware + +Other kernel-style properties, are currently not used. + +Note: +For the regulator autoset from constraints, the framework expects that: +- regulator-min-microvolt is equal to regulator-max-microvolt +- regulator-min-microamp is equal to regulator-max-microamp +- regulator-always-on or regulator-boot-on is set + +Example: +ldo0 { + /* Mandatory */ + regulator-name = "VDDQ_EMMC_1.8V"; + + /* Optional */ + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-min-microamp = <100000>; + regulator-max-microamp = <100000>; + regulator-always-on; + regulator-boot-on; +}; |