]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/misc/cros_ec_spi.c
cros_ec: Clean up multiple EC protocol support
[karo-tx-uboot.git] / drivers / misc / cros_ec_spi.c
index 2fc911025eeb5e01c76b9a9ace2eeabc6dbdc149..ef73782606e21301a14ba7ae5c500ef5c404db3a 100644 (file)
@@ -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.