summaryrefslogtreecommitdiff
path: root/drivers/mfd/cros_ec_i2c.c
diff options
context:
space:
mode:
authorStephen Barber <smbarber@chromium.org>2015-06-09 14:04:45 +0300
committerLee Jones <lee.jones@linaro.org>2015-06-15 15:18:21 +0300
commit2c7589af3c4dee844e6a4174f2aa8996cf837604 (patch)
treedaa21a14a2033a96f755af7a487c20b558267393 /drivers/mfd/cros_ec_i2c.c
parent062476f24aa7cf714169342cc50626fd9bbb93da (diff)
downloadlinux-2c7589af3c4dee844e6a4174f2aa8996cf837604.tar.xz
mfd: cros_ec: add proto v3 skeleton
Add support in cros_ec.c to handle EC host command protocol v3. For v3+, probe for maximum shared protocol version and max request, response, and passthrough sizes. For now, this will always fall back to v2, since there is no bus-specific code for handling proto v3 packets. Signed-off-by: Stephen Barber <smbarber@chromium.org> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/cros_ec_i2c.c')
-rw-r--r--drivers/mfd/cros_ec_i2c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c
index fbf7819f5de5..b400bfa2772a 100644
--- a/drivers/mfd/cros_ec_i2c.c
+++ b/drivers/mfd/cros_ec_i2c.c
@@ -143,8 +143,12 @@ static int cros_ec_i2c_probe(struct i2c_client *client,
ec_dev->priv = client;
ec_dev->irq = client->irq;
ec_dev->cmd_xfer = cros_ec_cmd_xfer_i2c;
+ ec_dev->pkt_xfer = NULL;
ec_dev->ec_name = client->name;
ec_dev->phys_name = client->adapter->name;
+ ec_dev->din_size = sizeof(struct ec_host_response) +
+ sizeof(struct ec_response_get_protocol_info);
+ ec_dev->dout_size = sizeof(struct ec_host_request);
err = cros_ec_register(ec_dev);
if (err) {