diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-07 12:24:10 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-09 05:10:59 +0000 |
commit | b1b5659062f4ba8ff7de2df4dcebd339084a90e6 (patch) | |
tree | 796ea02c96dd13bbb864996ca450f47070b5376d /include/driver | |
parent | 2fa27104aa0e97f3c750aa3b04acfc76db5e7123 (diff) | |
download | chrome-ec-b1b5659062f4ba8ff7de2df4dcebd339084a90e6.tar.gz |
Create a public header for pi3usb9201
Add a separate public header for this chip so we can include it from
Zephyr. Update Volteer's usbc_config file to use that header, so it
builds on Zephyr.
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
With a zephyr-chrome CL, build volteer on zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I45bb196a3c6de9bebefd3d06125d1cedd33666a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615619
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include/driver')
-rw-r--r-- | include/driver/bc12/pi3usb9201_public.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/driver/bc12/pi3usb9201_public.h b/include/driver/bc12/pi3usb9201_public.h new file mode 100644 index 0000000000..643952ab4a --- /dev/null +++ b/include/driver/bc12/pi3usb9201_public.h @@ -0,0 +1,28 @@ +/* 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. + */ + +/* PI3USB9201 USB BC 1.2 Charger Detector public definitions */ + +#ifndef __CROS_EC_DRIVER_BC12_PI3USB9201_PUBLIC_H +#define __CROS_EC_DRIVER_BC12_PI3USB9201_PUBLIC_H + +/* I2C address */ +#define PI3USB9201_I2C_ADDR_0_FLAGS 0x5C +#define PI3USB9201_I2C_ADDR_1_FLAGS 0x5D +#define PI3USB9201_I2C_ADDR_2_FLAGS 0x5E +#define PI3USB9201_I2C_ADDR_3_FLAGS 0x5F + +struct pi3usb9201_config_t { + const int i2c_port; + const int i2c_addr_flags; + const int flags; +}; + +/* Configuration struct defined at board level */ +extern const struct pi3usb9201_config_t pi3usb9201_bc12_chips[]; + +extern const struct bc12_drv pi3usb9201_drv; + +#endif /* __CROS_EC_DRIVER_BC12_PI3USB9201_PUBLIC_H */ |