diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2022-06-24 16:28:25 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-08 03:18:37 +0000 |
commit | a673a273a6a84d6b1df141c3d74d43a0624762f2 (patch) | |
tree | 8effdba5c54d646e26681db8f77500c2fe8f0cb4 | |
parent | 6e3150f30fc5e79728899d080f631fb8c9253f4b (diff) | |
download | chrome-ec-a673a273a6a84d6b1df141c3d74d43a0624762f2.tar.gz |
nx20p348x: expose public header
move i2c device register address and function declarations into
public header.
BUG=b:227359727
TEST=zmake
BRANCH=none
Change-Id: I51c967c53c3052196bc51964a7ca2f7d104a1781
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3721942
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Tested-by: Eric Yilun Lin <yllin@google.com>
-rw-r--r-- | driver/ppc/nx20p348x.h | 21 | ||||
-rw-r--r-- | include/driver/ppc/nx20p348x_public.h | 33 |
2 files changed, 34 insertions, 20 deletions
diff --git a/driver/ppc/nx20p348x.h b/driver/ppc/nx20p348x.h index ebda50da39..5188ea3f76 100644 --- a/driver/ppc/nx20p348x.h +++ b/driver/ppc/nx20p348x.h @@ -9,16 +9,7 @@ #define __CROS_EC_NX20P348X_H #include "common.h" - -#define NX20P3483_ADDR0_FLAGS 0x70 -#define NX20P3483_ADDR1_FLAGS 0x71 -#define NX20P3483_ADDR2_FLAGS 0x72 -#define NX20P3483_ADDR3_FLAGS 0x73 - -#define NX20P3481_ADDR0_FLAGS 0x74 -#define NX20P3481_ADDR1_FLAGS 0x75 -#define NX20P3481_ADDR2_FLAGS 0x76 -#define NX20P3481_ADDR3_FLAGS 0x77 +#include "ppc/nx20p348x_public.h" /* * This PPC hard-codes the over voltage protect of Vbus at 6.8V in dead-battery @@ -121,16 +112,6 @@ #define NX20P348X_INT2_OC_HVSRC BIT(1) #define NX20P348X_INT2_OV_HVSRC BIT(0) -struct ppc_drv; -extern const struct ppc_drv nx20p348x_drv; - -/** - * Interrupt Handler for the NX20P348x. - * - * @param port: The Type-C port which triggered the interrupt. - */ -void nx20p348x_interrupt(int port); - /** * Board override for NX20P348X init. * diff --git a/include/driver/ppc/nx20p348x_public.h b/include/driver/ppc/nx20p348x_public.h new file mode 100644 index 0000000000..e08f010c83 --- /dev/null +++ b/include/driver/ppc/nx20p348x_public.h @@ -0,0 +1,33 @@ +/* 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. + */ + +/* TI NX20P348X USB-C Power Path Controller */ + +#ifndef __CROS_EC_DRIVER_PPC_NX20P348X_PUBLIC_H +#define __CROS_EC_DRIVER_PPC_NX20P348X_PUBLIC_H + +#include "usbc_ppc.h" + +#define NX20P3483_ADDR0_FLAGS 0x70 +#define NX20P3483_ADDR1_FLAGS 0x71 +#define NX20P3483_ADDR2_FLAGS 0x72 +#define NX20P3483_ADDR3_FLAGS 0x73 + +#define NX20P3481_ADDR0_FLAGS 0x74 +#define NX20P3481_ADDR1_FLAGS 0x75 +#define NX20P3481_ADDR2_FLAGS 0x76 +#define NX20P3481_ADDR3_FLAGS 0x77 + +extern const struct ppc_drv nx20p348x_drv; + + +/** + * Interrupt Handler for the NX20P348x. + * + * @param port: The Type-C port which triggered the interrupt. + */ +void nx20p348x_interrupt(int port); + +#endif /* __CROS_EC_DRIVER_PPC_NX20P348X_PUBLIC_H */ |