chrome platform changes for v4.21
Changes for EC_MKBP_EVENT_SENSOR_FIFO handling. Also, maintainership changes. Olofj out, Enric balletbo in. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6gYDF28Li+nEiKLaHwn1ewov5lgFAlwucOAACgkQHwn1ewov 5lhuzA//VHzRpU+9DntQ1N8PWBzEH4+AX1nJSUh18CQ0h9dkHP/34vd5b5ZKZogY kwBAvfylxJnMYyTEoLa6y+Cvdy+YqGg5ltx41ZTxIF3nMKTvgLCKIxjWurrg9+Ip DLJ6NuhSyJfXnKigJW/E5j/1J8fL9xpJDvzQh0psfK37NZiHeQb6tDaKJ8gWNm0O KLrz+PWaKWJICoJIJtdTE/bplxneQNySVoA7xWKC++2cJMrbjCOg4PomHH20sGqR sCQNmpJU/ntVqPNnRuuOpW4tcF+Ua1gZnkdp6QXaJNFrgtG0JNwyiQk9Q5PA3Mhd /6GEv1TZWJK0b4T9urDQOypbN0t9VWBp/12SaGKbGOhC9MQEYiihOGzVBxJljKml KuWke6AoKr3JVAjItoSaplJy2u47sZ4sYlkqxSDrklGatP58l2i72Un3Z+xO9b1z 9tz6X2hSRJHWZ/DwE7l9v63cHlSkEVEHuZRS2bDv23VRCLEwFmX43346ACCCRJFQ Ei+/npGQB0bBjHgpBUHMt5YpHt0dlzqRTLoGrUgTmxKR9KiinPmM/0Ks0/G0ZRGg Kygv71y9lL1Npf2rERLCdMgsp0cOaQ+ykv1JsfNIlbAWeSjhEDre5G0DS6cOZmT4 dZ7D4nh9ERBHv/5jiqvGaU5HWyU9LFhYFXe882KF9BV9wgFLrXk= =fyvk -----END PGP SIGNATURE----- Merge tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome platform updates from Benson Leung: - Changes for EC_MKBP_EVENT_SENSOR_FIFO handling. - Also, maintainership changes. Olofj out, Enric balletbo in. * tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: MAINTAINERS: add maintainers for ChromeOS EC sub-drivers MAINTAINERS: platform/chrome: Add Enric as a maintainer MAINTAINERS: platform/chrome: remove myself as maintainer platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes
This commit is contained in:
Коммит
12133258d7
11
MAINTAINERS
11
MAINTAINERS
|
@ -3674,11 +3674,20 @@ F: drivers/input/touchscreen/chipone_icn8505.c
|
|||
|
||||
CHROME HARDWARE PLATFORM SUPPORT
|
||||
M: Benson Leung <bleung@chromium.org>
|
||||
M: Olof Johansson <olof@lixom.net>
|
||||
M: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
|
||||
F: drivers/platform/chrome/
|
||||
|
||||
CHROMEOS EC SUBDRIVERS
|
||||
M: Benson Leung <bleung@chromium.org>
|
||||
M: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
||||
R: Guenter Roeck <groeck@chromium.org>
|
||||
S: Maintained
|
||||
N: cros_ec
|
||||
N: cros-ec
|
||||
F: drivers/power/supply/cros_usbpd-charger.c
|
||||
|
||||
CIRRUS LOGIC AUDIO CODEC DRIVERS
|
||||
M: Brian Austin <brian.austin@cirrus.com>
|
||||
M: Paul Handrigan <Paul.Handrigan@cirrus.com>
|
||||
|
|
|
@ -575,12 +575,13 @@ static int get_keyboard_state_event(struct cros_ec_device *ec_dev)
|
|||
|
||||
int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event)
|
||||
{
|
||||
u8 event_type;
|
||||
u32 host_event;
|
||||
int ret;
|
||||
|
||||
if (!ec_dev->mkbp_event_supported) {
|
||||
ret = get_keyboard_state_event(ec_dev);
|
||||
if (ret < 0)
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
|
||||
if (wake_event)
|
||||
|
@ -590,15 +591,26 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event)
|
|||
}
|
||||
|
||||
ret = get_next_event(ec_dev);
|
||||
if (ret < 0)
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
|
||||
if (wake_event) {
|
||||
event_type = ec_dev->event_data.event_type;
|
||||
host_event = cros_ec_get_host_event(ec_dev);
|
||||
|
||||
/* Consider non-host_event as wake event */
|
||||
*wake_event = !host_event ||
|
||||
!!(host_event & ec_dev->host_event_wake_mask);
|
||||
/*
|
||||
* Sensor events need to be parsed by the sensor sub-device.
|
||||
* Defer them, and don't report the wakeup here.
|
||||
*/
|
||||
if (event_type == EC_MKBP_EVENT_SENSOR_FIFO)
|
||||
*wake_event = false;
|
||||
/* Masked host-events should not count as wake events. */
|
||||
else if (host_event &&
|
||||
!(host_event & ec_dev->host_event_wake_mask))
|
||||
*wake_event = false;
|
||||
/* Consider all other events as wake events. */
|
||||
else
|
||||
*wake_event = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -317,7 +317,9 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev);
|
|||
* @wake_event: Pointer to a bool set to true upon return if the event might be
|
||||
* treated as a wake event. Ignored if null.
|
||||
*
|
||||
* Return: 0 on success or negative error code.
|
||||
* Return: negative error code on errors; 0 for no data; or else number of
|
||||
* bytes received (i.e., an event was retrieved successfully). Event types are
|
||||
* written out to @ec_dev->event_data.event_type on success.
|
||||
*/
|
||||
int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
|
||||
|
||||
|
@ -329,7 +331,7 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
|
|||
* events raised and call the functions in the ec notifier. This function
|
||||
* is a helper to know which events are raised.
|
||||
*
|
||||
* Return: 0 on success or negative error code.
|
||||
* Return: 0 on error or non-zero bitmask of one or more EC_HOST_EVENT_*.
|
||||
*/
|
||||
u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче