X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=drivers%2Fmisc%2Fcros_ec_spi.c;h=ef73782606e21301a14ba7ae5c500ef5c404db3a;hp=2fc911025eeb5e01c76b9a9ace2eeabc6dbdc149;hb=e8c12662364fbcf5ea917d341f707534c8574900;hpb=836bb6e8277aaa8f0f86e39b0c38b207d32723d9;ds=sidebyside diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c index 2fc911025e..ef73782606 100644 --- 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; + 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.