summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorRobert Zieba <robertzieba@google.com>2023-03-07 18:21:40 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-16 21:14:24 +0000
commit05e6455edf607a585a654d9eb791a7d74ef3cc6b (patch)
tree41c263ec8d883ee97b88838b6490f335809cb31a /driver
parentc92120e39891f34ab485adc99ecf51e15940e13e (diff)
downloadchrome-ec-05e6455edf607a585a654d9eb791a7d74ef3cc6b.tar.gz
zephyr/emul: Add ANX7483 emulator
Add ANX7483 emulator and associated tests. BRANCH=none BUG=b:247151116 TEST=Ran tests Change-Id: Idd56a90e58c6d482556d92446aa0659a6a1b8105 Signed-off-by: Robert Zieba <robertzieba@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4322379 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/retimer/anx7483.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/driver/retimer/anx7483.c b/driver/retimer/anx7483.c
index f04a71a1a3..3cb840dfa5 100644
--- a/driver/retimer/anx7483.c
+++ b/driver/retimer/anx7483.c
@@ -181,18 +181,19 @@ static struct anx7483_tuning_set anx7483_dock_flip[] = {
{ ANX7483_DTX2_PORT_CFG3_REG, ANX7483_CFG3_90Ohm_IN },
};
-static inline int anx7483_read(const struct usb_mux *me, uint8_t reg, int *val)
+test_export_static int anx7483_read(const struct usb_mux *me, uint8_t reg,
+ int *val)
{
return i2c_read8(me->i2c_port, me->i2c_addr_flags, reg, val);
}
-static inline int anx7483_write(const struct usb_mux *me, uint8_t reg,
- uint8_t val)
+test_export_static int anx7483_write(const struct usb_mux *me, uint8_t reg,
+ uint8_t val)
{
return i2c_write8(me->i2c_port, me->i2c_addr_flags, reg, val);
}
-static int anx7483_init(const struct usb_mux *me)
+test_export_static int anx7483_init(const struct usb_mux *me)
{
timestamp_t start;
int rv;
@@ -222,8 +223,8 @@ static int anx7483_init(const struct usb_mux *me)
return EC_SUCCESS;
}
-static int anx7483_set(const struct usb_mux *me, mux_state_t mux_state,
- bool *ack_required)
+test_export_static int anx7483_set(const struct usb_mux *me,
+ mux_state_t mux_state, bool *ack_required)
{
int reg;
int val;
@@ -265,7 +266,8 @@ static int anx7483_set(const struct usb_mux *me, mux_state_t mux_state,
return anx7483_write(me, ANX7483_ANALOG_STATUS_CTRL_REG, reg);
}
-static int anx7483_get(const struct usb_mux *me, mux_state_t *mux_state)
+test_export_static int anx7483_get(const struct usb_mux *me,
+ mux_state_t *mux_state)
{
int reg;