Skip to content

Commit 256ab95

Browse files
Stephen BarberLee Jones
authored andcommitted
mfd: cros_ec: rev cros_ec_commands.h
Update cros_ec_commands.h to the latest version in the EC firmware sources and add power domain and passthru commands. Also, update lightbar to use new command names. Signed-off-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent a841178 commit 256ab95

2 files changed

Lines changed: 262 additions & 29 deletions

File tree

‎drivers/platform/chrome/cros_ec_lightbar.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ static ssize_t brightness_store(struct device *dev,
197197
return -ENOMEM;
198198

199199
param = (struct ec_params_lightbar *)msg->data;
200-
param->cmd = LIGHTBAR_CMD_BRIGHTNESS;
201-
param->brightness.num = val;
200+
param->cmd = LIGHTBAR_CMD_SET_BRIGHTNESS;
201+
param->set_brightness.num = val;
202202
ret = lb_throttle();
203203
if (ret)
204204
goto exit;
@@ -253,11 +253,11 @@ static ssize_t led_rgb_store(struct device *dev, struct device_attribute *attr,
253253

254254
if (i == 4) {
255255
param = (struct ec_params_lightbar *)msg->data;
256-
param->cmd = LIGHTBAR_CMD_RGB;
257-
param->rgb.led = val[0];
258-
param->rgb.red = val[1];
259-
param->rgb.green = val[2];
260-
param->rgb.blue = val[3];
256+
param->cmd = LIGHTBAR_CMD_SET_RGB;
257+
param->set_rgb.led = val[0];
258+
param->set_rgb.red = val[1];
259+
param->set_rgb.green = val[2];
260+
param->set_rgb.blue = val[3];
261261
/*
262262
* Throttle only the first of every four transactions,
263263
* so that the user can update all four LEDs at once.

0 commit comments

Comments
 (0)