| 8640522d | 28-Jul-2015 |
Peng Fan <Peng.Fan@freescale.com> |
power: regulator: max77686 correct variable type
The return type of pmic_read and pmic_write is signed int, so correct variable 'ret' from type unsigned int to int.
Signed-off-by: Peng Fan <Peng.Fa
power: regulator: max77686 correct variable type
The return type of pmic_read and pmic_write is signed int, so correct variable 'ret' from type unsigned int to int.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
show more ...
|
| d08504d1 | 03-Jul-2015 |
Simon Glass <sjg@chromium.org> |
dm: power: Don't return an error when regulators are not autoset
Not all regulators can be set up automatically. Adjust the code so that regulators_enable_boot_on() will return success when some are
dm: power: Don't return an error when regulators are not autoset
Not all regulators can be set up automatically. Adjust the code so that regulators_enable_boot_on() will return success when some are skipped. Only genuine errors are reported.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
show more ...
|
| 59c26a9c | 23-Jun-2015 |
Simon Glass <sjg@chromium.org> |
dm: power: Use debug() for errors in regulator uclass
To reduce unnecessary code size in an uncommon code path, use debug() where possible(). The driver returns an error which indicates failure.
Si
dm: power: Use debug() for errors in regulator uclass
To reduce unnecessary code size in an uncommon code path, use debug() where possible(). The driver returns an error which indicates failure.
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 ...
|
| 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 ...
|
| 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 ...
|
| 9923a8b4 | 20-Apr-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dm: regulator: add fixed voltage regulator driver
This driver implements regulator operations for fixed Voltage/Current value regulators. beside the standard regulator constraints, which are put int
dm: regulator: add fixed voltage regulator driver
This driver implements regulator operations for fixed Voltage/Current value regulators. beside the standard regulator constraints, which are put into the uclass platform data, a typical fixed regulator node provides few additional properties like: - gpio - gpio-open-drain - enable-active-high - startup-delay-us The only 'gpio' is used by this driver and is kept in structure of type 'fixed_regulator_platdata', as a device platform data (dev->platdata).
The driver implements: - get_value - get_current - get_enable - set_enable
The regulator calls and commands can be used for fixed-regulator devices, and the proper error will be returned for prohibited.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|