diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 21:34:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 21:34:35 -0700 |
commit | 555f8160b2c36dfa071c043b54d4b1edca7e07b4 (patch) | |
tree | d12a3498e5e43e67727f0557b7881ffafcb7ed66 /include | |
parent | b7aae4a9d02a1f9fdeb183cd5da95e00aae5c93e (diff) | |
parent | 768e66686cfe83f786f6ae26f1799cca69e80523 (diff) |
Merge tag 'regulator-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"This has been an extremely quiet release for the regulator API, aside
from bugfixes and small enhancements the only thing that really stands
out are the new drivers for Action Semiconductors ACT8945A, HiSilicon
HI665x, and the Maxim MAX20024 and MAX77620"
* tag 'regulator-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (46 commits)
regulator: pwm: Add support to have multiple instance of pwm regulator
regulator: pwm: Fix calculation of voltage-to-duty cycle
regulator: of: Use of_property_read_u32() for reading min/max
regulator: pv88060: fix incorrect clear of event register
regulator: pv88090: fix incorrect clear of event register
regulator: max77620: Add support to configure active-discharge
regulator: core: Add support for active-discharge configuration
regulator: helper: Add helper to configure active-discharge using regmap
regulator: core: Add support for active-discharge configuration
regulator: DT: Add DT property for active-discharge configuration
regulator: act8865: Specify fixed voltage of 3.3V for ACT8600's REG9
regulator: act8865: Rename platform_data field to init_data
regulator: act8865: Remove "static" from local variable
ASoC: cs4271: add regulator consumer support
regulator: max77620: Remove duplicate module alias
regulator: max77620: Eliminate duplicate code
regulator: max77620: Remove unused fields
regulator: core: fix crash in error path of regulator_register
regulator: core: Request GPIO before creating sysfs entries
regulator: gpio: don't print error on EPROBE_DEFER
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regulator/act8865.h | 4 | ||||
-rw-r--r-- | include/linux/regulator/driver.h | 17 | ||||
-rw-r--r-- | include/linux/regulator/lp872x.h | 5 | ||||
-rw-r--r-- | include/linux/regulator/machine.h | 12 |
4 files changed, 36 insertions, 2 deletions
diff --git a/include/linux/regulator/act8865.h b/include/linux/regulator/act8865.h index 15fa8f2d35c9..2eb386017fa5 100644 --- a/include/linux/regulator/act8865.h +++ b/include/linux/regulator/act8865.h @@ -68,12 +68,12 @@ enum { * act8865_regulator_data - regulator data * @id: regulator id * @name: regulator name - * @platform_data: regulator init data + * @init_data: regulator init data */ struct act8865_regulator_data { int id; const char *name; - struct regulator_init_data *platform_data; + struct regulator_init_data *init_data; }; /** diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 16ac9e108806..cd271e89a7e6 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -93,6 +93,8 @@ struct regulator_linear_range { * @get_current_limit: Get the configured limit for a current-limited regulator. * @set_input_current_limit: Configure an input limit. * + * @set_active_discharge: Set active discharge enable/disable of regulators. + * * @set_mode: Set the configured operating mode for the regulator. * @get_mode: Get the configured operating mode for the regulator. * @get_status: Return actual (not as-configured) status of regulator, as a @@ -149,6 +151,7 @@ struct regulator_ops { int (*set_input_current_limit) (struct regulator_dev *, int lim_uA); int (*set_over_current_protection) (struct regulator_dev *); + int (*set_active_discharge) (struct regulator_dev *, bool enable); /* enable/disable regulator */ int (*enable) (struct regulator_dev *); @@ -266,6 +269,14 @@ enum regulator_type { * @bypass_mask: Mask for control when using regmap set_bypass * @bypass_val_on: Enabling value for control when using regmap set_bypass * @bypass_val_off: Disabling value for control when using regmap set_bypass + * @active_discharge_off: Enabling value for control when using regmap + * set_active_discharge + * @active_discharge_on: Disabling value for control when using regmap + * set_active_discharge + * @active_discharge_mask: Mask for control when using regmap + * set_active_discharge + * @active_discharge_reg: Register for control when using regmap + * set_active_discharge * * @enable_time: Time taken for initial enable of regulator (in uS). * @off_on_delay: guard time (in uS), before re-enabling a regulator @@ -315,6 +326,10 @@ struct regulator_desc { unsigned int bypass_mask; unsigned int bypass_val_on; unsigned int bypass_val_off; + unsigned int active_discharge_on; + unsigned int active_discharge_off; + unsigned int active_discharge_mask; + unsigned int active_discharge_reg; unsigned int enable_time; @@ -447,6 +462,8 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev, int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); +int regulator_set_active_discharge_regmap(struct regulator_dev *rdev, + bool enable); void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); #endif diff --git a/include/linux/regulator/lp872x.h b/include/linux/regulator/lp872x.h index 132e05c46661..6029279f4eed 100644 --- a/include/linux/regulator/lp872x.h +++ b/include/linux/regulator/lp872x.h @@ -18,6 +18,9 @@ #define LP872X_MAX_REGULATORS 9 +#define LP8720_ENABLE_DELAY 200 +#define LP8725_ENABLE_DELAY 30000 + enum lp872x_regulator_id { LP8720_ID_BASE, LP8720_ID_LDO1 = LP8720_ID_BASE, @@ -79,12 +82,14 @@ struct lp872x_regulator_data { * @update_config : if LP872X_GENERAL_CFG register is updated, set true * @regulator_data : platform regulator id and init data * @dvs : dvs data for buck voltage control + * @enable_gpio : gpio pin number for enable control */ struct lp872x_platform_data { u8 general_config; bool update_config; struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS]; struct lp872x_dvs *dvs; + int enable_gpio; }; #endif diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index a1067d0b3991..5d627c83a630 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h @@ -42,6 +42,13 @@ struct regulator; #define REGULATOR_CHANGE_DRMS 0x10 #define REGULATOR_CHANGE_BYPASS 0x20 +/* Regulator active discharge flags */ +enum regulator_active_discharge { + REGULATOR_ACTIVE_DISCHARGE_DEFAULT, + REGULATOR_ACTIVE_DISCHARGE_DISABLE, + REGULATOR_ACTIVE_DISCHARGE_ENABLE, +}; + /** * struct regulator_state - regulator state during low power system states * @@ -100,6 +107,9 @@ struct regulator_state { * @initial_state: Suspend state to set by default. * @initial_mode: Mode to set at startup. * @ramp_delay: Time to settle down after voltage change (unit: uV/us) + * @active_discharge: Enable/disable active discharge. The enum + * regulator_active_discharge values are used for + * initialisation. * @enable_time: Turn-on time of the rails (unit: microseconds) */ struct regulation_constraints { @@ -140,6 +150,8 @@ struct regulation_constraints { unsigned int ramp_delay; unsigned int enable_time; + unsigned int active_discharge; + /* constraint flags */ unsigned always_on:1; /* regulator never off when system is on */ unsigned boot_on:1; /* bootloader/firmware enabled regulator */ |