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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 6, 2024 at 10:44 AM Tzung-Bi Shih <tzungbi@xxxxxxxxxx> wrote:
>
> On Tue, Sep 03, 2024 at 04:30:26PM +0000, Łukasz Bartosik wrote:
> > From: Pavan Holla <pholla@xxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxx>
>
> 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
>

I will do.

> > +#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.

It was a comment from Greg no to use uint*_t types but I agree the
changes I made are inconsistent with the rest of cros_ec_commands.h
file.

Greg would you be ok to stay with uint*_t types in cros_ec_commands.h
to be consistent with the rest of the file ?

Thanks,
Lukasz





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux