summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2017-11-15 12:59:26 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-16 13:52:03 -0800
commitfe02a5658bb3129cd674835d445ba962457434b7 (patch)
treec970b76287a18ad3253d7f73b3ef292bad8cf734
parentd53185fd744f53724f8f6bcbd3a88180b2c669d0 (diff)
downloadchrome-ec-fe02a5658bb3129cd674835d445ba962457434b7.tar.gz
meowth: zoombini: Annotate ifdefs.
This commit just adds comments to the ifdefs introduced for BOARD_ZOOMBINI. BUG=None BRANCH=None TEST=make -j buildall Change-Id: I036d18bc5b1fb4ebbf0943e630e4931c03b60aa5 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/772909 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/zoombini/board.c26
-rw-r--r--board/zoombini/board.h16
-rw-r--r--board/zoombini/ec.tasklist2
-rw-r--r--board/zoombini/gpio.inc2
-rw-r--r--board/zoombini/usb_pd_policy.c4
5 files changed, 23 insertions, 27 deletions
diff --git a/board/zoombini/board.c b/board/zoombini/board.c
index a9ad3a1ea8..fbebb2ad08 100644
--- a/board/zoombini/board.c
+++ b/board/zoombini/board.c
@@ -57,7 +57,7 @@ const enum gpio_signal hibernate_wake_pins[] = {
};
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
-/* TODO(aaboagye): Add the additional Mewoth temps sensors */
+/* TODO(aaboagye): Add the additional Meowth temps sensors */
const struct adc_t adc_channels[] = {
[ADC_TEMP_SENSOR_SOC] = {
"SOC", NPCX_ADC_CH0, ADC_MAX_VOLT, ADC_READ_MAX+1, 0
@@ -94,7 +94,7 @@ const struct power_signal_info power_signal_list[] = {
{GPIO_PMIC_DPWROK, POWER_SIGNAL_ACTIVE_HIGH, "PMIC_DPWROK"},
#ifdef BOARD_ZOOMBINI
{GPIO_PP5000_PGOOD, POWER_SIGNAL_ACTIVE_HIGH, "PP5000_A_PGOOD"},
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
};
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
@@ -132,9 +132,7 @@ const unsigned int sn5s330_cnt = ARRAY_SIZE(sn5s330_chips);
const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT] = {
GPIO_USB_A_5V_EN,
};
-#endif
-#ifdef BOARD_ZOOMBINI
/* Keyboard scan setting */
struct keyboard_scan_config keyscan_config = {
/* Extra delay when KSO2 is tied to Cr50. */
@@ -149,7 +147,7 @@ struct keyboard_scan_config keyscan_config = {
0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
},
};
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
{
@@ -173,7 +171,7 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
.drv = &tcpci_tcpm_drv,
.pol = TCPC_ALERT_ACTIVE_LOW,
},
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
};
/* The port_addr members are PD port numbers, not I2C port numbers. */
@@ -196,7 +194,7 @@ struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
.driver = &tcpci_tcpm_usb_mux_driver,
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
},
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
};
static void board_chipset_startup(void)
@@ -204,7 +202,7 @@ static void board_chipset_startup(void)
#ifdef BOARD_ZOOMBINI
/* Enable trackpad. */
gpio_set_level(GPIO_EN_PP3300_TRACKPAD, 1);
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/* TODO(aaboagye): Remove Trackpad function in P1 - moved to AP */
}
DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT);
@@ -214,7 +212,7 @@ static void board_chipset_shutdown(void)
#ifdef BOARD_ZOOMBINI
/* Disable trackpad. */
gpio_set_level(GPIO_EN_PP3300_TRACKPAD, 0);
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/* TODO(aaboagye): Remove Trackpad function in P1 - moved to AP */
}
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT);
@@ -224,16 +222,14 @@ static void board_init(void)
#ifdef BOARD_ZOOMBINI
struct charge_port_info chg;
int i;
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/* Enable TCPC interrupts. */
gpio_enable_interrupt(GPIO_USB_C0_PD_INT_L);
gpio_enable_interrupt(GPIO_USB_C1_PD_INT_L);
#ifdef BOARD_ZOOMBINI
gpio_enable_interrupt(GPIO_USB_C2_PD_INT_L);
-#endif
-#ifdef BOARD_ZOOMBINI
/* Initialize VBUS suppliers. */
for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++) {
if (tcpm_get_vbus_level(i)) {
@@ -245,7 +241,7 @@ static void board_init(void)
}
charge_manager_update_charge(CHARGE_SUPPLIER_VBUS, i, &chg);
}
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -320,7 +316,7 @@ int board_set_active_charge_port(int port)
gpio_set_level(GPIO_USB_C1_CHARGE_EN_L, port != 1);
gpio_set_level(GPIO_USB_C2_CHARGE_EN_L, port != 2);
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/*
* TODO(aaboagye): Remove manual charge enabling on P1 -
* switched to sn5s330
@@ -366,7 +362,7 @@ uint16_t tcpc_get_alert_status(void)
#ifdef BOARD_ZOOMBINI
if (!gpio_get_level(GPIO_USB_C2_PD_INT_L))
status |= PD_STATUS_TCPC_ALERT_2;
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
return status;
}
diff --git a/board/zoombini/board.h b/board/zoombini/board.h
index 742bcede9b..81efb09651 100644
--- a/board/zoombini/board.h
+++ b/board/zoombini/board.h
@@ -38,7 +38,7 @@
#ifdef BOARD_ZOOMBINI
#define CONFIG_BC12_DETECT_BQ24392
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
#define CONFIG_CHARGER
#define CONFIG_CHARGER_V2
#define CONFIG_CHARGE_MANAGER
@@ -50,7 +50,7 @@
#ifdef BOARD_ZOOMBINI
#define CONFIG_CHARGE_RAMP_HW
#define CONFIG_USB_CHARGER
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
#define CONFIG_CHIPSET_CANNONLAKE
#define CONFIG_CHIPSET_RESET_HOOK
@@ -71,7 +71,7 @@
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_PWM_KBLIGHT
#define CONFIG_SWITCH
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_ALT_MODE
@@ -80,7 +80,7 @@
#define CONFIG_USB_PD_PORT_COUNT 3
#else
#define CONFIG_USB_PD_PORT_COUNT 2
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
#define CONFIG_USB_PD_DUAL_ROLE
#define CONFIG_USB_PD_LOGGING
/* TODO(aaboagye): What about CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT? */
@@ -100,7 +100,7 @@
#define CONFIG_USB_PORT_POWER_SMART_PORT_COUNT 1
#define CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
#define GPIO_USB1_ILIM_SEL GPIO_USB_A_HIGH_POWER_EN
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/* Define typical operating power and max power. */
#define PD_MAX_VOLTAGE_MV 20000
@@ -148,7 +148,7 @@
#define GPIO_TCPC0_SDA GPIO_I2C5_SDA
#define GPIO_TCPC1_SCL GPIO_I2C1_SCL
#define GPIO_TCPC1_SDA GPIO_I2C1_SDA
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
#define PMIC_I2C_ADDR TPS650X30_I2C_ADDR1
@@ -157,7 +157,7 @@
#else
#define PP5000_PGOOD_POWER_SIGNAL_MASK \
POWER_SIGNAL_MASK(PP5000_PGOOD)
-#endif
+#endif /* defined(BOARD_MEOWTH) */
#ifndef __ASSEMBLER__
@@ -188,7 +188,7 @@ enum power_signal {
X86_PMIC_DPWROK,
#ifdef BOARD_ZOOMBINI
PP5000_PGOOD,
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
POWER_SIGNAL_COUNT
};
diff --git a/board/zoombini/ec.tasklist b/board/zoombini/ec.tasklist
index 024c0fbb52..e1a96a4263 100644
--- a/board/zoombini/ec.tasklist
+++ b/board/zoombini/ec.tasklist
@@ -48,4 +48,4 @@
TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_ALWAYS(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE)
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
diff --git a/board/zoombini/gpio.inc b/board/zoombini/gpio.inc
index e181170371..9851d07943 100644
--- a/board/zoombini/gpio.inc
+++ b/board/zoombini/gpio.inc
@@ -217,4 +217,4 @@ ALTERNATE(PIN_MASK(F, 0x02), 1, MODULE_ADC, 0) /* ADC8 */
ALTERNATE(PIN_MASK(0, 0x03), 1, MODULE_PMU, 0) /* GPIO00, GPIO01 */
ALTERNATE(PIN_MASK(D, 0x04), 1, MODULE_PMU, 0) /* GPIOD2 */
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
diff --git a/board/zoombini/usb_pd_policy.c b/board/zoombini/usb_pd_policy.c
index db7a321957..cec3b32453 100644
--- a/board/zoombini/usb_pd_policy.c
+++ b/board/zoombini/usb_pd_policy.c
@@ -124,7 +124,7 @@ void pd_power_supply_reset(int port)
};
#else
/*TODO(aaboagye): Implement sn5s330 PPC for both Zoombini and Meowth */
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/* Notify host of power info change. */
pd_send_host_event(PD_EVENT_POWER_CHANGE);
@@ -166,7 +166,7 @@ int pd_set_power_supply_ready(int port)
};
#else
/*TODO(aaboagye): Implement sn5s330 PPC for both Zoombini and Meowth */
-#endif
+#endif /* defined(BOARD_ZOOMBINI) */
/* Notify host of power info change. */
pd_send_host_event(PD_EVENT_POWER_CHANGE);