summaryrefslogtreecommitdiff
path: root/board/asurada
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2020-09-01 15:05:01 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-02 08:10:41 +0000
commitf0c06e4996b63b094bb5a31ecf1d23e5ca9cd4ba (patch)
tree3ea83463ca0bbf0cc902740e4ffd517038d6d003 /board/asurada
parent875e1fd518f2d9e4283eb64c72c6fc32606aa2fc (diff)
downloadchrome-ec-f0c06e4996b63b094bb5a31ecf1d23e5ca9cd4ba.tar.gz
asurada: board.c code reorder
Reorder code blocks so functions for the same component can be grouped together. BUG=none TEST=make BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I12f931f9e14d29240081e287edbd982ff2402dbd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2389088 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'board/asurada')
-rw-r--r--board/asurada/board.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/board/asurada/board.c b/board/asurada/board.c
index c7abaf6f61..ee46ff495b 100644
--- a/board/asurada/board.c
+++ b/board/asurada/board.c
@@ -211,20 +211,6 @@ struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{ .drv = &pi3usb9201_drv },
};
-/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
- .output_settle_us = 35,
- .debounce_down_us = 5 * MSEC,
- .debounce_up_us = 40 * MSEC,
- .scan_period_us = 3 * MSEC,
- .min_post_scan_delay_us = 1000,
- .poll_timeout_us = 100 * MSEC,
- .actual_key_mask = {
- 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
- 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
- },
-};
-
static void bc12_interrupt(enum gpio_signal signal)
{
if (signal == GPIO_USB_C0_BC12_INT_ODL)
@@ -244,6 +230,20 @@ static void board_sub_bc12_init(void)
/* Must be done after I2C and subboard */
DECLARE_HOOK(HOOK_INIT, board_sub_bc12_init, HOOK_PRIO_INIT_I2C + 1);
+/* Keyboard scan setting */
+struct keyboard_scan_config keyscan_config = {
+ .output_settle_us = 35,
+ .debounce_down_us = 5 * MSEC,
+ .debounce_up_us = 40 * MSEC,
+ .scan_period_us = 3 * MSEC,
+ .min_post_scan_delay_us = 1000,
+ .poll_timeout_us = 100 * MSEC,
+ .actual_key_mask = {
+ 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
+ 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
+ },
+};
+
/*
* I2C channels (A, B, and C) are using the same timing registers (00h~07h)
* at default.
@@ -366,6 +366,30 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
+uint16_t tcpc_get_alert_status(void)
+{
+ /*
+ * C0 & C1: TCPC is embedded in the EC and processes interrupts in the
+ * chip code (it83xx/intc.c)
+ */
+ return 0;
+}
+
+void board_reset_pd_mcu(void)
+{
+ /*
+ * C0 & C1: TCPC is embedded in the EC and processes interrupts in the
+ * chip code (it83xx/intc.c)
+ */
+}
+
+/* USB-A */
+const int usb_port_enable[] = {
+ GPIO_EN_PP5000_USB_A0_VBUS,
+};
+BUILD_ASSERT(ARRAY_SIZE(usb_port_enable) == USB_PORT_COUNT);
+
+/* USB Mux */
static int board_ps8743_mux_set(const struct usb_mux *me,
mux_state_t mux_state)
{
@@ -394,13 +418,6 @@ static int board_ps8743_mux_set(const struct usb_mux *me,
return ps8743_write(me, PS8743_REG_MODE, reg);
}
-/* USB-A */
-const int usb_port_enable[] = {
- GPIO_EN_PP5000_USB_A0_VBUS,
-};
-BUILD_ASSERT(ARRAY_SIZE(usb_port_enable) == USB_PORT_COUNT);
-
-/* USB Mux */
const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
.usb_port = 0,
@@ -417,23 +434,6 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-uint16_t tcpc_get_alert_status(void)
-{
- /*
- * C0 & C1: TCPC is embedded in the EC and processes interrupts in the
- * chip code (it83xx/intc.c)
- */
- return 0;
-}
-
-void board_reset_pd_mcu(void)
-{
- /*
- * C0 & C1: TCPC is embedded in the EC and processes interrupts in the
- * chip code (it83xx/intc.c)
- */
-}
-
int board_set_active_charge_port(int port)
{
int i;