All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abel Vesa <abel.vesa@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 02/22] usb: ehci-mx6: Make regulator DM_REGULATOR dependent
Date: Wed, 30 Jan 2019 13:39:52 +0000	[thread overview]
Message-ID: <1548855578-12529-3-git-send-email-abel.vesa@nxp.com> (raw)
In-Reply-To: <1548855578-12529-1-git-send-email-abel.vesa@nxp.com>

Do the regulator related work only if the build has the DM_REGULATOR.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/usb/host/ehci-mx6.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 1acf08d..9483947 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -404,6 +404,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
 	if (ret)
 		return ret;
 
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	if (priv->vbus_supply) {
 		ret = regulator_set_enable(priv->vbus_supply,
 					   (type == USB_INIT_DEVICE) ?
@@ -413,6 +414,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
 			return ret;
 		}
 	}
+#endif
 
 	if (type == USB_INIT_DEVICE)
 		return 0;
@@ -514,15 +516,17 @@ static int ehci_usb_probe(struct udevice *dev)
 	priv->portnr = dev->seq;
 	priv->init_type = type;
 
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	ret = device_get_supply_regulator(dev, "vbus-supply",
 					  &priv->vbus_supply);
 	if (ret)
 		debug("%s: No vbus supply\n", dev->name);
-
+#endif
 	ret = ehci_mx6_common_init(ehci, priv->portnr);
 	if (ret)
 		return ret;
 
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	if (priv->vbus_supply) {
 		ret = regulator_set_enable(priv->vbus_supply,
 					   (type == USB_INIT_DEVICE) ?
@@ -532,6 +536,7 @@ static int ehci_usb_probe(struct udevice *dev)
 			return ret;
 		}
 	}
+#endif
 
 	if (priv->init_type == USB_INIT_HOST) {
 		setbits_le32(&ehci->usbmode, CM_HOST);
-- 
2.7.4

  parent reply	other threads:[~2019-01-30 13:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 13:39 [U-Boot] [PATCH v3 00/22] mx6sabre: Add DM and SPL FIT support Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 01/22] usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE Abel Vesa
2019-01-30 13:39 ` Abel Vesa [this message]
2019-01-30 13:39 ` [U-Boot] [PATCH v3 03/22] configs: imx6sabreauto: Add DM_MMC support Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 04/22] configs: imx6sabreauto: Add DM_USB support Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 05/22] mmc: fsl_esdhc: Fix DM_REGULATOR ifdefs for SPL builds Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 06/22] board: mx6sabresd: Add board_fit_config_name_match to support FIT in SPL Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 07/22] board: mx6sabreauto: " Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 08/22] arm: dts: Add all the imx6[q|qp|dl] sabre[auto|sd] u-boot dts[i] files Abel Vesa
2019-01-30 13:39 ` [U-Boot] [PATCH v3 09/22] arm: dts: Update all the dts[i] files for imx6[q|qp|dl] sabre[auto|sd] Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 10/22] arm: imx: Add FIT SPL its Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 11/22] configs: mx6sabreauto: Add SPL FIT and DM support Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 12/22] configs: mx6sabresd: " Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 13/22] mx6sabreauto: Add DM_GPIO support Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 14/22] mx6sabresd: " Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 15/22] configs: mx6sabreauto: Add DM_SPI_FLASH necessary configs Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 16/22] configs: mx6sabresd: " Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 17/22] board: mx6sabreauto: Remove the non-DM code Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 18/22] board: mx6sabresd: Remove " Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 19/22] board: mx6sabresd: Remove the enet reset gpio handling Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 20/22] configs: mx6sabresd: Reduce size for SPL by disabling SPL_DOS and SPL_EFI Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 21/22] board: mx6sabreauto: Update README with the SPL DM FIT info Abel Vesa
2019-01-30 13:40 ` [U-Boot] [PATCH v3 22/22] board: mx6sabresd: " Abel Vesa
2019-01-30 18:58 ` [U-Boot] [PATCH v3 00/22] mx6sabre: Add DM and SPL FIT support Tom Rini
2019-01-31 12:59   ` Abel Vesa
2019-01-31 14:41     ` Tom Rini
2019-01-31 15:13       ` Abel Vesa
2019-01-31 15:45         ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548855578-12529-3-git-send-email-abel.vesa@nxp.com \
    --to=abel.vesa@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.