diff options
Diffstat (limited to 'drivers/usb/chipidea/usbmisc_imx.c')
-rw-r--r-- | drivers/usb/chipidea/usbmisc_imx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index b7d21b052c19..6ed020113926 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -609,6 +609,7 @@ static int usbmisc_imx7d_power_lost_check(struct imx_usbmisc_data *data) /***************************************************************************/ /* imx usb charger detecton */ /***************************************************************************/ +#ifdef CONFIG_POWER_SUPPLY static void usb_charger_is_present(struct usb_charger *charger, bool present) { if (present) @@ -762,7 +763,9 @@ static int usbmisc_imx6sx_power_lost_check(struct imx_usbmisc_data *data) else return 0; } +#endif +#ifdef CONFIG_POWER_SUPPLY static void imx7_disable_charger_detector(struct imx_usbmisc_data *data) { struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); @@ -919,6 +922,7 @@ int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data) return 0; } +#endif static int usbmisc_term_select_override(struct imx_usbmisc_data *data, bool enable, int val) @@ -967,8 +971,10 @@ static const struct usbmisc_ops imx53_usbmisc_ops = { static const struct usbmisc_ops imx6q_usbmisc_ops = { .set_wakeup = usbmisc_imx6q_set_wakeup, .init = usbmisc_imx6q_init, +#ifdef CONFIG_POWER_SUPPLY .charger_primary_detection = imx6_charger_primary_detection, .charger_secondary_detection = imx6_charger_secondary_detection, +#endif .hsic_set_connect = usbmisc_imx6_hsic_set_connect, .hsic_set_clk = usbmisc_imx6_hsic_set_clk, }; @@ -980,9 +986,11 @@ static const struct usbmisc_ops vf610_usbmisc_ops = { static const struct usbmisc_ops imx6sx_usbmisc_ops = { .set_wakeup = usbmisc_imx6q_set_wakeup, .init = usbmisc_imx6sx_init, +#ifdef CONFIG_POWER_SUPPLY .charger_primary_detection = imx6_charger_primary_detection, .charger_secondary_detection = imx6_charger_secondary_detection, .power_lost_check = usbmisc_imx6sx_power_lost_check, +#endif .hsic_set_connect = usbmisc_imx6_hsic_set_connect, .hsic_set_clk = usbmisc_imx6_hsic_set_clk, }; @@ -990,9 +998,11 @@ static const struct usbmisc_ops imx6sx_usbmisc_ops = { static const struct usbmisc_ops imx7d_usbmisc_ops = { .init = usbmisc_imx7d_init, .set_wakeup = usbmisc_imx7d_set_wakeup, +#ifdef CONFIG_POWER_SUPPLY .power_lost_check = usbmisc_imx7d_power_lost_check, .charger_primary_detection = imx7d_charger_primary_detection, .charger_secondary_detection = imx7d_charger_secondary_detection, +#endif .term_select_override = usbmisc_term_select_override, .hsic_set_connect = usbmisc_imx6_hsic_set_connect, .hsic_set_clk = usbmisc_imx6_hsic_set_clk, @@ -1048,6 +1058,7 @@ int imx_usbmisc_set_wakeup(struct imx_usbmisc_data *data, bool enabled) } EXPORT_SYMBOL_GPL(imx_usbmisc_set_wakeup); +#ifdef CONFIG_POWER_SUPPLY int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect) { struct imx_usbmisc *usbmisc; @@ -1099,6 +1110,7 @@ int imx_usbmisc_charger_secondary_detection(struct imx_usbmisc_data *data) return usbmisc->ops->charger_secondary_detection(data); } EXPORT_SYMBOL_GPL(imx_usbmisc_charger_secondary_detection); +#endif int imx_usbmisc_power_lost_check(struct imx_usbmisc_data *data) { |