summaryrefslogtreecommitdiff
path: root/include/usb_pd_dp_ufp.h
blob: 64728d948e2736b1f838db59d84762bea38bd841 (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
34
35
/* Copyright 2021 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/*
 * Common functions for UFP-D devices.
 */

#ifndef __CROS_EC_USB_PD_DP_UFP_H
#define __CROS_EC_USB_PD_DP_UFP_H

struct hpd_to_pd_config_t {
	int port;
	enum gpio_signal signal;
};

extern const struct hpd_to_pd_config_t hpd_config;
/*
 * Function used to handle hpd gpio interrupts.
 *
 * @param signal -> gpio signal associated with hpd interrupt
 */
void usb_pd_hpd_edge_event(int signal);

/*
 * Function used to enable/disable the hpd->dp attention protocol converter
 *    - called with enable when enter mode command is processed.
 *    - called with disable when exit mode command is processed.
 *
 * @param enable -> converter on/off
 */
void usb_pd_hpd_converter_enable(int enable);

#endif  /* __CROS_EC_USB_PD_DP_UFP_H */