aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.h
blob: 2ca83a46cf3b5d69805f7a9490cbd220dfe71055 (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
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2023, Linaro Ltd. All rights reserved.
 */
#ifndef __QCOM_PMIC_TYPEC_PORT_H__
#define __QCOM_PMIC_TYPEC_PORT_H__

#include <linux/platform_device.h>
#include <linux/usb/tcpm.h>

/* Resources */
#define PMIC_TYPEC_MAX_IRQS				0x08

struct pmic_typec_port_irq_params {
	int				virq;
	char				*irq_name;
};

struct pmic_typec_port_resources {
	unsigned int				nr_irqs;
	const struct pmic_typec_port_irq_params	irq_params[PMIC_TYPEC_MAX_IRQS];
};

/* API */

extern const struct pmic_typec_port_resources pm8150b_port_res;

int qcom_pmic_typec_port_probe(struct platform_device *pdev,
			       struct pmic_typec *tcpm,
			       const struct pmic_typec_port_resources *res,
			       struct regmap *regmap,
			       u32 base);

#endif /* __QCOM_PMIC_TYPE_C_PORT_H__ */