summaryrefslogtreecommitdiff
path: root/util/comm-host.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/comm-host.c')
-rw-r--r--util/comm-host.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/comm-host.c b/util/comm-host.c
index 9fc65ab634..ad3d5053d0 100644
--- a/util/comm-host.c
+++ b/util/comm-host.c
@@ -29,6 +29,7 @@ static int command_offset;
int comm_init_dev(const char *device_name) __attribute__((weak));
int comm_init_lpc(void) __attribute__((weak));
int comm_init_i2c(void) __attribute__((weak));
+int comm_init_servo_spi(const char *device_name) __attribute__((weak));
static int fake_readmem(int offset, int bytes, void *dest)
{
@@ -97,6 +98,10 @@ int comm_init(int interfaces, const char *device_name)
!comm_init_dev(device_name))
goto init_ok;
+ if ((interfaces & COMM_SERVO) && comm_init_servo_spi &&
+ !comm_init_servo_spi(device_name))
+ goto init_ok;
+
/* Do not fallback to other communication methods if target is not a
* cros_ec device */
if (strcmp(CROS_EC_DEV_NAME, device_name))