blob: 9b6dc9848592adcf5d3c3fc05c3c5f274503dee5 (
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 2022 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __INTELRVP_BOARD_H
#define __INTELRVP_BOARD_H
#include "compiler.h"
#include "gpio_signal.h"
#include "stdbool.h"
/* RVP ID read retry count */
#define RVP_VERSION_READ_RETRY_CNT 2
#define DC_JACK_MAX_VOLTAGE_MV 19000
FORWARD_DECLARE_ENUM(tcpc_rp_value);
struct tcpc_aic_gpio_config_t {
/* TCPC interrupt */
enum gpio_signal tcpc_alert;
/* PPC interrupt */
enum gpio_signal ppc_alert;
/* PPC interrupt handler */
void (*ppc_intr_handler)(int port);
};
extern const struct tcpc_aic_gpio_config_t tcpc_aic_gpios[];
void board_charging_enable(int port, int enable);
void board_vbus_enable(int port, int enable);
void board_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp);
void board_dc_jack_interrupt(enum gpio_signal signal);
void tcpc_alert_event(enum gpio_signal signal);
bool is_typec_port(int port);
#endif /* __INTELRVP_BOARD_H */
|