diff options
author | Simon Glass <sjg@chromium.org> | 2021-06-04 13:34:10 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-09 18:35:50 +0000 |
commit | 6c1928b5a03691231cfc961902326485d5a33e8a (patch) | |
tree | ab8a91c5152b92d1384c534bf2c25c4bd585a757 | |
parent | 935deb921a4bddfe840f568de5a57843827e31cd (diff) | |
download | chrome-ec-6c1928b5a03691231cfc961902326485d5a33e8a.tar.gz |
Create a public header for it83xx
Add a separate public header for this chip so we can include it from
Zephyr.
Drop the #ifdef since the linker will give an error if the function is
missing.
BUG=b:189855648
BRANCH=none
TEST=make BOARD=hayato -j30
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ic4c755da2b576d6cd3465cfd803dfb0e4ad0fbef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941810
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | driver/tcpm/it83xx_pd.h | 7 | ||||
-rw-r--r-- | include/driver/tcpm/it8xxx2_pd_public.h | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/driver/tcpm/it83xx_pd.h b/driver/tcpm/it83xx_pd.h index 561d3a9418..c3efb7e150 100644 --- a/driver/tcpm/it83xx_pd.h +++ b/driver/tcpm/it83xx_pd.h @@ -7,6 +7,8 @@ #ifndef __CROS_EC_DRIVER_TCPM_IT83XX_H #define __CROS_EC_DRIVER_TCPM_IT83XX_H +#include "driver/tcpm/it8xxx2_pd_public.h" + /* USBPD Controller */ #if defined(CONFIG_USB_PD_TCPM_DRIVER_IT83XX) #define IT83XX_USBPD_BASE(port) (0x00F03700 + (0x100 * (port))) @@ -423,13 +425,8 @@ struct cc_para_t { }; extern const struct usbpd_ctrl_t usbpd_ctrl_regs[]; -#if defined(CONFIG_USB_PD_TCPM_DRIVER_IT83XX) -extern const struct tcpm_drv it83xx_tcpm_drv; -#elif defined(CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2) -extern const struct tcpm_drv it8xxx2_tcpm_drv; void it8xxx2_clear_tx_error_status(enum usbpd_port port); void it8xxx2_get_tx_error_status(enum usbpd_port port); -#endif void it83xx_Rd_5_1K_only_for_hibernate(int port); void switch_plug_out_type(enum usbpd_port port); /* diff --git a/include/driver/tcpm/it8xxx2_pd_public.h b/include/driver/tcpm/it8xxx2_pd_public.h new file mode 100644 index 0000000000..6ad11a9555 --- /dev/null +++ b/include/driver/tcpm/it8xxx2_pd_public.h @@ -0,0 +1,12 @@ +/* Copyright 2021 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_DRIVER_TCPM_IT8XXX2_PD_PUBLIC_H +#define __CROS_EC_DRIVER_TCPM_IT8XXX2_PD_PUBLIC_H + +extern const struct tcpm_drv it83xx_tcpm_drv; +extern const struct tcpm_drv it8xxx2_tcpm_drv; + +#endif /* __CROS_EC_DRIVER_TCPM_IT8XXX2_PD_PUBLIC_H */ |