diff options
author | Simon Glass <sjg@chromium.org> | 2015-06-23 15:38:57 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:26 -0600 |
commit | 7837ceab1ef8d4a88fb218bfa6b042b0b865b15f (patch) | |
tree | f05380c28bf5c0e119553a25482de6aa7d9db485 /include | |
parent | 23ec2b570d948519109c284eddd14146c84d1f62 (diff) | |
download | u-boot-imx-7837ceab1ef8d4a88fb218bfa6b042b0b865b15f.zip u-boot-imx-7837ceab1ef8d4a88fb218bfa6b042b0b865b15f.tar.gz u-boot-imx-7837ceab1ef8d4a88fb218bfa6b042b0b865b15f.tar.bz2 |
dm: power: Add regulator flags to centralise auto-set logic
Decide when the regulator is set up whether we want to auto-set the voltage
or current. This avoids the complex logic spilling into the processing code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/power/regulator.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/power/regulator.h b/include/power/regulator.h index 03a2cef..79ce0a4 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -128,6 +128,11 @@ struct dm_regulator_mode { const char *name; }; +enum regulator_flag { + REGULATOR_FLAG_AUTOSET_UV = 1 << 0, + REGULATOR_FLAG_AUTOSET_UA = 1 << 1, +}; + /** * struct dm_regulator_uclass_platdata - pointed by dev->uclass_platdata, and * allocated on each regulator bind. This structure holds an information @@ -143,6 +148,8 @@ struct dm_regulator_mode { * @max_uA* - maximum amperage (micro Amps) * @always_on* - bool type, true or false * @boot_on* - bool type, true or false + * TODO(sjg@chromium.org): Consider putting the above two into @flags + * @flags: - flags value (see REGULATOR_FLAG_...) * @name** - fdt regulator name - should be taken from the device tree * * Note: @@ -162,6 +169,7 @@ struct dm_regulator_uclass_platdata { bool always_on; bool boot_on; const char *name; + int flags; }; /* Regulator device operations */ |