diff options
Diffstat (limited to 'board/wheatley')
-rw-r--r-- | board/wheatley/board.c | 8 | ||||
-rw-r--r-- | board/wheatley/usb_pd_policy.c | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/board/wheatley/board.c b/board/wheatley/board.c index ba6fce0f7f..f8754eae0c 100644 --- a/board/wheatley/board.c +++ b/board/wheatley/board.c @@ -88,10 +88,11 @@ void usb1_evt(enum gpio_signal signal) * state of GPIOs, so its definition must reside after including gpio_list. */ static void enable_input_devices(void); +DECLARE_DEFERRED(enable_input_devices); void tablet_mode_interrupt(enum gpio_signal signal) { - hook_call_deferred(enable_input_devices, 0); + hook_call_deferred(&enable_input_devices_data, 0); } #include "gpio_list.h" @@ -328,14 +329,13 @@ static void enable_input_devices(void) keyboard_scan_enable(kb_enable, KB_SCAN_DISABLE_LID_ANGLE); gpio_set_level(GPIO_ENABLE_TOUCHPAD, tp_enable); } -DECLARE_DEFERRED(enable_input_devices); /* Called on AP S5 -> S3 transition */ static void board_chipset_startup(void) { gpio_set_level(GPIO_USB1_ENABLE, 1); gpio_set_level(GPIO_USB2_ENABLE, 1); - hook_call_deferred(enable_input_devices, 0); + hook_call_deferred(&enable_input_devices_data, 0); } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT); @@ -344,7 +344,7 @@ static void board_chipset_shutdown(void) { gpio_set_level(GPIO_USB1_ENABLE, 0); gpio_set_level(GPIO_USB2_ENABLE, 0); - hook_call_deferred(enable_input_devices, 0); + hook_call_deferred(&enable_input_devices_data, 0); } DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT); diff --git a/board/wheatley/usb_pd_policy.c b/board/wheatley/usb_pd_policy.c index ff88ede3bc..5f0f8c5761 100644 --- a/board/wheatley/usb_pd_policy.c +++ b/board/wheatley/usb_pd_policy.c @@ -299,8 +299,9 @@ static void hpd1_irq_deferred(void) DECLARE_DEFERRED(hpd0_irq_deferred); DECLARE_DEFERRED(hpd1_irq_deferred); -#define PORT_TO_HPD_IRQ_DEFERRED(port) ((port) ? hpd1_irq_deferred : \ - hpd0_irq_deferred) +#define PORT_TO_HPD_IRQ_DEFERRED(port) ((port) ? \ + &hpd1_irq_deferred_data : \ + &hpd0_irq_deferred_data) static int svdm_dp_attention(int port, uint32_t *payload) { |