projects
/
karo-tx-uboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cros_ec: Clean up multiple EC protocol support
[karo-tx-uboot.git]
/
drivers
/
misc
/
cros_ec_spi.c
diff --git
a/drivers/misc/cros_ec_spi.c
b/drivers/misc/cros_ec_spi.c
index
2fc9110
..
ef73782
100644
(file)
--- a/
drivers/misc/cros_ec_spi.c
+++ b/
drivers/misc/cros_ec_spi.c
@@
-42,6
+42,12
@@
int cros_ec_spi_command(struct cros_ec_dev *dev, uint8_t cmd, int cmd_version,
int csum, len;
int rv;
int csum, len;
int rv;
+ if (dev->protocol_version != 2) {
+ debug("%s: Unsupported EC protcol version %d\n",
+ __func__, dev->protocol_version);
+ return -1;
+ }
+
/*
* Sanity-check input size to make sure it plus transaction overhead
* fits in the internal device buffer.
/*
* Sanity-check input size to make sure it plus transaction overhead
* fits in the internal device buffer.