Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1497350 > unrolled thread

[PATCH/RFT 05/12] USB: ohci-da8xx: Fix probe for devices with no vbus/oci gpio

Started byahaslam@baylibre.com
First post2016-10-07 18:50 +0200
Last post2016-10-07 18:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH/RFT 05/12] USB: ohci-da8xx: Fix probe for devices with no vbus/oci gpio ahaslam@baylibre.com - 2016-10-07 18:50 +0200

#1497350 — [PATCH/RFT 05/12] USB: ohci-da8xx: Fix probe for devices with no vbus/oci gpio

Fromahaslam@baylibre.com
Date2016-10-07 18:50 +0200
Subject[PATCH/RFT 05/12] USB: ohci-da8xx: Fix probe for devices with no vbus/oci gpio
Message-ID<spGvp-3aK-67@gated-at.bofh.it>
From: Axel Haslam <ahaslam@baylibre.com>

Some boards dont have gpios assigened for vbus or oci.

Allow these boards to enumerate usb without declaring the set_power
and/or the ocic_notify callbacks in platform data.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
---
 drivers/usb/host/ohci-da8xx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 3c85d6c..9d9f8e3 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -215,7 +215,7 @@ static int ohci_da8xx_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 				temp ? "Set" : "Clear", wIndex, "POWER");
 
 			if (!pdata->set_power)
-				return -EPIPE;
+				return 0;
 
 			return pdata->set_power(wIndex, temp) ? -EPIPE : 0;
 		case USB_PORT_FEAT_C_OVER_CURRENT:
@@ -343,10 +343,12 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
 
 	if (pdata->ocic_notify) {
 		error = pdata->ocic_notify(ohci_da8xx_ocic_handler);
-		if (!error)
-			return 0;
+		if (error)
+			goto err_notify;
 	}
 
+	return 0;
+err_notify:
 	usb_remove_hcd(hcd);
 err:
 	usb_put_hcd(hcd);
-- 
2.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web