Re: [PATCH v5 1/8] platform/chrome: Update ChromeOS EC header for UCSI

Tzung-Bi Shih
2024-09-06T08:44:15Z

On Tue, Sep 03, 2024 at 04:30:26PM +0000, Łukasz Bartosik wrote:
> From: Pavan Holla <pholla@chromium.org>
>
> Add EC host commands for reading and writing UCSI structures
> in the EC. The corresponding kernel driver is cros-ec-ucsi.
>
> Also update PD events supported by the EC.
>
> Signed-off-by: Pavan Holla <pholla@chromium.org>

It needs your S-o-b tag at the end. See [1].

[1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

> --- a/include/linux/platform_data/cros_ec_commands.h
> +++ b/include/linux/platform_data/cros_ec_commands.h
> @@ -5012,8 +5012,10 @@ struct ec_response_pd_status {
[...]
> struct ec_response_host_event_status {
> - uint32_t status; /* PD MCU host event status */
> + u32 status; /* PD MCU host event status */

Even though ./scripts/checkpatch.pl dislikes it, but please don't do that.
The header is a re-import from EC's repo. We should try not to be divergent
from the origin too much.

> +/*
> + * Read/write interface for UCSI OPM <-> PPM communication.
> + */

Same reason: it'd be better if it can align to [2].

[2]: https://crrev.com/1454f2e8dac20ca37428744345c1bb4fdec30255/include/ec_commands.h#8055

> +#define EC_CMD_UCSI_PPM_SET 0x0140
> +
> +/* The data size is stored in the host command protocol header. */
> +struct ec_params_ucsi_ppm_set {
> + u16 offset;
> + u8 data[];

Same for the u16 and u8.

> +struct ec_params_ucsi_ppm_get {
> + u16 offset;
> + u8 size;

Same here.