/* SPDX-License-Identifier: GPL-2.0 */ /* * Platform data for the chipidea USB dual role controller */ #ifndef __LINUX_USB_CHIPIDEA_H #define __LINUX_USB_CHIPIDEA_H #include <linux/extcon.h> #include <linux/usb/otg.h> struct ci_hdrc; /** * struct ci_hdrc_cable - structure for external connector cable state tracking * @connected: true if cable is connected, false otherwise * @changed: set to true when extcon event happen * @enabled: set to true if we've enabled the vbus or id interrupt * @edev: device which generate events * @ci: driver state of the chipidea device * @nb: hold event notification callback * @conn: used for notification registration */ struct ci_hdrc_cable { … }; struct ci_hdrc_platform_data { … }; /* Default offset of capability registers */ #define DEF_CAPOFFSET … /* Add ci hdrc device */ struct platform_device *ci_hdrc_add_device(struct device *dev, struct resource *res, int nres, struct ci_hdrc_platform_data *platdata); /* Remove ci hdrc device */ void ci_hdrc_remove_device(struct platform_device *pdev); /* Get current available role */ enum usb_dr_mode ci_hdrc_query_available_role(struct platform_device *pdev); #endif