Re: [PATCH v3 1/4] mfd: cros_ec: Update the EC feature codes

From: Lee Jones
Date: Wed May 08 2019 - 07:57:19 EST


On Mon, 08 Apr 2019, Enric Balletbo i Serra wrote:

> Update the feature enum for the Chromebook Embedded Controller to the
> latest version. Some of these enums are still not used in the kernel but
> we might be also interested on have these enums up to date. Userspace
> can use them to query the features to the EC via the cros-ec character
> device.
>
> While here, also fix a typo in one comment in the enum.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>
> ---
>
> Changes in v3: None
> Changes in v2:
> - Add a patch to introduce the required enums to build.
>
> include/linux/mfd/cros_ec_commands.h | 34 +++++++++++++++++++++++++++-

As always, I would like some more Chrome guys to review please.

> 1 file changed, 33 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
> index 1cdb07c0ece1..dcec96f01879 100644
> --- a/include/linux/mfd/cros_ec_commands.h
> +++ b/include/linux/mfd/cros_ec_commands.h
> @@ -840,7 +840,7 @@ enum ec_feature_code {
> * (Common Smart Battery System Interface Specification)
> */
> EC_FEATURE_SMART_BATTERY = 18,
> - /* EC can dectect when the host hangs. */
> + /* EC can detect when the host hangs. */
> EC_FEATURE_HANG_DETECT = 19,
> /* Report power information, for pit only */
> EC_FEATURE_PMU = 20,
> @@ -852,10 +852,42 @@ enum ec_feature_code {
> EC_FEATURE_USB_MUX = 23,
> /* Motion Sensor code has an internal software FIFO */
> EC_FEATURE_MOTION_SENSE_FIFO = 24,
> + /* Support temporary secure vstore */
> + EC_FEATURE_VSTORE = 25,
> + /* EC decides on USB-C SS mux state, muxes configured by host */
> + EC_FEATURE_USBC_SS_MUX_VIRTUAL = 26,
> /* EC has RTC feature that can be controlled by host commands */
> EC_FEATURE_RTC = 27,
> + /* The MCU exposes a Fingerprint sensor */
> + EC_FEATURE_FINGERPRINT = 28,
> + /* The MCU exposes a Touchpad */
> + EC_FEATURE_TOUCHPAD = 29,
> + /* The MCU has RWSIG task enabled */
> + EC_FEATURE_RWSIG = 30,
> + /* EC has device events support */
> + EC_FEATURE_DEVICE_EVENT = 31,
> + /* EC supports the unified wake masks for LPC/eSPI systems */
> + EC_FEATURE_UNIFIED_WAKE_MASKS = 32,
> + /* EC supports 64-bit host events */
> + EC_FEATURE_HOST_EVENT64 = 33,
> + /* EC runs code in RAM (not in place, a.k.a. XIP) */
> + EC_FEATURE_EXEC_IN_RAM = 34,
> /* EC supports CEC commands */
> EC_FEATURE_CEC = 35,
> + /* EC supports tight sensor timestamping. */
> + EC_FEATURE_MOTION_SENSE_TIGHT_TIMESTAMPS = 36,
> + /*
> + * EC supports tablet mode detection aligned to Chrome and allows
> + * setting of threshold by host command using
> + * MOTIONSENSE_CMD_TABLET_MODE_LID_ANGLE.
> + */
> + EC_FEATURE_REFINED_TABLET_MODE_HYSTERESIS = 37,
> + /* EC supports audio codec. */
> + EC_FEATURE_AUDIO_CODEC = 38,
> + /* EC Supports SCP. */
> + EC_FEATURE_SCP = 39,
> + /* The MCU is an Integrated Sensor Hub */
> + EC_FEATURE_ISH = 40,
> };
>
> #define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))

--
Lee Jones [æçæ]
Linaro Services Technical Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog