summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/usbc/tcpc_ccgxxf.h
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/shim/include/usbc/tcpc_ccgxxf.h')
-rw-r--r--zephyr/shim/include/usbc/tcpc_ccgxxf.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/zephyr/shim/include/usbc/tcpc_ccgxxf.h b/zephyr/shim/include/usbc/tcpc_ccgxxf.h
index 566fed03d6..0c02cf6846 100644
--- a/zephyr/shim/include/usbc/tcpc_ccgxxf.h
+++ b/zephyr/shim/include/usbc/tcpc_ccgxxf.h
@@ -1,4 +1,4 @@
-/* Copyright 2022 The Chromium OS Authors. All rights reserved.
+/* Copyright 2022 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,14 +8,13 @@
#define CCGXXF_TCPC_COMPAT cypress_ccgxxf
-#define TCPC_CONFIG_CCGXXF(id) \
- { \
- .bus_type = EC_BUS_TYPE_I2C, \
- .i2c_info = { \
- .port = I2C_PORT(DT_PHANDLE(id, port)), \
- .addr_flags = DT_STRING_UPPER_TOKEN( \
- id, i2c_addr_flags), \
- }, \
- .drv = &ccgxxf_tcpm_drv, \
- .flags = TCPC_FLAGS_TCPCI_REV2_0, \
+#define TCPC_CONFIG_CCGXXF(id) \
+ { \
+ .bus_type = EC_BUS_TYPE_I2C, \
+ .i2c_info = { \
+ .port = I2C_PORT_BY_DEV(id), \
+ .addr_flags = DT_REG_ADDR(id), \
+ }, \
+ .drv = &ccgxxf_tcpm_drv, \
+ .flags = TCPC_FLAGS_TCPCI_REV2_0, \
},