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_PDPHY_H__ 7#define __QCOM_PMIC_PDPHY_H__ 8 9#include <linux/platform_device.h> 10#include <linux/regmap.h> 11 12/* Resources */ 13#define PMIC_PDPHY_MAX_IRQS 0x08 14 15struct pmic_typec_pdphy_irq_params { 16 int virq; 17 char *irq_name; 18}; 19 20struct pmic_typec_pdphy_resources { 21 unsigned int nr_irqs; 22 const struct pmic_typec_pdphy_irq_params irq_params[PMIC_PDPHY_MAX_IRQS]; 23}; 24 25/* API */ 26struct pmic_typec_pdphy; 27 28extern const struct pmic_typec_pdphy_resources pm8150b_pdphy_res; 29int qcom_pmic_typec_pdphy_probe(struct platform_device *pdev, 30 struct pmic_typec *tcpm, 31 const struct pmic_typec_pdphy_resources *res, 32 struct regmap *regmap, 33 u32 base); 34int qcom_pmic_typec_pdphy_stub_probe(struct platform_device *pdev, 35 struct pmic_typec *tcpm); 36 37#endif /* __QCOM_PMIC_TYPEC_PDPHY_H__ */ 38