diff options
-rw-r--r-- | zephyr/shim/include/usbc/ppc_aoz1380.h | 5 | ||||
-rw-r--r-- | zephyr/shim/include/usbc/ppc_nx20p348x.h | 9 | ||||
-rw-r--r-- | zephyr/shim/include/usbc/ppc_rt1739.h | 17 | ||||
-rw-r--r-- | zephyr/shim/include/usbc/ppc_sn5s330.h | 9 | ||||
-rw-r--r-- | zephyr/shim/include/usbc/ppc_syv682x.h | 5 | ||||
-rw-r--r-- | zephyr/shim/src/ppc.c | 2 |
6 files changed, 25 insertions, 22 deletions
diff --git a/zephyr/shim/include/usbc/ppc_aoz1380.h b/zephyr/shim/include/usbc/ppc_aoz1380.h index 1ff20b802f..d944fc8eac 100644 --- a/zephyr/shim/include/usbc/ppc_aoz1380.h +++ b/zephyr/shim/include/usbc/ppc_aoz1380.h @@ -8,4 +8,7 @@ #define AOZ1380_COMPAT aoz_aoz1380 /* Note: This chip has no i2c interface */ -#define PPC_CHIP_AOZ1380(id) { .drv = &aoz1380_drv }, +#define PPC_CHIP_AOZ1380(id) \ + { \ + .drv = &aoz1380_drv \ + } diff --git a/zephyr/shim/include/usbc/ppc_nx20p348x.h b/zephyr/shim/include/usbc/ppc_nx20p348x.h index 2d36ab09f6..14336ff215 100644 --- a/zephyr/shim/include/usbc/ppc_nx20p348x.h +++ b/zephyr/shim/include/usbc/ppc_nx20p348x.h @@ -7,7 +7,8 @@ #define NX20P348X_COMPAT nxp_nx20p348x -#define PPC_CHIP_NX20P348X(id) \ - { .i2c_port = I2C_PORT_BY_DEV(id), \ - .i2c_addr_flags = DT_REG_ADDR(id), \ - .drv = &nx20p348x_drv }, +#define PPC_CHIP_NX20P348X(id) \ + { \ + .i2c_port = I2C_PORT_BY_DEV(id), \ + .i2c_addr_flags = DT_REG_ADDR(id), .drv = &nx20p348x_drv \ + } diff --git a/zephyr/shim/include/usbc/ppc_rt1739.h b/zephyr/shim/include/usbc/ppc_rt1739.h index a736ce69e3..c740c1c43a 100644 --- a/zephyr/shim/include/usbc/ppc_rt1739.h +++ b/zephyr/shim/include/usbc/ppc_rt1739.h @@ -7,12 +7,11 @@ #define RT1739_PPC_COMPAT richtek_rt1739_ppc -#define PPC_CHIP_RT1739(id) \ - { \ - .i2c_port = I2C_PORT_BY_DEV(id), \ - .i2c_addr_flags = DT_REG_ADDR(id), \ - .drv = &rt1739_ppc_drv, \ - .frs_en = COND_CODE_1( \ - DT_NODE_HAS_PROP(id, frs_en_gpio), \ - (GPIO_SIGNAL(DT_PHANDLE(id, frs_en_gpio))), (0)), \ - }, +#define PPC_CHIP_RT1739(id) \ + { \ + .i2c_port = I2C_PORT_BY_DEV(id), \ + .i2c_addr_flags = DT_REG_ADDR(id), .drv = &rt1739_ppc_drv, \ + .frs_en = COND_CODE_1( \ + DT_NODE_HAS_PROP(id, frs_en_gpio), \ + (GPIO_SIGNAL(DT_PHANDLE(id, frs_en_gpio))), (0)), \ + } diff --git a/zephyr/shim/include/usbc/ppc_sn5s330.h b/zephyr/shim/include/usbc/ppc_sn5s330.h index 2b70d69e64..eef2fca843 100644 --- a/zephyr/shim/include/usbc/ppc_sn5s330.h +++ b/zephyr/shim/include/usbc/ppc_sn5s330.h @@ -8,7 +8,8 @@ #define SN5S330_COMPAT ti_sn5s330 #define SN5S330_EMUL_COMPAT cros_sn5s330_emul -#define PPC_CHIP_SN5S330(id) \ - { .i2c_port = I2C_PORT_BY_DEV(id), \ - .i2c_addr_flags = DT_REG_ADDR(id), \ - .drv = &sn5s330_drv }, +#define PPC_CHIP_SN5S330(id) \ + { \ + .i2c_port = I2C_PORT_BY_DEV(id), \ + .i2c_addr_flags = DT_REG_ADDR(id), .drv = &sn5s330_drv \ + } diff --git a/zephyr/shim/include/usbc/ppc_syv682x.h b/zephyr/shim/include/usbc/ppc_syv682x.h index 9924e6da5e..87432c2b62 100644 --- a/zephyr/shim/include/usbc/ppc_syv682x.h +++ b/zephyr/shim/include/usbc/ppc_syv682x.h @@ -11,9 +11,8 @@ #define PPC_CHIP_SYV682X(id) \ { \ .i2c_port = I2C_PORT_BY_DEV(id), \ - .i2c_addr_flags = DT_REG_ADDR(id), \ - .drv = &syv682x_drv, \ + .i2c_addr_flags = DT_REG_ADDR(id), .drv = &syv682x_drv, \ .frs_en = COND_CODE_1( \ DT_NODE_HAS_PROP(id, frs_en_gpio), \ (GPIO_SIGNAL(DT_PHANDLE(id, frs_en_gpio))), (0)), \ - }, + } diff --git a/zephyr/shim/src/ppc.c b/zephyr/shim/src/ppc.c index c15c6900b1..f86640540d 100644 --- a/zephyr/shim/src/ppc.c +++ b/zephyr/shim/src/ppc.c @@ -22,7 +22,7 @@ DT_HAS_COMPAT_STATUS_OKAY(SYV682X_EMUL_COMPAT) #define PPC_CHIP_ENTRY(usbc_id, ppc_id, config_fn) \ - [USBC_PORT_NEW(usbc_id)] = config_fn(ppc_id) + [USBC_PORT_NEW(usbc_id)] = config_fn(ppc_id), #define CHECK_COMPAT(compat, usbc_id, ppc_id, config_fn) \ COND_CODE_1(DT_NODE_HAS_COMPAT(ppc_id, compat), \ |