diff options
Diffstat (limited to 'baseboard/dedede/variant_ec_it8320.c')
-rw-r--r-- | baseboard/dedede/variant_ec_it8320.c | 68 |
1 files changed, 29 insertions, 39 deletions
diff --git a/baseboard/dedede/variant_ec_it8320.c b/baseboard/dedede/variant_ec_it8320.c index 29c7758c6a..37929ceb0b 100644 --- a/baseboard/dedede/variant_ec_it8320.c +++ b/baseboard/dedede/variant_ec_it8320.c @@ -1,4 +1,4 @@ -/* Copyright 2020 The Chromium OS Authors. All rights reserved. +/* Copyright 2020 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -16,7 +16,7 @@ #include "power.h" #include "registers.h" -#define CPRINTUSB(format, args...) cprints(CC_USBCHARGE, format, ## args) +#define CPRINTUSB(format, args...) cprints(CC_USBCHARGE, format, ##args) static void pp3300_a_pgood_low(void) { @@ -75,47 +75,37 @@ BUILD_ASSERT(ARRAY_SIZE(vcmp_list) == VCMP_COUNT); /* I2C Ports */ const struct i2c_port_t i2c_ports[] = { - { - .name = "eeprom", - .port = I2C_PORT_EEPROM, - .kbps = 400, - .scl = GPIO_EC_I2C_EEPROM_SCL, - .sda = GPIO_EC_I2C_EEPROM_SDA - }, - - { - .name = "battery", - .port = I2C_PORT_BATTERY, - .kbps = 100, - .scl = GPIO_EC_I2C_BATTERY_SCL, - .sda = GPIO_EC_I2C_BATTERY_SDA - }, -#ifdef HAS_TASK_MOTIONSENSE - { - .name = "sensor", - .port = I2C_PORT_SENSOR, - .kbps = 400, - .scl = GPIO_EC_I2C_SENSOR_SCL, - .sda = GPIO_EC_I2C_SENSOR_SDA - }, + { .name = "eeprom", + .port = I2C_PORT_EEPROM, + .kbps = 400, + .scl = GPIO_EC_I2C_EEPROM_SCL, + .sda = GPIO_EC_I2C_EEPROM_SDA }, + + { .name = "battery", + .port = I2C_PORT_BATTERY, + .kbps = 100, + .scl = GPIO_EC_I2C_BATTERY_SCL, + .sda = GPIO_EC_I2C_BATTERY_SDA }, +#if defined(HAS_TASK_MOTIONSENSE) || defined(BOARD_SHOTZO) + { .name = "sensor", + .port = I2C_PORT_SENSOR, + .kbps = 400, + .scl = GPIO_EC_I2C_SENSOR_SCL, + .sda = GPIO_EC_I2C_SENSOR_SDA }, #endif #if CONFIG_USB_PD_PORT_MAX_COUNT > 1 - { - .name = "sub_usbc1", - .port = I2C_PORT_SUB_USB_C1, - .kbps = 1000, - .scl = GPIO_EC_I2C_SUB_USB_C1_SCL, - .sda = GPIO_EC_I2C_SUB_USB_C1_SDA - }, + { .name = "sub_usbc1", + .port = I2C_PORT_SUB_USB_C1, + .kbps = 1000, + .scl = GPIO_EC_I2C_SUB_USB_C1_SCL, + .sda = GPIO_EC_I2C_SUB_USB_C1_SDA }, #endif - { - .name = "usbc0", - .port = I2C_PORT_USB_C0, - .kbps = 1000, - .scl = GPIO_EC_I2C_USB_C0_SCL, - .sda = GPIO_EC_I2C_USB_C0_SDA - }, + { .name = "usbc0", + .port = I2C_PORT_USB_C0, + .kbps = 1000, + .scl = GPIO_EC_I2C_USB_C0_SCL, + .sda = GPIO_EC_I2C_USB_C0_SDA }, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); |