blob: fa25cade4e3792d0a8e1c47012106da06f9e07a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* Copyright 2023 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* HPD GPIO control module
* Note: Stubs of APIs are implemented for linking if feature is not enabled
*/
#ifndef __CROS_EC_USB_DP_HPD_GPIO_H
#define __CROS_EC_USB_DP_HPD_GPIO_H
#ifdef CONFIG_USB_PD_DP_HPD_GPIO
/*
* Informs the AP of HPD activity through at GPIO, including toggling on IRQ if
* necessary.
*
* @param[in] port USB-C port number
* @param[in] level Level of the HPD line
* @param[in] irq IRQ pulse to the AP needed
* @return EC error code
*/
enum ec_error_list dp_hpd_gpio_set(int port, bool level, bool irq);
#else /* else for CONFIG_USB_PD_DP_HPD_GPIO */
static inline enum ec_error_list dp_hpd_gpio_set(int port, bool level, bool irq)
{
return EC_SUCCESS;
}
#endif /* CONFIG_USB_PD_DP_HPD_GPIO */
#endif /* __CROS_EC_USB_DP_HPD_GPIO_H */
|