mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
fusb302: Move i2c slave address defines to common header
BUG=None TEST=`make buildall -j` BRANCH=None Change-Id: I51000b3ad32ebef8d19a685b8adbbbe2a42301f5 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/312797 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
edae3db119
commit
7f1baece0a
@@ -9,6 +9,7 @@
|
||||
#include "adc_chip.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "fusb302.h"
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
#include "host_command.h"
|
||||
@@ -33,8 +34,6 @@ const struct i2c_port_t i2c_ports[] = {
|
||||
};
|
||||
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
|
||||
|
||||
#define FUSB302_I2C_SLAVE_ADDR 0x44
|
||||
|
||||
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{STM32_I2C1_PORT, FUSB302_I2C_SLAVE_ADDR},
|
||||
{STM32_I2C2_PORT, FUSB302_I2C_SLAVE_ADDR},
|
||||
|
||||
@@ -10,6 +10,16 @@
|
||||
#ifndef __CROS_EC_DRIVER_TCPM_FUSB302_H
|
||||
#define __CROS_EC_DRIVER_TCPM_FUSB302_H
|
||||
|
||||
/* I2C slave address varies by part number */
|
||||
/* FUSB302BUCX / FUSB302BMPX */
|
||||
#define FUSB302_I2C_SLAVE_ADDR 0x44
|
||||
/* FUSB302B01MPX */
|
||||
#define FUSB302_I2C_SLAVE_ADDR_B01 0x46
|
||||
/* FUSB302B10MPX */
|
||||
#define FUSB302_I2C_SLAVE_ADDR_B10 0x48
|
||||
/* FUSB302B11MPX */
|
||||
#define FUSB302_I2C_SLAVE_ADDR_B11 0x4A
|
||||
|
||||
/* Default retry count for transmitting */
|
||||
#define PD_RETRY_COUNT 3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user