[PATCH 3/3] usb: usb: dsps: update code to reflect recent binding changes

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

 



This relfects the code and dts requires changes due to recent .dts
binding updates:
- use mg prefix for the Metor Graphics specific attributes
- use power in mA not in mA/2 as specifed in the USB2.0 specification

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 arch/arm/boot/dts/am33xx.dtsi | 24 ++++++++++++------------
 drivers/usb/musb/musb_dsps.c  | 13 ++++++++-----
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index a38f8d3..3d03290 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -354,7 +354,7 @@
 				status = "disabled";
 			};
 
-			usb0_phy: phy@47401300 {
+			usb0_phy: usb-phy@47401300 {
 				compatible = "ti,am335x-usb-phy";
 				reg = <0x47401300 0x100>;
 				reg-names = "phy";
@@ -377,11 +377,11 @@
 					reg-names = "mc";
 					interrupts = <18>;
 					interrupt-names = "mc";
-					multipoint = <1>;
-					num-eps = <16>;
-					ram-bits = <12>;
-					port-mode = <3>;
-					power = <250>;
+					mg,multipoint = <1>;
+					mg,num-eps = <16>;
+					mg,ram-bits = <12>;
+					mg,port-mode = <3>;
+					mg,power = <500>;
 					phys = <&usb0_phy>;
 
 				dmas = <&cppi41dma  0 0 &cppi41dma  1 0
@@ -409,7 +409,7 @@
 				};
 			};
 
-			usb1_phy: phy@47401b00 {
+			usb1_phy: usb-phy@47401b00 {
 				compatible = "ti,am335x-usb-phy";
 				reg = <0x47401b00 0x100>;
 				reg-names = "phy";
@@ -432,11 +432,11 @@
 					reg-names = "mc";
 					interrupts = <19>;
 					interrupt-names = "mc";
-					multipoint = <1>;
-					num-eps = <16>;
-					ram-bits = <12>;
-					port-mode = <3>;
-					power = <250>;
+					mg,multipoint = <1>;
+					mg,num-eps = <16>;
+					mg,ram-bits = <12>;
+					mg,port-mode = <3>;
+					mg,power = <500>;
 					phys = <&usb1_phy>;
 
 				dmas = <&cppi41dma 15 0 &cppi41dma 16 0
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 4ffbaac..88ccf99 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -485,11 +485,14 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue,
 	pdata.config = config;
 	pdata.platform_ops = &dsps_ops;
 
-	config->num_eps = get_int_prop(child_node, "num-eps");
-	config->ram_bits = get_int_prop(child_node, "ram-bits");
-	pdata.mode = get_int_prop(child_node, "port-mode");
-	pdata.power = get_int_prop(child_node, "power");
-	config->multipoint = of_property_read_bool(child_node, "multipoint");
+	config->num_eps = get_int_prop(child_node, "mg,num-eps");
+	config->ram_bits = get_int_prop(child_node, "mg,ram-bits");
+	pdata.mode = get_int_prop(child_node, "mg,port-mode");
+	pdata.power = get_int_prop(child_node, "mg,power");
+	config->multipoint = of_property_read_bool(child_node, "mg,multipoint");
+
+	/* DT keeps this entry in mA, musb expects it as per USB spec */
+	pdata.power /= 2;
 
 	ret = platform_device_add_data(musb, &pdata, sizeof(pdata));
 	if (ret) {
-- 
1.8.4.rc2

--
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