diff options
author | Yuval Peress <peress@chromium.org> | 2021-05-13 22:47:20 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-14 17:32:09 +0000 |
commit | 483949de5dc234a038e361c562de5b5f4c2bd220 (patch) | |
tree | 526ad1233173605b2105e9e9c711dc2dbf6e6db3 /zephyr/shim/src/i2c.c | |
parent | 81bf98de282dcd11287fc8f5a95cc999437e7597 (diff) | |
download | chrome-ec-483949de5dc234a038e361c562de5b5f4c2bd220.tar.gz |
zephyr: i2c: remove frequency from devicetree
The frequency wasn't actually being used as it was set by the i2c
controller in the proper Zephyr driver. Also, remove the kbps field
in struct i2c_port_t for Zephyr builds to make sure we don't
accidentally use it later on.
BRANCH=none
BUG=none
TEST=build trogdor and volteer
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I2eea231ff629d3e6f0ebbe71923a7b0ae96af87c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2896234
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim/src/i2c.c')
-rw-r--r-- | zephyr/shim/src/i2c.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/zephyr/shim/src/i2c.c b/zephyr/shim/src/i2c.c index c42e9e9e75..9a1b19b61f 100644 --- a/zephyr/shim/src/i2c.c +++ b/zephyr/shim/src/i2c.c @@ -19,17 +19,15 @@ #define I2C_CONFIG_GPIO(id, type) \ DT_ENUM_UPPER_TOKEN(DT_CHILD(DT_CHILD(id, config), type), enum_name) -#define I2C_PORT_INIT(id) \ - COND_CODE_1(DT_NODE_EXISTS(DT_CHILD(id, config)), \ - ( \ - { \ - .name = DT_LABEL(id), \ - .port = I2C_PORT(id), \ - .kbps = DT_PROP(DT_CHILD(id, config), \ - frequency), \ - .scl = I2C_CONFIG_GPIO(id, scl), \ - .sda = I2C_CONFIG_GPIO(id, sda), \ - }, ), \ +#define I2C_PORT_INIT(id) \ + COND_CODE_1(DT_NODE_EXISTS(DT_CHILD(id, config)), \ + ( \ + { \ + .name = DT_LABEL(id), \ + .port = I2C_PORT(id), \ + .scl = I2C_CONFIG_GPIO(id, scl), \ + .sda = I2C_CONFIG_GPIO(id, sda), \ + }, ), \ ()) /* * Long term we will not need these, for now they're needed to get things to |