2019-04-08 09:45:07

by Enric Balletbo i Serra

[permalink] [raw]
Subject: [PATCH v3 0/4] mfd: cros_ec: Instantiate CrOS FP, TP and ISH devices

Hi Lee,

The reason I'm sending this patch series is to clarify the build
dependencies of the following patches:

[PATCH 1/2] mfd: cros_ec: instantiate properly CrOS FP MCU device
[PATCH 2/2] mfd: cros_ec: instantiate properly CrOS Touchpad MCU device

and I also included this patch in the series:

[v3] mfd: cros_ec: instantiate properly CrOS ISH MCU device

The first version depends on:

- mfd: cros: Update EC protocol to match current EC code
- https://lore.kernel.org/patchwork/patch/1046363

But there were some concerns on how to update this file properly, so
meanwhile we figure out the proper way, let's introduce only the required
fields for this series.

The series adds support to instantiate three special CrOS EC devices, a
fingerprint, a touchpad and an integrated sensor hub.

Best regards,
Enric

Changes in v3:
- Fix Andy Shevchenko email.

Changes in v2:
- Add a patch to introduce the required enums to build.
- Add a patch to instantiate the CrOS ISH device to the series.

Enric Balletbo i Serra (3):
mfd: cros_ec: Update the EC feature codes
mfd: cros_ec: instantiate properly CrOS FP MCU device
mfd: cros_ec: instantiate properly CrOS Touchpad MCU device

Rushikesh S Kadam (1):
mfd: cros_ec: instantiate properly CrOS ISH MCU device

drivers/mfd/cros_ec_dev.c | 33 +++++++++++++++++++++++++++
include/linux/mfd/cros_ec.h | 7 ++++--
include/linux/mfd/cros_ec_commands.h | 34 +++++++++++++++++++++++++++-
3 files changed, 71 insertions(+), 3 deletions(-)

--
2.20.1


2019-04-08 09:42:51

by Enric Balletbo i Serra

[permalink] [raw]
Subject: [PATCH v3 2/4] mfd: cros_ec: instantiate properly CrOS ISH MCU device

From: Rushikesh S Kadam <[email protected]>

Integrated Sensor Hub (ISH) is also a MCU running EC
having feature bit EC_FEATURE_ISH. Instantiate it as
a special CrOS EC device with device name 'cros_ish'.

Signed-off-by: Rushikesh S Kadam <[email protected]>
Reviewed-by: Gwendal Grignou <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Enric Balletbo i Serra <[email protected]>
---

Changes in v3:
- Fix Andy Shevchenko email.

Changes in v2:
- Add a patch to instantiate the CrOS ISH device to the series.

drivers/mfd/cros_ec_dev.c | 13 +++++++++++++
include/linux/mfd/cros_ec.h | 5 +++--
2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 99cfdb5b71ef..1daccd4e05a3 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -636,6 +636,19 @@ static int ec_device_probe(struct platform_device *pdev)
device_initialize(&ec->class_dev);
cdev_init(&ec->cdev, &fops);

+ /*
+ * Check whether this is actually an Integrated Sensor Hub (ISH)
+ * rather than an EC.
+ */
+ if (cros_ec_check_features(ec, EC_FEATURE_ISH)) {
+ dev_info(dev, "CrOS ISH MCU detected.\n");
+ /*
+ * Help userspace differentiating ECs from ISH MCU,
+ * regardless of the probing order.
+ */
+ ec_platform->ec_name = CROS_EC_DEV_ISH_NAME;
+ }
+
/*
* Add the class device
* Link to the character device for creating the /dev entry
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index b6442201f77f..ce50628aa5e7 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -22,8 +22,9 @@
#include <linux/mfd/cros_ec_commands.h>
#include <linux/mutex.h>

-#define CROS_EC_DEV_NAME "cros_ec"
-#define CROS_EC_DEV_PD_NAME "cros_pd"
+#define CROS_EC_DEV_NAME "cros_ec"
+#define CROS_EC_DEV_ISH_NAME "cros_ish"
+#define CROS_EC_DEV_PD_NAME "cros_pd"

/*
* The EC is unresponsive for a time after a reboot command. Add a
--
2.20.1

2019-04-08 09:42:54

by Enric Balletbo i Serra

[permalink] [raw]
Subject: [PATCH v3 4/4] mfd: cros_ec: instantiate properly CrOS Touchpad MCU device

Support Touchpad MCU as a special of CrOS EC devices. The current
Touchpad MCU is used on Eve Chromebook and used the same protocol as
other CrOS EC devices.

When a MCU has touchpad support (aka EC_FEATURE_TOUCHPAD), it is
instantiated as a special CrOS EC device with device name 'cros_tp'. So
regardless of the probing order between the actual cros_ec and cros_tp,
the userspace and other kernel drivers should not confuse them.

Signed-off-by: Wei-Ning Huang <[email protected]>
Signed-off-by: Enric Balletbo i Serra <[email protected]>
---

Changes in v3: None
Changes in v2: None

drivers/mfd/cros_ec_dev.c | 10 ++++++++++
include/linux/mfd/cros_ec.h | 1 +
2 files changed, 11 insertions(+)

diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 79746e817cdb..be827910e9d0 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -659,6 +659,16 @@ static int ec_device_probe(struct platform_device *pdev)
ec_platform->ec_name = CROS_EC_DEV_ISH_NAME;
}

+ /* Check whether this is actually a Touchpad MCU rather than an EC */
+ if (cros_ec_check_features(ec, EC_FEATURE_TOUCHPAD)) {
+ dev_info(dev, "CrOS Touchpad MCU detected.\n");
+ /*
+ * Help userspace differentiating ECs from TP MCU,
+ * regardless of the probing order.
+ */
+ ec_platform->ec_name = CROS_EC_DEV_TP_NAME;
+ }
+
/*
* Add the class device
* Link to the character device for creating the /dev entry
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index b393bd4e4b73..981381fbb3fd 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -26,6 +26,7 @@
#define CROS_EC_DEV_FP_NAME "cros_fp"
#define CROS_EC_DEV_ISH_NAME "cros_ish"
#define CROS_EC_DEV_PD_NAME "cros_pd"
+#define CROS_EC_DEV_TP_NAME "cros_tp"

/*
* The EC is unresponsive for a time after a reboot command. Add a
--
2.20.1

2019-04-08 09:44:13

by Enric Balletbo i Serra

[permalink] [raw]
Subject: [PATCH v3 3/4] mfd: cros_ec: instantiate properly CrOS FP MCU device

Support Fingerprint MCU as a special of CrOS EC devices. The current FP
MCU uses the same EC SPI protocol v3 as other CrOS EC devices on a SPI
bus.

When a MCU has fingerprint support (aka EC_FEATURE_FINGERPRINT), it is
instantiated as a special CrOS EC device with device name 'cros_fp'. So
regardless of the probing order between the actual cros_ec and cros_fp,
the userspace and other kernel drivers should not confuse them.

Signed-off-by: Vincent Palatin <[email protected]>
Signed-off-by: Enric Balletbo i Serra <[email protected]>
---

Changes in v3: None
Changes in v2: None

drivers/mfd/cros_ec_dev.c | 10 ++++++++++
include/linux/mfd/cros_ec.h | 1 +
2 files changed, 11 insertions(+)

diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 1daccd4e05a3..79746e817cdb 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -636,6 +636,16 @@ static int ec_device_probe(struct platform_device *pdev)
device_initialize(&ec->class_dev);
cdev_init(&ec->cdev, &fops);

+ /* Check whether this is actually a Fingerprint MCU rather than an EC */
+ if (cros_ec_check_features(ec, EC_FEATURE_FINGERPRINT)) {
+ dev_info(dev, "CrOS Fingerprint MCU detected.\n");
+ /*
+ * Help userspace differentiating ECs from FP MCU,
+ * regardless of the probing order.
+ */
+ ec_platform->ec_name = CROS_EC_DEV_FP_NAME;
+ }
+
/*
* Check whether this is actually an Integrated Sensor Hub (ISH)
* rather than an EC.
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index ce50628aa5e7..b393bd4e4b73 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -23,6 +23,7 @@
#include <linux/mutex.h>

#define CROS_EC_DEV_NAME "cros_ec"
+#define CROS_EC_DEV_FP_NAME "cros_fp"
#define CROS_EC_DEV_ISH_NAME "cros_ish"
#define CROS_EC_DEV_PD_NAME "cros_pd"

--
2.20.1

2019-04-08 09:44:32

by Enric Balletbo i Serra

[permalink] [raw]
Subject: [PATCH v3 1/4] mfd: cros_ec: Update the EC feature codes

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 <[email protected]>
---

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 +++++++++++++++++++++++++++-
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))
--
2.20.1

2019-04-08 10:29:28

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] mfd: cros_ec: instantiate properly CrOS ISH MCU device

On Mon, Apr 08, 2019 at 11:41:39AM +0200, Enric Balletbo i Serra wrote:
> From: Rushikesh S Kadam <[email protected]>
>
> Integrated Sensor Hub (ISH) is also a MCU running EC
> having feature bit EC_FEATURE_ISH. Instantiate it as
> a special CrOS EC device with device name 'cros_ish'.

> Reviewed-by: Andy Shevchenko <[email protected]>

> Changes in v3:
> - Fix Andy Shevchenko email.

I'm not sure what it means.
I'm using @linux.intel.com for OSS work.

--
With Best Regards,
Andy Shevchenko


2019-04-08 10:40:53

by Enric Balletbo i Serra

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] mfd: cros_ec: instantiate properly CrOS ISH MCU device



On 8/4/19 12:28, Andy Shevchenko wrote:
> On Mon, Apr 08, 2019 at 11:41:39AM +0200, Enric Balletbo i Serra wrote:
>> From: Rushikesh S Kadam <[email protected]>
>>
>> Integrated Sensor Hub (ISH) is also a MCU running EC
>> having feature bit EC_FEATURE_ISH. Instantiate it as
>> a special CrOS EC device with device name 'cros_ish'.
>
>> Reviewed-by: Andy Shevchenko <[email protected]>
>
>> Changes in v3:
>> - Fix Andy Shevchenko email.
>

The fix was s/andry/andriy/ For some reason I missed an 'i' in your name and the
email obviously bounced for your address.

> I'm not sure what it means.
> I'm using @linux.intel.com for OSS work.
>

Seems that you used [email protected] instead, see:

https://lore.kernel.org/patchwork/patch/1047022/

The part that says:

FWIW,
Reviewed-by: Andy Shevchenko <[email protected]>


2019-04-08 12:40:16

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] mfd: cros_ec: instantiate properly CrOS ISH MCU device

On Mon, Apr 08, 2019 at 12:39:48PM +0200, Enric Balletbo i Serra wrote:
> On 8/4/19 12:28, Andy Shevchenko wrote:
> > On Mon, Apr 08, 2019 at 11:41:39AM +0200, Enric Balletbo i Serra wrote:
> >> From: Rushikesh S Kadam <[email protected]>
> >>
> >> Integrated Sensor Hub (ISH) is also a MCU running EC
> >> having feature bit EC_FEATURE_ISH. Instantiate it as
> >> a special CrOS EC device with device name 'cros_ish'.
> >
> >> Reviewed-by: Andy Shevchenko <[email protected]>
> >
> >> Changes in v3:
> >> - Fix Andy Shevchenko email.
> >
>
> The fix was s/andry/andriy/ For some reason I missed an 'i' in your name and the
> email obviously bounced for your address.
>
> > I'm not sure what it means.
> > I'm using @linux.intel.com for OSS work.
> >
>
> Seems that you used [email protected] instead, see:

Oh, that's my mistake. I guess, the original mail had my @intel.com instead of
@linux.intel.com and I blindly copied that.

>
> https://lore.kernel.org/patchwork/patch/1047022/
>
> The part that says:
>
> FWIW,
> Reviewed-by: Andy Shevchenko <[email protected]>

--
With Best Regards,
Andy Shevchenko


2019-04-08 18:58:08

by Benson Leung

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] mfd: cros_ec: instantiate properly CrOS FP MCU device

Hi Enric,

On Mon, Apr 08, 2019 at 11:41:40AM +0200, Enric Balletbo i Serra wrote:
> Support Fingerprint MCU as a special of CrOS EC devices. The current FP
> MCU uses the same EC SPI protocol v3 as other CrOS EC devices on a SPI
> bus.
>
> When a MCU has fingerprint support (aka EC_FEATURE_FINGERPRINT), it is
> instantiated as a special CrOS EC device with device name 'cros_fp'. So
> regardless of the probing order between the actual cros_ec and cros_fp,
> the userspace and other kernel drivers should not confuse them.
>
> Signed-off-by: Vincent Palatin <[email protected]>
> Signed-off-by: Enric Balletbo i Serra <[email protected]>

Reviewed-by: Benson Leung <[email protected]>

> ---
>
> Changes in v3: None
> Changes in v2: None
>
> drivers/mfd/cros_ec_dev.c | 10 ++++++++++
> include/linux/mfd/cros_ec.h | 1 +
> 2 files changed, 11 insertions(+)
>
> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
> index 1daccd4e05a3..79746e817cdb 100644
> --- a/drivers/mfd/cros_ec_dev.c
> +++ b/drivers/mfd/cros_ec_dev.c
> @@ -636,6 +636,16 @@ static int ec_device_probe(struct platform_device *pdev)
> device_initialize(&ec->class_dev);
> cdev_init(&ec->cdev, &fops);
>
> + /* Check whether this is actually a Fingerprint MCU rather than an EC */
> + if (cros_ec_check_features(ec, EC_FEATURE_FINGERPRINT)) {
> + dev_info(dev, "CrOS Fingerprint MCU detected.\n");
> + /*
> + * Help userspace differentiating ECs from FP MCU,
> + * regardless of the probing order.
> + */
> + ec_platform->ec_name = CROS_EC_DEV_FP_NAME;
> + }
> +
> /*
> * Check whether this is actually an Integrated Sensor Hub (ISH)
> * rather than an EC.
> diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
> index ce50628aa5e7..b393bd4e4b73 100644
> --- a/include/linux/mfd/cros_ec.h
> +++ b/include/linux/mfd/cros_ec.h
> @@ -23,6 +23,7 @@
> #include <linux/mutex.h>
>
> #define CROS_EC_DEV_NAME "cros_ec"
> +#define CROS_EC_DEV_FP_NAME "cros_fp"
> #define CROS_EC_DEV_ISH_NAME "cros_ish"
> #define CROS_EC_DEV_PD_NAME "cros_pd"
>
> --
> 2.20.1
>

--
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]


Attachments:
(No filename) (2.26 kB)
signature.asc (849.00 B)
Download all attachments

2019-04-08 20:35:32

by Benson Leung

[permalink] [raw]
Subject: Re: [PATCH v3 4/4] mfd: cros_ec: instantiate properly CrOS Touchpad MCU device

Hi Enric,

On Mon, Apr 08, 2019 at 11:41:41AM +0200, Enric Balletbo i Serra wrote:
> Support Touchpad MCU as a special of CrOS EC devices. The current
> Touchpad MCU is used on Eve Chromebook and used the same protocol as
> other CrOS EC devices.
>
> When a MCU has touchpad support (aka EC_FEATURE_TOUCHPAD), it is
> instantiated as a special CrOS EC device with device name 'cros_tp'. So
> regardless of the probing order between the actual cros_ec and cros_tp,
> the userspace and other kernel drivers should not confuse them.
>
> Signed-off-by: Wei-Ning Huang <[email protected]>
> Signed-off-by: Enric Balletbo i Serra <[email protected]>

Reviewed-by: Benson Leung <[email protected]>

> ---
>
> Changes in v3: None
> Changes in v2: None
>
> drivers/mfd/cros_ec_dev.c | 10 ++++++++++
> include/linux/mfd/cros_ec.h | 1 +
> 2 files changed, 11 insertions(+)
>
> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
> index 79746e817cdb..be827910e9d0 100644
> --- a/drivers/mfd/cros_ec_dev.c
> +++ b/drivers/mfd/cros_ec_dev.c
> @@ -659,6 +659,16 @@ static int ec_device_probe(struct platform_device *pdev)
> ec_platform->ec_name = CROS_EC_DEV_ISH_NAME;
> }
>
> + /* Check whether this is actually a Touchpad MCU rather than an EC */
> + if (cros_ec_check_features(ec, EC_FEATURE_TOUCHPAD)) {
> + dev_info(dev, "CrOS Touchpad MCU detected.\n");
> + /*
> + * Help userspace differentiating ECs from TP MCU,
> + * regardless of the probing order.
> + */
> + ec_platform->ec_name = CROS_EC_DEV_TP_NAME;
> + }
> +
> /*
> * Add the class device
> * Link to the character device for creating the /dev entry
> diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
> index b393bd4e4b73..981381fbb3fd 100644
> --- a/include/linux/mfd/cros_ec.h
> +++ b/include/linux/mfd/cros_ec.h
> @@ -26,6 +26,7 @@
> #define CROS_EC_DEV_FP_NAME "cros_fp"
> #define CROS_EC_DEV_ISH_NAME "cros_ish"
> #define CROS_EC_DEV_PD_NAME "cros_pd"
> +#define CROS_EC_DEV_TP_NAME "cros_tp"
>
> /*
> * The EC is unresponsive for a time after a reboot command. Add a
> --
> 2.20.1
>

--
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]


Attachments:
(No filename) (2.28 kB)
signature.asc (849.00 B)
Download all attachments

2019-05-08 08:16:49

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v3 0/4] mfd: cros_ec: Instantiate CrOS FP, TP and ISH devices

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

> Hi Lee,
>
> The reason I'm sending this patch series is to clarify the build
> dependencies of the following patches:
>
> [PATCH 1/2] mfd: cros_ec: instantiate properly CrOS FP MCU device
> [PATCH 2/2] mfd: cros_ec: instantiate properly CrOS Touchpad MCU device
>
> and I also included this patch in the series:
>
> [v3] mfd: cros_ec: instantiate properly CrOS ISH MCU device
>
> The first version depends on:
>
> - mfd: cros: Update EC protocol to match current EC code
> - https://lore.kernel.org/patchwork/patch/1046363

This patch is yet to be resubmitted (requested 5 weeks ago).

Please resubmit this set once the dependency has been applied.

--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2019-05-08 13:22:25

by Lee Jones

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

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 <[email protected]>
> ---
>
> 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