Merge tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This time around the bulk of the work on the regulator API has been cleanups of various kinds, partly but not entirely inspired by the W=1 stuff that 0day turned on. There's also been a fairly large crop of new drivers, and a few bugfixes for existing drivers. - Mode setting support for MT6397 and DA9211. - New drivers for ChromeOS embedded controllers, Fairchild FAN53880, NXP PCA9450, Qualcomm LABIBB, MP5496, and VBUS booster, and Silergy SY8827N" * tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (67 commits) regulator: add the sub node names for the MP5496 PMIC regulator: cros-ec-regulator: Fix double free of desc->name. platform/chrome: cros_ec: Fix host command for regulator control. regulator: pca9450: Convert to use module_i2c_driver regulator: fix memory leak on error path of regulator_register() regulator: Replace HTTP links with HTTPS ones regulator: convert QCOM SMD-RPM regulator document to YAML schema regulator: gpio: Honor regulator-boot-on property regulator: core: Add destroy_regulator() regulator: Correct kernel-doc inconsistency regulator: Add labibb regulator binding regulator: qcom: Add labibb driver regulator: Allow regulators to verify enabled during enable() regulator: cros-ec: Constify cros_ec_regulator_voltage_ops regulator: devres: Standardise on function documentation headers regulator: of_regulator: Add missing colon for rdev kerneldoc argument regulator: devres: Fix issues with kerneldoc headers regulator: fan53880: Add support for COMPILE_TEST regulator: fan53880: Add missing .owner field in regulator_desc dt-bindings: regulator: add pca9450 regulator yaml ...
This commit is contained in:
@@ -5430,6 +5430,89 @@ struct ec_response_rollback_info {
|
||||
/* Issue AP reset */
|
||||
#define EC_CMD_AP_RESET 0x0125
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Voltage regulator controls */
|
||||
|
||||
/*
|
||||
* Get basic info of voltage regulator for given index.
|
||||
*
|
||||
* Returns the regulator name and supported voltage list in mV.
|
||||
*/
|
||||
#define EC_CMD_REGULATOR_GET_INFO 0x012C
|
||||
|
||||
/* Maximum length of regulator name */
|
||||
#define EC_REGULATOR_NAME_MAX_LEN 16
|
||||
|
||||
/* Maximum length of the supported voltage list. */
|
||||
#define EC_REGULATOR_VOLTAGE_MAX_COUNT 16
|
||||
|
||||
struct ec_params_regulator_get_info {
|
||||
uint32_t index;
|
||||
} __ec_align4;
|
||||
|
||||
struct ec_response_regulator_get_info {
|
||||
char name[EC_REGULATOR_NAME_MAX_LEN];
|
||||
uint16_t num_voltages;
|
||||
uint16_t voltages_mv[EC_REGULATOR_VOLTAGE_MAX_COUNT];
|
||||
} __ec_align2;
|
||||
|
||||
/*
|
||||
* Configure the regulator as enabled / disabled.
|
||||
*/
|
||||
#define EC_CMD_REGULATOR_ENABLE 0x012D
|
||||
|
||||
struct ec_params_regulator_enable {
|
||||
uint32_t index;
|
||||
uint8_t enable;
|
||||
} __ec_align4;
|
||||
|
||||
/*
|
||||
* Query if the regulator is enabled.
|
||||
*
|
||||
* Returns 1 if the regulator is enabled, 0 if not.
|
||||
*/
|
||||
#define EC_CMD_REGULATOR_IS_ENABLED 0x012E
|
||||
|
||||
struct ec_params_regulator_is_enabled {
|
||||
uint32_t index;
|
||||
} __ec_align4;
|
||||
|
||||
struct ec_response_regulator_is_enabled {
|
||||
uint8_t enabled;
|
||||
} __ec_align1;
|
||||
|
||||
/*
|
||||
* Set voltage for the voltage regulator within the range specified.
|
||||
*
|
||||
* The driver should select the voltage in range closest to min_mv.
|
||||
*
|
||||
* Also note that this might be called before the regulator is enabled, and the
|
||||
* setting should be in effect after the regulator is enabled.
|
||||
*/
|
||||
#define EC_CMD_REGULATOR_SET_VOLTAGE 0x012F
|
||||
|
||||
struct ec_params_regulator_set_voltage {
|
||||
uint32_t index;
|
||||
uint32_t min_mv;
|
||||
uint32_t max_mv;
|
||||
} __ec_align4;
|
||||
|
||||
/*
|
||||
* Get the currently configured voltage for the voltage regulator.
|
||||
*
|
||||
* Note that this might be called before the regulator is enabled, and this
|
||||
* should return the configured output voltage if the regulator is enabled.
|
||||
*/
|
||||
#define EC_CMD_REGULATOR_GET_VOLTAGE 0x0130
|
||||
|
||||
struct ec_params_regulator_get_voltage {
|
||||
uint32_t index;
|
||||
} __ec_align4;
|
||||
|
||||
struct ec_response_regulator_get_voltage {
|
||||
uint32_t voltage_mv;
|
||||
} __ec_align4;
|
||||
|
||||
/*****************************************************************************/
|
||||
/* The command range 0x200-0x2FF is reserved for Rotor. */
|
||||
|
||||
|
Reference in New Issue
Block a user