summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-10-24 11:18:47 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-25 01:32:15 +0000
commitdf541c6ffdc3ecf2802bad1c235e730cd29f8bfb (patch)
tree5de1078e831ec5e3f3f7437b6e5e8c96b4156a69 /board
parent4a1ecb67f9ff1745422aecdd5cc70a9f630d7dc8 (diff)
downloadchrome-ec-df541c6ffdc3ecf2802bad1c235e730cd29f8bfb.tar.gz
cleanup: rename I2C_PORT_HOST to I2C_PORT_MASTER
Previously, it was really confusing whether I2C_PORT_HOST meant the port where the EC was the master, or the port used to talk to the AP. No functional changes, just a global find/replace and some tidying of unused comments. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; pass unit tests Change-Id: Ia591ba4577d3399729556e0234ba0db3a0e3c5ea Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174546 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/daisy/board.h6
-rw-r--r--board/kirby/board.c2
-rw-r--r--board/kirby/board.h18
-rw-r--r--board/mccroskey/board.h2
-rw-r--r--board/nyan/board.c2
-rw-r--r--board/nyan/board.h20
-rw-r--r--board/pit/board.c2
-rw-r--r--board/pit/board.h19
-rw-r--r--board/puppy/board.c2
-rw-r--r--board/puppy/board.h19
-rw-r--r--board/snow/board.c2
-rw-r--r--board/snow/board.h6
-rw-r--r--board/spring/board.c2
-rw-r--r--board/spring/board.h6
14 files changed, 32 insertions, 76 deletions
diff --git a/board/daisy/board.h b/board/daisy/board.h
index 99fc555a9e..92f998aa5e 100644
--- a/board/daisy/board.h
+++ b/board/daisy/board.h
@@ -47,9 +47,9 @@ enum module_id {
#define KB_OUT_PORT_LIST GPIO_B, GPIO_C
/* Charging */
-#define I2C_PORT_HOST 0 /* Note: some Daisy systems used port 1 */
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
+#define I2C_PORT_MASTER 0 /* Note: some Daisy systems used port 1 */
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
#define I2C_PORT_SLAVE 1
/* Timer selection */
diff --git a/board/kirby/board.c b/board/kirby/board.c
index 3d91057cc3..bfad9648e9 100644
--- a/board/kirby/board.c
+++ b/board/kirby/board.c
@@ -136,7 +136,7 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"host", I2C_PORT_HOST, 100},
+ {"master", I2C_PORT_MASTER, 100},
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/board/kirby/board.h b/board/kirby/board.h
index 1fa62bfa88..592bc8d856 100644
--- a/board/kirby/board.h
+++ b/board/kirby/board.h
@@ -46,20 +46,10 @@ enum module_id {
/* Keyboard output port list */
#define KB_OUT_PORT_LIST GPIO_D
-/*
- * Charging.
- *
- * "HOST" means the port where the EC is the master, which has the battery,
- * charger and PMU.
- *
- * "SLAVE" means the port where the EC is the slave, which has the AP (host
- * processor).
- *
- * TODO: In this context, "host" is badly overloaded and confusing.
- */
-#define I2C_PORT_HOST 0
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
+/* Single I2C port, where the EC is the master. */
+#define I2C_PORT_MASTER 0
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
/* Timer selection */
#define TIM_CLOCK_MSB 2
diff --git a/board/mccroskey/board.h b/board/mccroskey/board.h
index ceee19ce45..9d8ea06eab 100644
--- a/board/mccroskey/board.h
+++ b/board/mccroskey/board.h
@@ -45,7 +45,7 @@ enum module_id {
#define KB_OUT_PORT_LIST GPIO_C
/* EC is I2C master */
-#define I2C_PORT_HOST 0
+#define I2C_PORT_MASTER 0
#define I2C_PORT_SLAVE 0 /* needed for DMAC macros (ugh) */
#define GPIO_I2C2_SCL 0 /* unused, but must be defined anyway */
#define GPIO_I2C2_SDA 0 /* unused, but must be defined anyway */
diff --git a/board/nyan/board.c b/board/nyan/board.c
index caa8ca188b..b158460a07 100644
--- a/board/nyan/board.c
+++ b/board/nyan/board.c
@@ -92,7 +92,7 @@ const int gpio_alt_funcs_count = ARRAY_SIZE(gpio_alt_funcs);
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"host", I2C_PORT_HOST, 100},
+ {"master", I2C_PORT_MASTER, 100},
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/board/nyan/board.h b/board/nyan/board.h
index 6ea63a06dd..c43c664943 100644
--- a/board/nyan/board.h
+++ b/board/nyan/board.h
@@ -38,22 +38,10 @@ enum module_id {
/* Keyboard output port list */
#define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C
-/*
- * Charging.
- *
- * "HOST" means the port where the EC is the master, which has the battery,
- * charger and PMU.
- *
- * "SLAVE" means the port where the EC is the slave, which has the AP (host
- * processor).
- *
- * TODO: In this context, "host" is badly overloaded and confusing.
- */
-#define I2C_PORT_HOST 0
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
-#define I2C_PORT_SLAVE 1
-#define I2C_PORTS_USED 1
+/* Single I2C port, where the EC is the master. */
+#define I2C_PORT_MASTER 0
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
/* Timer selection */
#define TIM_CLOCK_MSB 3
diff --git a/board/pit/board.c b/board/pit/board.c
index b4c5cc0d6e..a54bfac6ba 100644
--- a/board/pit/board.c
+++ b/board/pit/board.c
@@ -107,7 +107,7 @@ const struct battery_temperature_ranges bat_temp_ranges = {
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"host", I2C_PORT_HOST, 100},
+ {"master", I2C_PORT_MASTER, 100},
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/board/pit/board.h b/board/pit/board.h
index c9c82e5048..2f95545e90 100644
--- a/board/pit/board.h
+++ b/board/pit/board.h
@@ -43,21 +43,10 @@ enum module_id {
/* Keyboard output port list */
#define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C
-/*
- * Charging.
- *
- * "HOST" means the port where the EC is the master, which has the battery,
- * charger and PMU.
- *
- * "SLAVE" means the port where the EC is the slave, which has the AP (host
- * processor).
- *
- * TODO: In this context, "host" is badly overloaded and confusing.
- */
-#define I2C_PORT_HOST 0
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
-#define I2C_PORT_SLAVE 1
+/* Single I2C port, where the EC is the master. */
+#define I2C_PORT_MASTER 0
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
/* Charger sense resistors */
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 12
diff --git a/board/puppy/board.c b/board/puppy/board.c
index 970ecc6b8a..0e9e62b429 100644
--- a/board/puppy/board.c
+++ b/board/puppy/board.c
@@ -105,7 +105,7 @@ const struct battery_temperature_ranges bat_temp_ranges = {
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"host", I2C_PORT_HOST, 100},
+ {"master", I2C_PORT_MASTER, 100},
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/board/puppy/board.h b/board/puppy/board.h
index 23d783cdce..79a993dd54 100644
--- a/board/puppy/board.h
+++ b/board/puppy/board.h
@@ -41,21 +41,10 @@ enum module_id {
/* Keyboard output port list */
#define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C
-/*
- * Charging.
- *
- * "HOST" means the port where the EC is the master, which has the battery,
- * charger and PMU.
- *
- * "SLAVE" means the port where the EC is the slave, which has the AP (host
- * processor).
- *
- * TODO: In this context, "host" is badly overloaded and confusing.
- */
-#define I2C_PORT_HOST 0
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
-#define I2C_PORT_SLAVE 1
+/* Single I2C port, where the EC is the master. */
+#define I2C_PORT_MASTER 0
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
/* Timer selection */
#define TIM_CLOCK_MSB 3
diff --git a/board/snow/board.c b/board/snow/board.c
index 8db32d31c1..1ae884830b 100644
--- a/board/snow/board.c
+++ b/board/snow/board.c
@@ -117,7 +117,7 @@ const struct battery_temperature_ranges bat_temp_ranges = {
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"host", I2C_PORT_HOST, 100},
+ {"master", I2C_PORT_MASTER, 100},
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/board/snow/board.h b/board/snow/board.h
index b5cd0b6637..0a29e18a3b 100644
--- a/board/snow/board.h
+++ b/board/snow/board.h
@@ -51,9 +51,9 @@ enum module_id {
#define KB_OUT_PORT_LIST GPIO_B, GPIO_C
/* Charging */
-#define I2C_PORT_HOST 1
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
+#define I2C_PORT_MASTER 1
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
#define I2C_PORT_SLAVE 1
#define GPIO_AP_CLAIM GPIO_SPI1_NSS /* AP claims bus */
diff --git a/board/spring/board.c b/board/spring/board.c
index 51447737f5..13cbeee1f3 100644
--- a/board/spring/board.c
+++ b/board/spring/board.c
@@ -127,7 +127,7 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"host", I2C_PORT_HOST, 100},
+ {"master", I2C_PORT_MASTER, 100},
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/board/spring/board.h b/board/spring/board.h
index 82d86d6034..f2c27605b2 100644
--- a/board/spring/board.h
+++ b/board/spring/board.h
@@ -52,9 +52,9 @@ enum module_id {
#define KB_OUT_PORT_LIST GPIO_B, GPIO_C
/* Charging */
-#define I2C_PORT_HOST 0
-#define I2C_PORT_BATTERY I2C_PORT_HOST
-#define I2C_PORT_CHARGER I2C_PORT_HOST
+#define I2C_PORT_MASTER 0
+#define I2C_PORT_BATTERY I2C_PORT_MASTER
+#define I2C_PORT_CHARGER I2C_PORT_MASTER
#define I2C_PORT_SLAVE 1
/* Low battery threshold. In mAh. */