summaryrefslogtreecommitdiff
path: root/board/reef_it8320/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/reef_it8320/board.c')
-rw-r--r--board/reef_it8320/board.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c
index 92fdc66806..db5bf728fd 100644
--- a/board/reef_it8320/board.c
+++ b/board/reef_it8320/board.c
@@ -66,10 +66,20 @@ const struct adc_t adc_channels[] = {
BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
const struct i2c_port_t i2c_ports[] = {
- {"mux", IT83XX_I2C_CH_C, 400,
- GPIO_EC_I2C_C_SCL, GPIO_EC_I2C_C_SDA},
- {"batt", IT83XX_I2C_CH_E, 100,
- GPIO_EC_I2C_E_SCL, GPIO_EC_I2C_E_SDA},
+ {
+ .name = "mux",
+ .port = IT83XX_I2C_CH_C,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_C_SCL,
+ .sda = GPIO_EC_I2C_C_SDA
+ },
+ {
+ .name = "batt",
+ .port = IT83XX_I2C_CH_E,
+ .kbps = 100,
+ .scl = GPIO_EC_I2C_E_SCL,
+ .sda = GPIO_EC_I2C_E_SDA
+ },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
@@ -111,7 +121,8 @@ const enum gpio_signal hibernate_wake_pins[] = {
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
static void it83xx_tcpc_update_hpd_status(const struct usb_mux *me,
- mux_state_t mux_state)
+ mux_state_t mux_state,
+ bool *ack_required)
{
int hpd_lvl = (mux_state & USB_PD_MUX_HPD_LVL) ? 1 : 0;
int hpd_irq = (mux_state & USB_PD_MUX_HPD_IRQ) ? 1 : 0;
@@ -119,6 +130,9 @@ static void it83xx_tcpc_update_hpd_status(const struct usb_mux *me,
me->usb_port ? GPIO_USB_C1_HPD_1P8_ODL
: GPIO_USB_C0_HPD_1P8_ODL;
+ /* This driver does not use host command ACKs */
+ *ack_required = false;
+
hpd_lvl = !hpd_lvl;
gpio_set_level(gpio, hpd_lvl);