diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-06-29 10:34:06 +0200 |
---|---|---|
committer | Patrick Delaunay <patrick.delaunay@st.com> | 2020-07-07 16:01:23 +0200 |
commit | 03fb03842a1e16f89477d4a968712cc2422be217 (patch) | |
tree | 419a34f964dfc4aa2d31f89fc74e2c5da89c73cc /board/st/common/stusb160x.h | |
parent | d5d726d3cc47691ace3c68fa31147ad104aaf579 (diff) |
board: st: move type-c stusb1600 controller code in a driver
Migrate the ST Microelectronics STUSB160X Type-C controller code in
a generic I2C driver in st/common, based on Linux one in :
drivers/usb/typec/stusb160x.c
This patch simplifies the stm32mp1 board code and allows to reuse
this STUSB160X driver in other boards.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'board/st/common/stusb160x.h')
-rw-r--r-- | board/st/common/stusb160x.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/st/common/stusb160x.h b/board/st/common/stusb160x.h new file mode 100644 index 0000000000..fe39840b41 --- /dev/null +++ b/board/st/common/stusb160x.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2020, STMicroelectronics + */ + +#ifdef CONFIG_TYPEC_STUSB160X +int stusb160x_cable_connected(void); +#else +int stusb160x_cable_connected(void) { return -ENODEV; } +#endif |