mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
b332d6d5c8
As there maybe more APIs of usbmisc for suspend and resume, group them into imx_usbmisc_suspend/resume. Besides, introduced .power_lost_check API, so that proper resume operations can be performed in power lost case. Signed-off-by: Li Jun <jun.li@nxp.com> Link: https://lore.kernel.org/r/20221013151442.3262951-6-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright 2012 Freescale Semiconductor, Inc.
|
|
*/
|
|
|
|
#ifndef __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H
|
|
#define __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H
|
|
|
|
struct imx_usbmisc_data {
|
|
struct device *dev;
|
|
int index;
|
|
|
|
unsigned int disable_oc:1; /* over current detect disabled */
|
|
|
|
/* true if over-current polarity is active low */
|
|
unsigned int oc_pol_active_low:1;
|
|
|
|
/* true if dt specifies polarity */
|
|
unsigned int oc_pol_configured:1;
|
|
|
|
unsigned int pwr_pol:1; /* power polarity */
|
|
unsigned int evdo:1; /* set external vbus divider option */
|
|
unsigned int ulpi:1; /* connected to an ULPI phy */
|
|
unsigned int hsic:1; /* HSIC controller */
|
|
unsigned int ext_id:1; /* ID from exteranl event */
|
|
unsigned int ext_vbus:1; /* Vbus from exteranl event */
|
|
struct usb_phy *usb_phy;
|
|
enum usb_dr_mode available_role; /* runtime usb dr mode */
|
|
int emp_curr_control;
|
|
int dc_vol_level_adjust;
|
|
};
|
|
|
|
int imx_usbmisc_init(struct imx_usbmisc_data *data);
|
|
int imx_usbmisc_init_post(struct imx_usbmisc_data *data);
|
|
int imx_usbmisc_hsic_set_connect(struct imx_usbmisc_data *data);
|
|
int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect);
|
|
int imx_usbmisc_suspend(struct imx_usbmisc_data *data, bool wakeup);
|
|
int imx_usbmisc_resume(struct imx_usbmisc_data *data, bool wakeup);
|
|
|
|
#endif /* __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H */
|