regulator: Updates for v4.10
A quiet release for the regulator API, conference season must've been
slowing everyone down:
- A new interface allowing drivers to provide an interface for reading
a more detailed description of error conditions which allows devices
using these regulators to build
- ACPI support for the fixed voltage regulator.
- Cleanups for the TI TWL drivers to reduce code duplication.
-----BEGIN PGP SIGNATURE-----
iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlhO0k0THGJyb29uaWVA
a2VybmVsLm9yZwAKCRAk1otyXVSH0EsiB/90tNDJS5T6jwPiiTRVxtpMwGmLyGKP
/EVuutY4J5u192o5Dekql+QVkYrFRVLDd25q+YHH9zTDa0mymgdHetzjE456WKYr
QPemC2lNrZWJb7unluoWT5Hbj9zIby6+Zj3M5XHq/qn15uac/TZ9qqn9PdaDtm2x
Aar6TFuxjvDPlElvHGcrYaPtHhvrdvHx+hPWoMQRnRWIdWslb7D7MJ8ZCgyleEpk
0+ByZBDUM+y9zIeSJUKKHdjTI4UU8GTnDdW2qX6YdkR38xsrMt71BsQLCKxWQxnC
Ny3ECwrv0otFLTPsXUfoKrDwLEYt0cE+LhxoBzyvRfZsdcNS911/wAeG
=pGB0
-----END PGP SIGNATURE-----
Merge tag 'regulator-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"A quiet release for the regulator API, conference season must've been
slowing everyone down:
- a new interface allowing drivers to provide an interface for
reading a more detailed description of error conditions which
allows devices using these regulators to build
- ACPI support for the fixed voltage regulator.
- cleanups for the TI TWL drivers to reduce code duplication"
* tag 'regulator-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (24 commits)
regulator: tps65086: Fix 25mV ranges for BUCK regulators 1, 2, and 6
regulator: Fix regulator_get_error_flags() signature mismatch
regulator: core: add newline in debug message
regulator: tps65086: Fix 25mV ranges for BUCK regulators
regulator: core: Correct type of mode in regulator_mode_constrain
regulator: max77620: add documentation for MPOK property
regulator: max77620: add support to configure MPOK
regulator: twl6030: Remove unused fields from struct twlreg_info
regulator: twl: Remove unused fields from struct twlreg_info
regulator: twl: split twl6030 logic into its own file
regulator: twl: kill unused functions
regulator: twl: make driver DT only
regulator: twl-regulator: rework fixed regulator definition
regulator: max77620: remove unused variable
regulator: pwm: Add missing quotes to DT example
regulator: stw481x-vmmc: fix ages old enable error
regulator: gpio: properly check return value of of_get_named_gpio
regulator: lp873x: Add support for populating input supply
regulator: axp20x: Fix axp809 ldo_io registration error on cold boot
regulators: helpers: Fix handling of bypass_val_on in get_bypass_regmap
...
This commit is contained in:
commit
58f253d262
22 changed files with 1051 additions and 694 deletions
|
|
@ -180,6 +180,7 @@
|
|||
#define MAX77620_SD_CFG1_FPWM_SD_MASK BIT(2)
|
||||
#define MAX77620_SD_CFG1_FPWM_SD_SKIP 0
|
||||
#define MAX77620_SD_CFG1_FPWM_SD_FPWM BIT(2)
|
||||
#define MAX20024_SD_CFG1_MPOK_MASK BIT(1)
|
||||
#define MAX77620_SD_CFG1_FSRADE_SD_MASK BIT(0)
|
||||
#define MAX77620_SD_CFG1_FSRADE_SD_DISABLE 0
|
||||
#define MAX77620_SD_CFG1_FSRADE_SD_ENABLE BIT(0)
|
||||
|
|
@ -187,6 +188,7 @@
|
|||
/* LDO_CNFG2 */
|
||||
#define MAX77620_LDO_POWER_MODE_MASK 0xC0
|
||||
#define MAX77620_LDO_POWER_MODE_SHIFT 6
|
||||
#define MAX20024_LDO_CFG2_MPOK_MASK BIT(2)
|
||||
#define MAX77620_LDO_CFG2_ADE_MASK BIT(1)
|
||||
#define MAX77620_LDO_CFG2_ADE_DISABLE 0
|
||||
#define MAX77620_LDO_CFG2_ADE_ENABLE BIT(1)
|
||||
|
|
|
|||
|
|
@ -120,6 +120,25 @@ struct regmap;
|
|||
#define REGULATOR_EVENT_PRE_DISABLE 0x400
|
||||
#define REGULATOR_EVENT_ABORT_DISABLE 0x800
|
||||
|
||||
/*
|
||||
* Regulator errors that can be queried using regulator_get_error_flags
|
||||
*
|
||||
* UNDER_VOLTAGE Regulator output is under voltage.
|
||||
* OVER_CURRENT Regulator output current is too high.
|
||||
* REGULATION_OUT Regulator output is out of regulation.
|
||||
* FAIL Regulator output has failed.
|
||||
* OVER_TEMP Regulator over temp.
|
||||
*
|
||||
* NOTE: These errors can be OR'ed together.
|
||||
*/
|
||||
|
||||
#define REGULATOR_ERROR_UNDER_VOLTAGE BIT(1)
|
||||
#define REGULATOR_ERROR_OVER_CURRENT BIT(2)
|
||||
#define REGULATOR_ERROR_REGULATION_OUT BIT(3)
|
||||
#define REGULATOR_ERROR_FAIL BIT(4)
|
||||
#define REGULATOR_ERROR_OVER_TEMP BIT(5)
|
||||
|
||||
|
||||
/**
|
||||
* struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event
|
||||
*
|
||||
|
|
@ -237,6 +256,8 @@ int regulator_get_current_limit(struct regulator *regulator);
|
|||
|
||||
int regulator_set_mode(struct regulator *regulator, unsigned int mode);
|
||||
unsigned int regulator_get_mode(struct regulator *regulator);
|
||||
int regulator_get_error_flags(struct regulator *regulator,
|
||||
unsigned int *flags);
|
||||
int regulator_set_load(struct regulator *regulator, int load_uA);
|
||||
|
||||
int regulator_allow_bypass(struct regulator *regulator, bool allow);
|
||||
|
|
@ -477,6 +498,12 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator)
|
|||
return REGULATOR_MODE_NORMAL;
|
||||
}
|
||||
|
||||
static inline int regulator_get_error_flags(struct regulator *regulator,
|
||||
unsigned int *flags)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int regulator_set_load(struct regulator *regulator, int load_uA)
|
||||
{
|
||||
return REGULATOR_MODE_NORMAL;
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ struct regulator_linear_range {
|
|||
*
|
||||
* @set_mode: Set the configured operating mode for the regulator.
|
||||
* @get_mode: Get the configured operating mode for the regulator.
|
||||
* @get_error_flags: Get the current error(s) for the regulator.
|
||||
* @get_status: Return actual (not as-configured) status of regulator, as a
|
||||
* REGULATOR_STATUS value (or negative errno)
|
||||
* @get_optimum_mode: Get the most efficient operating mode for the regulator
|
||||
|
|
@ -169,6 +170,9 @@ struct regulator_ops {
|
|||
int (*set_mode) (struct regulator_dev *, unsigned int mode);
|
||||
unsigned int (*get_mode) (struct regulator_dev *);
|
||||
|
||||
/* retrieve current error flags on the regulator */
|
||||
int (*get_error_flags)(struct regulator_dev *, unsigned int *flags);
|
||||
|
||||
/* Time taken to enable or set voltage on the regulator */
|
||||
int (*enable_time) (struct regulator_dev *);
|
||||
int (*set_ramp_delay) (struct regulator_dev *, int ramp_delay);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue