| 083fc83a | 23-Jun-2015 |
Simon Glass <sjg@chromium.org> |
dm: power: Add a function to set up all regulators
The device tree provides information about which regulators should be on at boot, or always on. Use this to set them up automatically.
Signed-off-
dm: power: Add a function to set up all regulators
The device tree provides information about which regulators should be on at boot, or always on. Use this to set them up automatically.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
show more ...
|
| 3b55d30f | 23-Jun-2015 |
Simon Glass <sjg@chromium.org> |
dm: pmic: Split output from function
The regulator_autoset() function mixes printf() output and PMIC adjustment code. It provides a boolean to control the output. It is better to avoid missing logic
dm: pmic: Split output from function
The regulator_autoset() function mixes printf() output and PMIC adjustment code. It provides a boolean to control the output. It is better to avoid missing logic and output, and this permits a smaller SPL code size. So split the output into a separate function.
Also rename the function to have a by_name() suffix, since we would like to be able to pass a device when we know it, and thus avoid the name search.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
show more ...
|
| e8f339e0 | 13-May-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
test: dm: add sandbox PMIC framework tests
This change adds new file to sandbox driver model test environment. The file is: test/dm/power.c, and it includes tests for PMIC framework, which includes
test: dm: add sandbox PMIC framework tests
This change adds new file to sandbox driver model test environment. The file is: test/dm/power.c, and it includes tests for PMIC framework, which includes PMIC uclass and REGULATOR uclass.
All tests are based od Sandbox PMIC emulated device. Some test constants for this device are defined in the header: include/power/sandbox_pmic.h
PMIC tests includes: - pmic get - tests, that pmic_get() returns the requested device - pmic I/O - tests I/O by writing and reading some values to PMIC's registers and then compares, that the write/read values are equal.
The regulator tests includes: - Regulator get by devname/platname - Voltage set/get - Current set/get - Enable set/get - Mode set/get - Autoset - List autoset
For the regulator 'get' test, the returned device pointers are compared, and their names are also compared to the requested one. Every other test, first sets the given attribute and next try to get it. The test pass, when the set/get values are equal.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 5d387d0d | 13-May-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator
This commit adds emulation of sandbox PMIC device, which includes: - PMIC I2C emulation driver - PMIC I/O driver (UCLASS_PMIC) -
sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator
This commit adds emulation of sandbox PMIC device, which includes: - PMIC I2C emulation driver - PMIC I/O driver (UCLASS_PMIC) - PMIC regulator driver (UCLASS_REGULATOR)
The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes, which allows using 'i2c md' command with the default count (16).
The sandbox PMIC provides regulators: - 2x BUCK - 2x LDO
Each, with adjustable output: - Enable state - Voltage - Current limit (LDO1/BUCK1 only) - Operation mode (different for BUCK and LDO)
Each attribute has it's own register, beside the enable state, which depends on operation mode.
The header file: sandbox_pmic.h includes PMIC's default register values, which are set on i2c pmic emul driver's probe() method.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 1757df46 | 20-Apr-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dm: regulator: add max77686 regulator driver
This commit adds support to MAX77686 regulator driver, based on a driver model regulator's API. It implements almost all regulator operations, beside tho
dm: regulator: add max77686 regulator driver
This commit adds support to MAX77686 regulator driver, based on a driver model regulator's API. It implements almost all regulator operations, beside those for setting and geting the Current value. For proper bind and operation it requires the MAX77686 PMIC driver.
New file: drivers/power/regulator/max77686.c New config: CONFIG_DM_REGULATOR_MAX77686
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| af41e8db | 20-Apr-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
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
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>
show more ...
|
| 78fb6e31 | 06-Jan-2015 |
Felipe Balbi <balbi@ti.com> |
pmic: add tps62362 simple wrapper code
This regulator is used with AM437x IDK to feed VDD_MPU, without means to scale VDD_MPU we can't support higher frequencies.
Signed-off-by: Felipe Balbi <balbi
pmic: add tps62362 simple wrapper code
This regulator is used with AM437x IDK to feed VDD_MPU, without means to scale VDD_MPU we can't support higher frequencies.
Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|