summaryrefslogtreecommitdiff
path: root/baseboard/grunt/baseboard.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-10-16 10:43:49 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-11-14 16:56:23 -0800
commit7c6ce54b1a3844440a7350d8baa2f5fe84f4effa (patch)
treefa456b009ddfdc7670da5c5a92356ed61b396fa6 /baseboard/grunt/baseboard.c
parent9634e023470dba161b3a85d5e8344610dcb9eec9 (diff)
downloadchrome-ec-7c6ce54b1a3844440a7350d8baa2f5fe84f4effa.tar.gz
cleanup: updating grunt & octopus style to match
Making style of tcpc_alert_event method match the style of other ToT implementations. BRANCH=grunt BUG=none TEST=octopus pd still works. Change-Id: Id9132380a466b6e9580cff6d014f30e1c11de583 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1283453 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'baseboard/grunt/baseboard.c')
-rw-r--r--baseboard/grunt/baseboard.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c
index 8591501303..1c0d0d55fc 100644
--- a/baseboard/grunt/baseboard.c
+++ b/baseboard/grunt/baseboard.c
@@ -104,18 +104,17 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
void tcpc_alert_event(enum gpio_signal signal)
{
- int port;
+ int port = -1;
- if (signal == GPIO_USB_C0_PD_INT_ODL) {
- if (!gpio_get_level(GPIO_USB_C0_PD_RST_L))
- return;
+ switch (signal) {
+ case GPIO_USB_C0_PD_INT_ODL:
port = 0;
- }
-
- if (signal == GPIO_USB_C1_PD_INT_ODL) {
- if (!gpio_get_level(GPIO_USB_C1_PD_RST_L))
- return;
+ break;
+ case GPIO_USB_C1_PD_INT_ODL:
port = 1;
+ break;
+ default:
+ return;
}
schedule_deferred_pd_interrupt(port);