mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
usb: chipidea: imx: add imx_usbmisc_pullup() hook
It's used to do other pullup related operations if needs. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20250614125645.207732-3-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
78c76554c6
commit
1a76b634da
2 changed files with 19 additions and 0 deletions
|
@ -37,5 +37,6 @@ 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);
|
||||
int imx_usbmisc_pullup(struct imx_usbmisc_data *data, bool on);
|
||||
|
||||
#endif /* __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H */
|
||||
|
|
|
@ -170,6 +170,9 @@ struct usbmisc_ops {
|
|||
int (*charger_detection)(struct imx_usbmisc_data *data);
|
||||
/* It's called when system resume from usb power lost */
|
||||
int (*power_lost_check)(struct imx_usbmisc_data *data);
|
||||
/* It's called when device controller changed pullup status */
|
||||
void (*pullup)(struct imx_usbmisc_data *data, bool on);
|
||||
/* It's called during suspend/resume to save power */
|
||||
void (*vbus_comparator_on)(struct imx_usbmisc_data *data, bool on);
|
||||
};
|
||||
|
||||
|
@ -1225,6 +1228,21 @@ int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(imx_usbmisc_charger_detection);
|
||||
|
||||
int imx_usbmisc_pullup(struct imx_usbmisc_data *data, bool on)
|
||||
{
|
||||
struct imx_usbmisc *usbmisc;
|
||||
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
usbmisc = dev_get_drvdata(data->dev);
|
||||
if (usbmisc->ops->pullup)
|
||||
usbmisc->ops->pullup(data, on);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(imx_usbmisc_pullup);
|
||||
|
||||
int imx_usbmisc_suspend(struct imx_usbmisc_data *data, bool wakeup)
|
||||
{
|
||||
struct imx_usbmisc *usbmisc;
|
||||
|
|
Loading…
Add table
Reference in a new issue