summaryrefslogtreecommitdiff
path: root/drivers/misc/cros_ec_i2c.c
AgeCommit message (Collapse)Author
2017-02-08cros_ec: i2c: Add support for version 3 of the EC protocolMoritz Fischer
Add support for version 3 of the ec protocol. It basically works by stitching some additional header in front (special command code), and having a result and packet_length stitched on for the reply. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: u-boot@lists.denx.de Acked-by: Simon Glass <sjg@chromium.org> Tested on snow: Tested-by: Simon Glass <sjg@chromium.org>
2017-02-08cros_ec: i2c: Group i2c write / read into single transactionMoritz Fischer
Replace dm_i2c_write() / dm_i2c_read() with transaction using struct i2c_msg[2] in order to allow for i2c controller to detect write/read cycle to emit a repeated start condition. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: u-boot@lists.denx.de Acked-by: Simon Glass <sjg@chromium.org> Tested on snow: Tested-by: Simon Glass <sjg@chromium.org>
2015-04-18cros_ec: exynos: Match up device tree with kernel versionSimon Glass
The U-Boot device trees are slightly different in a few places. Adjust them to remove most of the differences. Note that U-Boot does not support the concept of interrupts as distinct from GPIOs, so this difference remains. For sandbox, use the same keyboard file as for ARM boards and drop the host emulation bus which seems redundant. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-17dm: core: Add dev_get_uclass_priv() to access uclass private dataSimon Glass
Add a convenience function to access the private data that a uclass stores for each of its devices. Convert over most existing uses for consistency and to provide an example for others. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-30dm: cros_ec: Convert cros_ec_i2c over to driver modelSimon Glass
Move this driver to use driver model and update the snow configuration to match. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-03-18cros_ec: Clean up multiple EC protocol supportRandall Spangler
Version 1 protocols (without command version) were already no longer supported in cros_ec.c. This removes some dead code from the cros_ec_i2c driver. Version 2 protcols (with command version) are now called protocol_version=2, instead of cmd_version_is_supported=1. A subsequent change will introduce protocol version 3 for SPI. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Randall Spangler <rspangler@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-06-26cros: add I2C support for cros_ecHung-ying Tyan
This patch adds I2C support for carrying out the cros_ec protocol. Signed-off-by: Randall Spangler <rspangler@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Hung-ying Tyan <tyanh@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>