Re: [PATCH] iio: common: cros_ec_sensors: use sensor_scale union member for CALIBSCALE

From: Joshua Crofts

Date: Sun Oct 11 2026 - 13:17:05 EST


On Sun, 11 Oct 2026 10:24:08 +0530
Arnav Kapoor <kapoorarnav43@xxxxxxxxx> wrote:

> The IIO_CHAN_INFO_CALIBSCALE read and write paths send
> MOTIONSENSE_CMD_SENSOR_SCALE, but set the flags through the
> sensor_offset member of the request union, while the scale values in
> the write path are filled through sensor_scale.
>
> This only works because the sensor_offset and sensor_scale structs of
> struct ec_params_motion_sense happen to place flags at the same offset.
> Use the sensor_scale member that matches the command, so all fields of
> the request are set through the same struct.
>
> No functional change.
>
> Assisted-by: LLM
> Signed-off-by: Arnav Kapoor <kapoorarnav43@xxxxxxxxx>
> ---

Please add a Fixes tag. Otherwise looks good to me!

Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>

--
Kind regards,
Joshua Crofts