All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 0/8] cros_ec: Add multiple EC and protocol v3 support
@ 2015-04-06 16:14 Javier Martinez Canillas
  2015-04-06 16:14 ` [RESEND PATCH 1/8] mfd: cros ec: Remove parent field Javier Martinez Canillas
                   ` (8 more replies)
  0 siblings, 9 replies; 36+ messages in thread
From: Javier Martinez Canillas @ 2015-04-06 16:14 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Lee Jones, Doug Anderson, Bill Richardson, Simon Glass,
	Gwendal Grignou, Stephen Barber, Filipe Brandenburger,
	Todd Broch, linux-samsung-soc, linux-kernel,
	Javier Martinez Canillas

Hello,

Newer Chromebooks have more than one Embedded Controller (EC) in the
system. These additional ECs are connected through I2C with a host EC
which is the one that is connected to the Application Processor (AP)
through I2C, SPI or LPC.

So on these platforms, sub-processors are chained to each other:

AP <--> Host EC <--> Power Delivery (PD) EC

The AP sends commands to the additional EC through the host EC using
a set of passthru commands and the host redirects to the correct EC.

This series adds support for multiple EC in a system and also for the
protocol version 3 that is used on newer ECs.

Most patches were taken from the downstream ChromiumOS v3.14 tree with
fixes squashed, split to minimise the cross subsystem churn and changes
for mainline inclusion but were not modified functionality wise.

The series depend on "platform/chrome: Add user-space dev inferface support"
[0] that is already merged in the chrome-platform tree so probably these
patches should also go through that tree once the mfd patches are acked.

The series is a resend of a patch-set posted a month ago [1]. The only big
change besides cleanups and bugfixes is a rework of the cros_ec IOCTL API
as suggested by Gwendal Grignou to use a zero-length for the data buffer to
make the API both 64-bit safe and flexible for variable commands lengths.

The patches were tested on an Exynos5250 Snow, Exynos5420 Peach Pit,
Exynos5800 Peach Pi and x86 Pixel Chromebook using a modified ectool [2]
that uses the new API and no regressions were found.

I don't have access neither to a Chromebook with more than one EC nor one
that supports the protocol version 3 though, so testing on those systems
will be highly appreciated.

The series is composed of the following patches:

Gwendal Grignou (2):
  mfd: cros ec: Remove parent field
  mfd: cros-ec: Support multiple EC in a system

Javier Martinez Canillas (2):
  platform/chrome: cros_ec_lpc - Use existing function to check EC
    result
  mfd: cros_ec: Use a zero-length array for command data

Stephen Barber (3):
  mfd: cros_ec: rev cros_ec_commands.h
  mfd: cros_ec: add proto v3 skeleton
  mfd: cros_ec: add bus-specific proto v3 code

Todd Broch (1):
  mfd: cros_ec: Instantiate sub-devices from device tree

 drivers/i2c/busses/i2c-cros-ec-tunnel.c    |  44 ++--
 drivers/input/keyboard/cros_ec_keyb.c      |  27 +-
 drivers/mfd/cros_ec.c                      | 386 ++++++++++++++++++++++++----
 drivers/mfd/cros_ec_i2c.c                  | 169 ++++++++++++-
 drivers/mfd/cros_ec_spi.c                  | 390 ++++++++++++++++++++++++-----
 drivers/platform/chrome/cros_ec_dev.c      |  53 ++--
 drivers/platform/chrome/cros_ec_lightbar.c | 165 +++++++-----
 drivers/platform/chrome/cros_ec_lpc.c      |  98 ++++++--
 drivers/platform/chrome/cros_ec_sysfs.c    | 149 ++++++-----
 include/linux/mfd/cros_ec.h                |  36 ++-
 include/linux/mfd/cros_ec_commands.h       | 277 ++++++++++++++++++--
 11 files changed, 1477 insertions(+), 317 deletions(-)

Patches #1 and #2 are just small cleanups.

Patch #3 allows the driver to instantiate sub-devices defined in DT instead
of using a fixed list of mfd cells.

Patch #4 modifies the struct cros_ec_command to use a zero-length array for
the buffer used for EC input and output data.

Patch #5 adds support to make multiple EC have a different device id and
also exposing a per EC character device interface.

Patch #6 synchronises the cros_ec_commands.h with a newer version of the
file in the EC firmware repository.

Patch #7 adds the EC host command protocol v3 support to the cros_ec driver
and patch #8 adds the bus specific proto v3 support for I2C, SPI and LPC.

Best regards,
Javier

[0]: https://lkml.org/lkml/2015/2/2/214
[1]: https://lkml.org/lkml/2015/3/12/621
[2]: http://cgit.collabora.com/git/user/javier/ec.git/log/?h=mainline-ioctl-zero-length

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2015-05-09  1:38 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-06 16:14 [RESEND PATCH 0/8] cros_ec: Add multiple EC and protocol v3 support Javier Martinez Canillas
2015-04-06 16:14 ` [RESEND PATCH 1/8] mfd: cros ec: Remove parent field Javier Martinez Canillas
2015-04-23 20:15   ` Gwendal Grignou
2015-04-29 10:37     ` Lee Jones
2015-05-05  9:06       ` Javier Martinez Canillas
2015-05-05 10:54         ` Lee Jones
2015-05-09  1:38           ` Javier Martinez Canillas
2015-04-06 16:15 ` [RESEND PATCH 2/8] platform/chrome: cros_ec_lpc - Use existing function to check EC result Javier Martinez Canillas
2015-04-26  1:33   ` Gwendal Grignou
2015-04-06 16:15 ` [RESEND PATCH 3/8] mfd: cros_ec: Instantiate sub-devices from device tree Javier Martinez Canillas
2015-04-26  1:34   ` Gwendal Grignou
2015-04-29 10:39   ` Lee Jones
2015-05-05  9:21     ` Javier Martinez Canillas
2015-05-05 10:53       ` Lee Jones
2015-05-05 10:57         ` Javier Martinez Canillas
2015-04-06 16:15 ` [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data Javier Martinez Canillas
2015-04-16  9:45   ` Heiko Stübner
2015-04-16  9:55     ` Javier Martinez Canillas
2015-04-24  5:19   ` Gwendal Grignou
2015-05-05 15:53     ` Javier Martinez Canillas
2015-04-24 20:29   ` Gwendal Grignou
2015-05-05 15:57     ` Javier Martinez Canillas
2015-04-06 16:15 ` [RESEND PATCH 5/8] mfd: cros-ec: Support multiple EC in a system Javier Martinez Canillas
2015-04-23 23:54   ` Gwendal Grignou
2015-05-05 15:40     ` Javier Martinez Canillas
2015-04-06 16:15 ` [RESEND PATCH 6/8] mfd: cros_ec: rev cros_ec_commands.h Javier Martinez Canillas
2015-04-26  1:35   ` Gwendal Grignou
2015-04-29 10:45   ` Lee Jones
2015-04-06 16:15 ` [RESEND PATCH 7/8] mfd: cros_ec: add proto v3 skeleton Javier Martinez Canillas
2015-04-26  1:39   ` Gwendal Grignou
2015-05-05 15:59     ` Javier Martinez Canillas
2015-04-06 16:15 ` [RESEND PATCH 8/8] mfd: cros_ec: add bus-specific proto v3 code Javier Martinez Canillas
2015-04-26  1:39   ` Gwendal Grignou
2015-04-16  7:29 ` [RESEND PATCH 0/8] cros_ec: Add multiple EC and protocol v3 support Javier Martinez Canillas
2015-04-16  9:49   ` Heiko Stübner
2015-04-16 10:24     ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.