diff options
author | Ting Shen <phoenixshen@google.com> | 2019-12-16 17:44:57 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-17 12:31:42 +0000 |
commit | 45427c38df049e4506bf42e17d1ccfd303e1380c (patch) | |
tree | d0ceab265367bcfb1e9ebc2d47222749710fe127 /chip/host/build.mk | |
parent | 166c22d05730de961b894d954116439d6ff219e7 (diff) | |
download | chrome-ec-45427c38df049e4506bf42e17d1ccfd303e1380c.tar.gz |
i2c: Support changing I2C bus speed at runtime
Add a i2c_set_freq function and let chip drivers add their underlying
implementation.
Also implemented on stm32f0.
BUG=b:143677811,b:78189419
TEST=1) make
2) On kodama, call i2c_set_freq(1, 100) during init.
verify the bus is configured to 100kbps in kodama rev 1
BRANCH=kukui
Change-Id: Iebb5baacf098b3e5649a4bd8ca14acf097d39693
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1969245
Reviewed-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'chip/host/build.mk')
-rw-r--r-- | chip/host/build.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/host/build.mk b/chip/host/build.mk index f57fe85502..9d77937776 100644 --- a/chip/host/build.mk +++ b/chip/host/build.mk @@ -8,8 +8,9 @@ CORE:=host -chip-y=system.o gpio.o uart.o persistence.o flash.o lpc.o reboot.o i2c.o \ +chip-y=system.o gpio.o uart.o persistence.o flash.o lpc.o reboot.o \ clock.o spi_master.o trng.o + ifndef CONFIG_KEYBOARD_NOT_RAW chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o endif @@ -21,6 +22,8 @@ dirs-y += chip/g/dcrypto endif dirs-y += chip/host/dcrypto +chip-$(CONFIG_I2C)+= i2c.o + chip-$(CONFIG_DCRYPTO)+= dcrypto/aes.o chip-$(CONFIG_DCRYPTO)+= dcrypto/app_cipher.o chip-$(CONFIG_DCRYPTO)+= dcrypto/app_key.o |