Re: [PATCH v3] mfd: cros: Update EC protocol to match current EC code

From: Gwendal Grignou
Date: Fri Mar 29 2019 - 13:45:01 EST


Thanks Eric,
I will split the v2 patch. It seems adding the BIT() change caused
patchwork to not process the patch correctly:
https://lore.kernel.org/patchwork/patch/1055029/ has the end of the
patch, https://lore.kernel.org/patchwork/patch/1055029/mbox/ has the
beginning.
I am also fixing the codec error.
Gwendal.

On Fri, Mar 29, 2019 at 6:36 AM Enric Balletbo i Serra
<enric.balletbo@xxxxxxxxxxxxx> wrote:
>
> Hi Gwendal,
>
> After fix my problems manually ...
>
> On 28/3/19 22:52, Gwendal Grignou wrote:
> > Chromebook Embedded Controller protocol is defined in the kernel at
> > cros_ec_commands.h.
> > The source of trust for the EC protocol is at
> > https://chromium.googlesource.com/chromiumos/platform/ec/+/master/include/ec_commands.h
> >
> > Only needed changes have been picked up from this file to the kernel
> > include file leading to gaps between the upstream version and what the
> > latest ECs can do.
> >
> > Fill the gaps to ease future integrations. Changes from the original
> > files is header/footer for license and include files for alignment.
> >
> > Check this include file works on ChomeOS kernel 4.14 and 4.19 on eve.
> >
> > Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> > ---
> > Changes in v3:
> > - No changes, resending
> >
> > Changes in v2:
> > - Replace 1 << with BIT()
> > - Check checkpatch warning/errors are outside kernel scope.
> > - Update .h with latest changes.
> >
> > include/linux/mfd/cros_ec_commands.h | 3723 +++++++++++++++++++++-----
> > 1 file changed, 2992 insertions(+), 731 deletions(-)
> >
> > diff --git a/include/linux/mfd/cros_ec_commands.h
> > b/include/linux/mfd/cros_ec_commands.h
> > index fc91082d4c35..5c4764e3db6f 100644
> > --- a/include/linux/mfd/cros_ec_commands.h
> > +++ b/include/linux/mfd/cros_ec_commands.h
>
> [snip]
>
> >
> > /*
> > - * For subcommand EC_CODEC_GET_GAIN.
> > + * Entering Verified Boot Mode Command
> > + * Default mode is VBOOT_MODE_NORMAL if EC did not receive this command.
> > + * Valid Modes are: normal, developer, and recovery.
> > */
> > -struct ec_response_codec_gain {
> > - uint8_t left;
> > - uint8_t right;
> > -} __packed;
>
> This causes a build problem in mainline as ec_response_codec_gain is used in
> sound/soc/codecs/cros_ec_codec.c file, I don't see this struct anymore.
>
> Apart from this the patch looks good to me.
>
> Thanks,
> Enric