Skip to content

Commit a233547

Browse files
peter50216broonie
authored andcommitted
platform/chrome: cros_ec: Fix host command for regulator control.
Since the host command number 0x012B conflicts with other EC host command, add one to all regulator control related host command. Also fix a wrong alignment on struct and sync the comment with the one in ChromeOS EC codebase. Fixes: dff08ca ("platform/chrome: cros_ec: Add command for regulator control.") Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org> Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200724080358.619245-1-pihsun@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3bda44f commit a233547

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

include/linux/platform_data/cros_ec_commands.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5438,7 +5438,7 @@ struct ec_response_rollback_info {
54385438
*
54395439
* Returns the regulator name and supported voltage list in mV.
54405440
*/
5441-
#define EC_CMD_REGULATOR_GET_INFO 0x012B
5441+
#define EC_CMD_REGULATOR_GET_INFO 0x012C
54425442

54435443
/* Maximum length of regulator name */
54445444
#define EC_REGULATOR_NAME_MAX_LEN 16
@@ -5454,12 +5454,12 @@ struct ec_response_regulator_get_info {
54545454
char name[EC_REGULATOR_NAME_MAX_LEN];
54555455
uint16_t num_voltages;
54565456
uint16_t voltages_mv[EC_REGULATOR_VOLTAGE_MAX_COUNT];
5457-
} __ec_align1;
5457+
} __ec_align2;
54585458

54595459
/*
54605460
* Configure the regulator as enabled / disabled.
54615461
*/
5462-
#define EC_CMD_REGULATOR_ENABLE 0x012C
5462+
#define EC_CMD_REGULATOR_ENABLE 0x012D
54635463

54645464
struct ec_params_regulator_enable {
54655465
uint32_t index;
@@ -5471,7 +5471,7 @@ struct ec_params_regulator_enable {
54715471
*
54725472
* Returns 1 if the regulator is enabled, 0 if not.
54735473
*/
5474-
#define EC_CMD_REGULATOR_IS_ENABLED 0x012D
5474+
#define EC_CMD_REGULATOR_IS_ENABLED 0x012E
54755475

54765476
struct ec_params_regulator_is_enabled {
54775477
uint32_t index;
@@ -5489,7 +5489,7 @@ struct ec_response_regulator_is_enabled {
54895489
* Also note that this might be called before the regulator is enabled, and the
54905490
* setting should be in effect after the regulator is enabled.
54915491
*/
5492-
#define EC_CMD_REGULATOR_SET_VOLTAGE 0x012E
5492+
#define EC_CMD_REGULATOR_SET_VOLTAGE 0x012F
54935493

54945494
struct ec_params_regulator_set_voltage {
54955495
uint32_t index;
@@ -5500,9 +5500,10 @@ struct ec_params_regulator_set_voltage {
55005500
/*
55015501
* Get the currently configured voltage for the voltage regulator.
55025502
*
5503-
* Note that this might be called before the regulator is enabled.
5503+
* Note that this might be called before the regulator is enabled, and this
5504+
* should return the configured output voltage if the regulator is enabled.
55045505
*/
5505-
#define EC_CMD_REGULATOR_GET_VOLTAGE 0x012F
5506+
#define EC_CMD_REGULATOR_GET_VOLTAGE 0x0130
55065507

55075508
struct ec_params_regulator_get_voltage {
55085509
uint32_t index;

0 commit comments

Comments
 (0)