Skip to content

Commit a3ddacb

Browse files
committed
Merge tag 'chrome-platform-for-linus-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform
Pull chrome platform updates from Benson Leung: "Changes in this pull request are around catching up cros_ec with the internal chromeos-kernel versions of cros_ec, cros_ec_lpc, and cros_ec_lightbar. Also, switching maintainership from olof to bleung" * tag 'chrome-platform-for-linus-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: platform/chrome : Add myself as Maintainer platform/chrome: cros_ec_lightbar - hide unused PM functions cros_ec: Don't signal wake event for non-wake host events cros_ec: Fix deadlock when EC is not responsive at probe cros_ec: Don't return error when checking command version platform/chrome: cros_ec_lightbar - Avoid I2C xfer to EC during suspend platform/chrome: cros_ec_lightbar - Add userspace lightbar control bit to EC platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence platform/chrome: cros_ec_lightbar - Add lightbar program feature to sysfs platform/chrome: cros_ec_lpc: Add MKBP events support over ACPI platform/chrome: cros_ec_lpc: Add power management ops platform/chrome: cros_ec_lpc: Add support for GOOG004 ACPI device platform/chrome: cros_ec_lpc: Add support for mec1322 EC platform/chrome: cros_ec_lpc: Add R/W helpers to LPC protocol variants mfd: cros_ec: Add support for dumping panic information cros_ec_debugfs: Pass proper struct sizes to cros_ec_cmd_xfer() mfd: cros_ec: add debugfs, console log file mfd: cros_ec: Add EC console read structures definitions mfd: cros_ec: Add helper for event notifier.
2 parents a018817 + 3c778a7 commit a3ddacb

17 files changed

Lines changed: 1393 additions & 84 deletions

‎MAINTAINERS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3319,9 +3319,10 @@ F: Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
33193319
F: drivers/input/touchscreen/chipone_icn8318.c
33203320

33213321
CHROME HARDWARE PLATFORM SUPPORT
3322+
M: Benson Leung <bleung@chromium.org>
33223323
M: Olof Johansson <olof@lixom.net>
33233324
S: Maintained
3324-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform.git
3325+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git
33253326
F: drivers/platform/chrome/
33263327

33273328
CISCO VIC ETHERNET NIC DRIVER

‎drivers/mfd/cros_ec.c‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,19 @@ static const struct mfd_cell ec_pd_cell = {
5454
static irqreturn_t ec_irq_thread(int irq, void *data)
5555
{
5656
struct cros_ec_device *ec_dev = data;
57+
bool wake_event = true;
5758
int ret;
5859

59-
if (device_may_wakeup(ec_dev->dev))
60+
ret = cros_ec_get_next_event(ec_dev, &wake_event);
61+
62+
/*
63+
* Signal only if wake host events or any interrupt if
64+
* cros_ec_get_next_event() returned an error (default value for
65+
* wake_event is true)
66+
*/
67+
if (wake_event && device_may_wakeup(ec_dev->dev))
6068
pm_wakeup_event(ec_dev->dev, 0);
6169

62-
ret = cros_ec_get_next_event(ec_dev);
6370
if (ret > 0)
6471
blocking_notifier_call_chain(&ec_dev->event_notifier,
6572
0, ec_dev);
@@ -224,7 +231,7 @@ EXPORT_SYMBOL(cros_ec_suspend);
224231

225232
static void cros_ec_drain_events(struct cros_ec_device *ec_dev)
226233
{
227-
while (cros_ec_get_next_event(ec_dev) > 0)
234+
while (cros_ec_get_next_event(ec_dev, NULL) > 0)
228235
blocking_notifier_call_chain(&ec_dev->event_notifier,
229236
1, ec_dev);
230237
}

‎drivers/platform/chrome/Kconfig‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ config CROS_EC_CHARDEV
4949

5050
config CROS_EC_LPC
5151
tristate "ChromeOS Embedded Controller (LPC)"
52-
depends on MFD_CROS_EC && (X86 || COMPILE_TEST)
52+
depends on MFD_CROS_EC && ACPI && (X86 || COMPILE_TEST)
5353
help
5454
If you say Y here, you get support for talking to the ChromeOS EC
5555
over an LPC bus. This uses a simple byte-level protocol with a
@@ -59,6 +59,18 @@ config CROS_EC_LPC
5959
To compile this driver as a module, choose M here: the
6060
module will be called cros_ec_lpc.
6161

62+
config CROS_EC_LPC_MEC
63+
bool "ChromeOS Embedded Controller LPC Microchip EC (MEC) variant"
64+
depends on CROS_EC_LPC
65+
default n
66+
help
67+
If you say Y here, a variant LPC protocol for the Microchip EC
68+
will be used. Note that this variant is not backward compatible
69+
with non-Microchip ECs.
70+
71+
If you have a ChromeOS Embedded Controller Microchip EC variant
72+
choose Y here.
73+
6274
config CROS_EC_PROTO
6375
bool
6476
help

‎drivers/platform/chrome/Makefile‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o
33
obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o
44
cros_ec_devs-objs := cros_ec_dev.o cros_ec_sysfs.o \
5-
cros_ec_lightbar.o cros_ec_vbc.o
5+
cros_ec_lightbar.o cros_ec_vbc.o \
6+
cros_ec_debugfs.o
67
obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_devs.o
7-
obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpc.o
8+
cros_ec_lpcs-objs := cros_ec_lpc.o cros_ec_lpc_reg.o
9+
cros_ec_lpcs-$(CONFIG_CROS_EC_LPC_MEC) += cros_ec_lpc_mec.o
10+
obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpcs.o
811
obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o
912
obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT) += cros_kbd_led_backlight.o

0 commit comments

Comments
 (0)