mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
usb_i2c: Remove usb_i2c_board_enable/disable
These functions are not used by usb_i2c.c on chip/stm32, let's move them to board/cr50 which is the only place where they are used. BRANCH=none BUG=None TEST=make buildall -j Change-Id: I8c1b292838b8dbee9a9001add9332e0add80c342 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/778749 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
b38792b78b
commit
cd1f377f16
@@ -274,6 +274,9 @@ void board_reboot_ap(void);
|
||||
int board_wipe_tpm(void);
|
||||
int board_is_first_factory_boot(void);
|
||||
|
||||
int usb_i2c_board_enable(void);
|
||||
void usb_i2c_board_disable(void);
|
||||
|
||||
void print_ap_state(void);
|
||||
void print_ec_state(void);
|
||||
void print_servo_state(void);
|
||||
|
||||
@@ -54,8 +54,7 @@ const void *const usb_strings[] = {
|
||||
BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT);
|
||||
|
||||
/******************************************************************************
|
||||
* Support I2C bridging over USB, this requires usb_i2c_board_enable and
|
||||
* usb_i2c_board_disable to be defined to enable and disable the I2C bridge.
|
||||
* Support I2C bridging over USB.
|
||||
*/
|
||||
|
||||
#ifdef SECTION_IS_RW
|
||||
@@ -78,9 +77,6 @@ const struct pwm_t pwm_channels[] = {
|
||||
};
|
||||
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
|
||||
|
||||
int usb_i2c_board_enable(void) { return EC_SUCCESS; }
|
||||
void usb_i2c_board_disable(void) {}
|
||||
|
||||
int usb_i2c_board_is_enabled(void)
|
||||
{
|
||||
/* Disable I2C passthrough when the system is locked */
|
||||
|
||||
@@ -236,8 +236,7 @@ void usb_spi_board_disable(struct usb_spi_config const *config)
|
||||
USB_SPI_CONFIG(usb_spi, USB_IFACE_SPI, USB_EP_SPI);
|
||||
|
||||
/******************************************************************************
|
||||
* Support I2C bridging over USB, this requires usb_i2c_board_enable and
|
||||
* usb_i2c_board_disable to be defined to enable and disable the SPI bridge.
|
||||
* Support I2C bridging over USB.
|
||||
*/
|
||||
|
||||
/* I2C ports */
|
||||
|
||||
@@ -176,8 +176,7 @@ BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT);
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Support I2C bridging over USB, this requires usb_i2c_board_enable and
|
||||
* usb_i2c_board_disable to be defined to enable and disable the SPI bridge.
|
||||
* Support I2C bridging over USB.
|
||||
*/
|
||||
|
||||
/* I2C ports */
|
||||
|
||||
@@ -99,8 +99,7 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Support I2C bridging over USB, this requires usb_i2c_board_enable and
|
||||
* usb_i2c_board_disable to be defined to enable and disable the SPI bridge.
|
||||
* Support I2C bridging over USB.
|
||||
*/
|
||||
|
||||
/* I2C ports */
|
||||
@@ -110,8 +109,6 @@ const struct i2c_port_t i2c_ports[] = {
|
||||
};
|
||||
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
|
||||
|
||||
int usb_i2c_board_enable(void) {return EC_SUCCESS; }
|
||||
void usb_i2c_board_disable(void) {}
|
||||
int usb_i2c_board_is_enabled(void) { return 1; }
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -155,18 +155,6 @@ void usb_i2c_deferred(struct usb_i2c_config const *config);
|
||||
* and to return the current board enable state.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enable the I2C device
|
||||
*
|
||||
* @return EC_SUCCESS or non-zero error code.
|
||||
*/
|
||||
int usb_i2c_board_enable(void);
|
||||
|
||||
/**
|
||||
* Disable the I2C device
|
||||
*/
|
||||
void usb_i2c_board_disable(void);
|
||||
|
||||
/**
|
||||
* Check if the I2C device is enabled
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user