[patch 2/5] ulpi: handle ULPI_OTG_CTRL_CHRGVBUS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Current code doesn't handle setting CHRGVBUS when enabling vbus.
Add support for it


Signed-off-by: Arnaud Patard <arnaud.patard@xxxxxxxxxxx>
Index: tst-usb/drivers/usb/otg/ulpi.c
===================================================================
--- tst-usb.orig/drivers/usb/otg/ulpi.c	2010-12-20 15:38:41.000000000 +0100
+++ tst-usb/drivers/usb/otg/ulpi.c	2010-12-20 15:38:57.000000000 +0100
@@ -234,7 +234,8 @@
 {
 	unsigned int flags = otg_io_read(otg, ULPI_OTG_CTRL);
 
-	flags &= ~(ULPI_OTG_CTRL_DRVVBUS | ULPI_OTG_CTRL_DRVVBUS_EXT);
+	flags &= ~(ULPI_OTG_CTRL_DRVVBUS | ULPI_OTG_CTRL_DRVVBUS_EXT |
+			ULPI_OTG_CTRL_CHRGVBUS);
 
 	if (on) {
 		if (otg->flags & ULPI_OTG_DRVVBUS)
@@ -242,6 +243,9 @@
 
 		if (otg->flags & ULPI_OTG_DRVVBUS_EXT)
 			flags |= ULPI_OTG_CTRL_DRVVBUS_EXT;
+
+		if (otg->flags & ULPI_OTG_CHRGVBUS)
+			flags |= ULPI_OTG_CTRL_CHRGVBUS;
 	}
 
 	return otg_io_write(otg, flags, ULPI_OTG_CTRL);


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux