[PATCH v1 1/3] platform/chrome: cros_ec: fix alignment of ec_params_pwrmon

From: Daniel Balint

Date: Fri Nov 06 2026 - 14:33:02 EST


Sync EC_CMD_PWRMON structure padding with ChromeOS EC firmware by adding
explicit reserved padding to struct ec_params_pwrmon (2-byte union
alignment) and struct pwrmon_dump_info (4-byte struct size alignment),
as __ec_align2 and __ec_align4 expand to __packed in Linux.

Fixes: b57af7f8d194 ("platform/chrome: cros_ec: Sync host command header with EC")
Signed-off-by: Daniel Balint <dbalint@xxxxxxxxxx>
---
include/linux/platform_data/cros_ec_commands.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index a7bd69d83522..6d74371c7074 100644
--- a/include/linux/platform_data/cros_ec_commands.h
+++ b/include/linux/platform_data/cros_ec_commands.h
@@ -6635,6 +6635,7 @@ enum ec_pwrmon_cmd {

struct ec_params_pwrmon {
uint8_t cmd;
+ uint8_t reserved;
union {
uint16_t set_rate;
uint8_t channel_id;
@@ -6651,6 +6652,7 @@ struct ec_params_pwrmon {
struct pwrmon_dump_info {
uint8_t channel_id;
char channel_name[32];
+ uint8_t reserved[3];
} __ec_align4;

struct ec_response_pwrmon {
--
2.56.0.455.g6c5a503b38-goog