1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
4  * Copyright (c) 2023, Linaro Ltd. All rights reserved.
5  */
6 #ifndef __QCOM_PMIC_TYPEC_PORT_H__
7 #define __QCOM_PMIC_TYPEC_PORT_H__
8 
9 #include <linux/platform_device.h>
10 #include <linux/usb/tcpm.h>
11 
12 /* Resources */
13 #define PMIC_TYPEC_MAX_IRQS				0x08
14 
15 struct pmic_typec_port_irq_params {
16 	int				virq;
17 	char				*irq_name;
18 };
19 
20 struct pmic_typec_port_resources {
21 	unsigned int				nr_irqs;
22 	const struct pmic_typec_port_irq_params	irq_params[PMIC_TYPEC_MAX_IRQS];
23 };
24 
25 /* API */
26 
27 extern const struct pmic_typec_port_resources pm8150b_port_res;
28 
29 int qcom_pmic_typec_port_probe(struct platform_device *pdev,
30 			       struct pmic_typec *tcpm,
31 			       const struct pmic_typec_port_resources *res,
32 			       struct regmap *regmap,
33 			       u32 base);
34 
35 #endif /* __QCOM_PMIC_TYPE_C_PORT_H__ */
36