summaryrefslogtreecommitdiff
path: root/driver/bc12/pi3usb9281.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /driver/bc12/pi3usb9281.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14589.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'driver/bc12/pi3usb9281.h')
-rw-r--r--driver/bc12/pi3usb9281.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/driver/bc12/pi3usb9281.h b/driver/bc12/pi3usb9281.h
deleted file mode 100644
index ca1828f49c..0000000000
--- a/driver/bc12/pi3usb9281.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright 2014 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.
- *
- * Pericom PI3USB9281 USB port switch.
- */
-
-#ifndef __CROS_EC_PI3USB9281_H
-#define __CROS_EC_PI3USB9281_H
-
-#define PI3USB9281_REG_DEV_ID 0x01
-#define PI3USB9281_REG_CONTROL 0x02
-#define PI3USB9281_REG_INT 0x03
-#define PI3USB9281_REG_INT_MASK 0x05
-#define PI3USB9281_REG_DEV_TYPE 0x0a
-#define PI3USB9281_REG_CHG_STATUS 0x0e
-#define PI3USB9281_REG_MANUAL 0x13
-#define PI3USB9281_REG_RESET 0x1b
-#define PI3USB9281_REG_VBUS 0x1d
-
-#define PI3USB9281_DEV_ID 0x10
-#define PI3USB9281_DEV_ID_A 0x18
-
-#define PI3USB9281_CTRL_INT_DIS BIT(0)
-#define PI3USB9281_CTRL_AUTO BIT(2)
-#define PI3USB9281_CTRL_SWITCH_AUTO BIT(4)
-/* Bits 5 thru 7 are read X, write 0 */
-#define PI3USB9281_CTRL_MASK 0x1f
-/* Bits 1 and 3 are read 1, write 1 */
-#define PI3USB9281_CTRL_RSVD_1 0x0a
-
-#define PI3USB9281_PIN_MANUAL_VBUS (3 << 0)
-#define PI3USB9281_PIN_MANUAL_DP BIT(2)
-#define PI3USB9281_PIN_MANUAL_DM BIT(5)
-
-#define PI3USB9281_INT_ATTACH BIT(0)
-#define PI3USB9281_INT_DETACH BIT(1)
-#define PI3USB9281_INT_OVP BIT(5)
-#define PI3USB9281_INT_OCP BIT(6)
-#define PI3USB9281_INT_OVP_OC BIT(7)
-#define PI3USB9281_INT_ATTACH_DETACH (PI3USB9281_INT_ATTACH | \
- PI3USB9281_INT_DETACH)
-
-#define PI3USB9281_TYPE_NONE 0
-#define PI3USB9281_TYPE_MHL BIT(0)
-#define PI3USB9281_TYPE_OTG BIT(1)
-#define PI3USB9281_TYPE_SDP BIT(2)
-#define PI3USB9281_TYPE_CAR BIT(4)
-#define PI3USB9281_TYPE_CDP BIT(5)
-#define PI3USB9281_TYPE_DCP BIT(6)
-
-#define PI3USB9281_CHG_NONE 0
-#define PI3USB9281_CHG_CAR_TYPE1 BIT(1)
-#define PI3USB9281_CHG_CAR_TYPE2 (3 << 0)
-#define PI3USB9281_CHG_APPLE_1A BIT(2)
-#define PI3USB9281_CHG_APPLE_2A BIT(3)
-#define PI3USB9281_CHG_APPLE_2_4A BIT(4)
-/* Check if charge status has any connection */
-#define PI3USB9281_CHG_STATUS_ANY(x) (((x) & 0x1f) > 1)
-
-/* Define configuration of one pi3usb9281 part */
-struct pi3usb9281_config {
- /* i2c port that chip resides on */
- int i2c_port;
- /* GPIO for chip selection in muxed configuration */
- enum gpio_signal mux_gpio;
- /* Logic level of mux_gpio to select chip */
- int mux_gpio_level;
- /* Mutex to lock access to mux gpio or NULL if no mux exists */
- struct mutex *mux_lock;
-};
-
-/* Configuration struct defined at board level */
-extern struct pi3usb9281_config pi3usb9281_chips[];
-
-/* Enable interrupts. */
-int pi3usb9281_enable_interrupts(int port);
-
-/* Get the device type */
-int pi3usb9281_get_device_type(int port);
-
-extern const struct bc12_drv pi3usb9281_drv;
-#endif /* __CROS_EC_PI3USB9281_H */