From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Olof Johansson <olof@lixom.net>
Cc: Lee Jones <lee.jones@linaro.org>,
Doug Anderson <dianders@chromium.org>,
Bill Richardson <wfrichar@chromium.org>,
Simon Glass <sjg@google.com>,
Gwendal Grignou <gwendal@google.com>,
Stephen Barber <smbarber@chromium.org>,
Filipe Brandenburger <filbranden@google.com>,
Todd Broch <tbroch@chromium.org>,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: [RESEND PATCH 0/8] cros_ec: Add multiple EC and protocol v3 support
Date: Mon, 6 Apr 2015 18:14:58 +0200 [thread overview]
Message-ID: <1428336906-14906-1-git-send-email-javier.martinez@collabora.co.uk> (raw)
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
next reply other threads:[~2015-04-06 16:15 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 16:14 Javier Martinez Canillas [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428336906-14906-1-git-send-email-javier.martinez@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=dianders@chromium.org \
--cc=filbranden@google.com \
--cc=gwendal@google.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=sjg@google.com \
--cc=smbarber@chromium.org \
--cc=tbroch@chromium.org \
--cc=wfrichar@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®