summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/g/i2cs.c4
-rw-r--r--common/i2c_master.c4
-rw-r--r--include/system.h7
3 files changed, 8 insertions, 7 deletions
diff --git a/chip/g/i2cs.c b/chip/g/i2cs.c
index 6bebd1d784..9aa73d18cb 100644
--- a/chip/g/i2cs.c
+++ b/chip/g/i2cs.c
@@ -273,7 +273,7 @@ void __attribute__((used)) _i2cs_write_complete_int(void)
GWRITE_FIELD(I2CS, INT_STATE, INTR_WRITE_COMPLETE, 1);
/* We're receiving some bytes, so don't sleep */
- disable_sleep(SLEEP_MASK_I2C_SLAVE);
+ disable_sleep(SLEEP_MASK_I2C_PERIPH);
if (write_complete_handler_) {
uint16_t bytes_written;
@@ -330,7 +330,7 @@ void __attribute__((used)) _i2cs_write_complete_int(void)
* disabled again in the next I2CS interrupt.
*/
delay_sleep_by(1 * SECOND);
- enable_sleep(SLEEP_MASK_I2C_SLAVE);
+ enable_sleep(SLEEP_MASK_I2C_PERIPH);
}
DECLARE_IRQ(GC_IRQNUM_I2CS0_INTR_WRITE_COMPLETE_INT,
_i2cs_write_complete_int, 1);
diff --git a/common/i2c_master.c b/common/i2c_master.c
index 399303cc17..c7f8530eac 100644
--- a/common/i2c_master.c
+++ b/common/i2c_master.c
@@ -199,7 +199,7 @@ void i2c_lock(int port, int lock)
i2c_port_active_list |= 1 << port;
/* Ec cannot enter sleep if there's any i2c port active. */
- disable_sleep(SLEEP_MASK_I2C_MASTER);
+ disable_sleep(SLEEP_MASK_I2C_CONTROLLER);
interrupt_enable();
} else {
@@ -208,7 +208,7 @@ void i2c_lock(int port, int lock)
i2c_port_active_list &= ~BIT(port);
/* Once there is no i2c port active, enable sleep bit of i2c. */
if (!i2c_port_active_list)
- enable_sleep(SLEEP_MASK_I2C_MASTER);
+ enable_sleep(SLEEP_MASK_I2C_CONTROLLER);
interrupt_enable();
diff --git a/include/system.h b/include/system.h
index 4862ad2dc0..60a50c6975 100644
--- a/include/system.h
+++ b/include/system.h
@@ -419,14 +419,15 @@ enum {
*/
SLEEP_MASK_AP_RUN = BIT(0), /* the main CPU is running */
SLEEP_MASK_UART = BIT(1), /* UART communication ongoing */
- SLEEP_MASK_I2C_MASTER = BIT(2), /* I2C master communication ongoing */
+ SLEEP_MASK_I2C_CONTROLLER
+ = BIT(2), /* I2C communication ongoing */
SLEEP_MASK_CHARGING = BIT(3), /* Charging loop ongoing */
SLEEP_MASK_USB_PWR = BIT(4), /* USB power loop ongoing */
SLEEP_MASK_USB_PD = BIT(5), /* USB PD device connected */
SLEEP_MASK_SPI = BIT(6), /* SPI communications ongoing */
- SLEEP_MASK_I2C_SLAVE = BIT(7), /* I2C slave communication ongoing */
+ SLEEP_MASK_I2C_PERIPH = BIT(7), /* I2C periph communication ongoing */
SLEEP_MASK_AP_RO_VERIFICATION
- = BIT(8), /* AP RO verification failure. */
+ = BIT(8), /* AP RO verification failure. */
SLEEP_MASK_USB_DEVICE = BIT(9), /* Generic USB device in use */
SLEEP_MASK_PWM = BIT(10), /* PWM output is enabled */
SLEEP_MASK_PHYSICAL_PRESENCE = BIT(11), /* Physical presence