diff options
author | Dino Li <dino.li@ite.com.tw> | 2015-11-16 11:23:38 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-17 22:06:49 -0800 |
commit | edae3db119fae83a151400ae2142ad6805c71ad3 (patch) | |
tree | ce09d74f34b1db25f61c90a1a1742d340b6f125c /chip/it83xx/i2c.c | |
parent | f0489dc275f8782365b89cdd9db956e7b78018be (diff) | |
download | chrome-ec-edae3db119fae83a151400ae2142ad6805c71ad3.tar.gz |
it8380dev: improve power consumption
In doze mode, these improvements help reduce EC power consumption.
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=Power consumption has reduced.
Change-Id: I8b0fe3301e408134284b4ac5778656ba9b92b0f1
Reviewed-on: https://chromium-review.googlesource.com/312632
Commit-Ready: Dino Li <dino.li@ite.com.tw>
Tested-by: Dino Li <dino.li@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/it83xx/i2c.c')
-rw-r--r-- | chip/it83xx/i2c.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chip/it83xx/i2c.c b/chip/it83xx/i2c.c index d9e8bbde0a..d2aac92604 100644 --- a/chip/it83xx/i2c.c +++ b/chip/it83xx/i2c.c @@ -107,12 +107,13 @@ static const struct i2c_pin i2c_pin_regs[] = { struct i2c_ctrl_t { uint8_t irq; + enum clock_gate_offsets clock_gate; }; const struct i2c_ctrl_t i2c_ctrl_regs[] = { - {IT83XX_IRQ_SMB_A}, - {IT83XX_IRQ_SMB_B}, - {IT83XX_IRQ_SMB_C}, + {IT83XX_IRQ_SMB_A, CGC_OFFSET_SMBA}, + {IT83XX_IRQ_SMB_B, CGC_OFFSET_SMBB}, + {IT83XX_IRQ_SMB_C, CGC_OFFSET_SMBC}, }; enum i2c_ch_status { @@ -511,6 +512,7 @@ static void i2c_init(void) for (i = 0; i < i2c_ports_used; i++) { /* I2c port mapping. */ p = i2c_ports[i].port; + clock_enable_peripheral(i2c_ctrl_regs[p].clock_gate, 0, 0); /* * bit0, The SMBus host interface is enabled. * bit1, Enable to communicate with I2C device and |