diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-30 15:59:04 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-07 04:13:11 +0000 |
commit | f171bb5d3b0749d63e5fa49d0e16faa518fb0347 (patch) | |
tree | 4d507c7fce0a4493edcc10a3c93cc9edee1dddb5 /driver/ppc | |
parent | d8646a8aae7dcd621018472cf8166422f9b66d07 (diff) | |
download | chrome-ec-f171bb5d3b0749d63e5fa49d0e16faa518fb0347.tar.gz |
Create public headers for a few PPC/TCPM drivers
At present boards includes the private header of some of the drivers.
This is not ideal but it works. For Zephyr we don't really want to
access headers in private driver directories.
Instead, create public headers for the five drivers needed by the
Zephyr volteer build. For now, include the public header in the
private header (the one included by the EC code), so that fewer code
changes are required.
BUG=b:175434113
BRANCH=none
TEST=make buildall -j30 (way too verbose to see what is happening)
build volteer on zephyr
Change-Id: I5b810f53cdf545a885f3977849f9f2ca1d04d60a
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607506
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'driver/ppc')
-rw-r--r-- | driver/ppc/sn5s330.h | 20 | ||||
-rw-r--r-- | driver/ppc/syv682x.h | 11 |
2 files changed, 3 insertions, 28 deletions
diff --git a/driver/ppc/sn5s330.h b/driver/ppc/sn5s330.h index 94d0ab0f1e..f94a3e8e10 100644 --- a/driver/ppc/sn5s330.h +++ b/driver/ppc/sn5s330.h @@ -10,6 +10,8 @@ #include "common.h" +#include "driver/ppc/sn5s330_public.h" + struct sn5s330_config { uint8_t i2c_port; uint8_t i2c_addr_flags; @@ -25,11 +27,6 @@ enum sn5s330_pp_idx { SN5S330_PP_COUNT, }; -#define SN5S330_ADDR0_FLAGS 0x40 -#define SN5S330_ADDR1_FLAGS 0x41 -#define SN5S330_ADDR2_FLAGS 0x42 -#define SN5S330_ADDR3_FLAGS 0x43 - #define SN5S330_FUNC_SET1 0x50 #define SN5S330_FUNC_SET2 0x51 #define SN5S330_FUNC_SET3 0x52 @@ -161,17 +158,4 @@ enum sn5s330_pp_idx { */ #define SN5S330_VBUS_GOOD_MASK BIT(0) -extern const struct ppc_drv sn5s330_drv; - -/** - * Interrupt Handler for the SN5S330. - * - * By default, the only interrupt sources that are unmasked are overcurrent - * conditions for PP1, and VBUS_GOOD if PPC is being used to detect VBUS - * (CONFIG_USB_PD_VBUS_DETECT_PPC). - * - * @param port: The Type-C port which triggered the interrupt. - */ -void sn5s330_interrupt(int port); - #endif /* defined(__CROS_EC_SN5S330_H) */ diff --git a/driver/ppc/syv682x.h b/driver/ppc/syv682x.h index 3f6d41b512..a2458cf17c 100644 --- a/driver/ppc/syv682x.h +++ b/driver/ppc/syv682x.h @@ -8,11 +8,7 @@ #ifndef __CROS_EC_SYV682X_H #define __CROS_EC_SYV682X_H -/* I2C addresses */ -#define SYV682X_ADDR0_FLAGS 0x40 -#define SYV682X_ADDR1_FLAGS 0x41 -#define SYV682X_ADDR2_FLAGS 0x42 -#define SYV682x_ADDR3_FLAGS 0x43 +#include "driver/ppc/syv682x_public.h" /* SYV682x register addresses */ #define SYV682X_STATUS_REG 0x00 @@ -97,9 +93,4 @@ #define SYV682X_CONTROL_4_CC_FRS BIT(1) #define SYV682X_CONTROL_4_INT_MASK 0x0c -struct ppc_drv; -extern const struct ppc_drv syv682x_drv; - -void syv682x_interrupt(int port); - #endif /* defined(__CROS_EC_SYV682X_H) */ |