summaryrefslogtreecommitdiff
path: root/include/usb_retimer.h
blob: 9b750b51bd41097ba0dbfee6b7d4305d5beded6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copyright 2019 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.
 */

/* USB retimer driver */

#ifndef __CROS_EC_USB_RETIMER_H
#define __CROS_EC_USB_RETIMER_H

#include "usb_mux.h"

/**
 * Set USB retimer state
 *
 * @param port Port number.
 * @param mux_state current MUX state
 * @return Non-zero if fail; otherwise, zero.
 */
int retimer_set_state(int port, mux_state_t mux_state);

/**
 * USB retimer enter to low power mode.
 *
 * @param port Port number.
 * @return Non-zero if fail; otherwise, zero.
 */
int retimer_low_power_mode(int port);

/**
 * Initialize USB Retimer to its default state.
 *
 * @param port Port number.
 * @return Non-zero if fail; otherwise, zero.
 */
int retimer_init(int port);

#endif /* __CROS_EC_USB_RETIMER_H */