Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d327ab5b authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Felipe Balbi
Browse files

usb: gadget: replace usb_gadget::is_dualspeed with max_speed



This commit replaces usb_gadget's is_dualspeed field with
a max_speed field.

[ balbi@ti.com : Fixed DWC3 driver ]

Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 7aac8d15
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -535,6 +535,20 @@ Why: In 3.0, we can now autodetect internal 3G device and already have
	information log when acer-wmi initial.
Who:    Lee, Chun-Yi <jlee@novell.com>

---------------------------

What:	/sys/devices/platform/_UDC_/udc/_UDC_/is_dualspeed file and
	is_dualspeed line in /sys/devices/platform/ci13xxx_*/udc/device file.
When:	3.8
Why:	The is_dualspeed file is superseded by maximum_speed in the same
	directory and is_dualspeed line in device file is superseded by
	max_speed line in the same file.

	The maximum_speed/max_speed specifies maximum speed supported by UDC.
	To check if dualspeeed is supported, check if the value is >= 3.
	Various possible speeds are defined in <linux/usb/ch9.h>.
Who:	Michal Nazarewicz <mina86@mina86.com>

----------------------------

What:	The XFS nodelaylog mount option
+1 −1
Original line number Diff line number Diff line
@@ -1986,7 +1986,7 @@ int __devinit dwc3_gadget_init(struct dwc3 *dwc)
	dev_set_name(&dwc->gadget.dev, "gadget");

	dwc->gadget.ops			= &dwc3_gadget_ops;
	dwc->gadget.is_dualspeed	= true;
	dwc->gadget.max_speed		= USB_SPEED_SUPER;
	dwc->gadget.speed		= USB_SPEED_UNKNOWN;
	dwc->gadget.dev.parent		= dwc->dev;

+1 −1
Original line number Diff line number Diff line
@@ -3349,7 +3349,7 @@ static int udc_probe(struct udc *dev)
	dev_set_name(&dev->gadget.dev, "gadget");
	dev->gadget.dev.release = gadget_release;
	dev->gadget.name = name;
	dev->gadget.is_dualspeed = 1;
	dev->gadget.max_speed = USB_SPEED_HIGH;

	/* init registers, interrupts, ... */
	startup_registers(dev);
+1 −1
Original line number Diff line number Diff line
@@ -1038,7 +1038,7 @@ static struct usba_udc the_udc = {
	.gadget	= {
		.ops		= &usba_udc_ops,
		.ep_list	= LIST_HEAD_INIT(the_udc.gadget.ep_list),
		.is_dualspeed	= 1,
		.max_speed	= USB_SPEED_HIGH,
		.name		= "atmel_usba_udc",
		.dev	= {
			.init_name	= "gadget",
+5 −2
Original line number Diff line number Diff line
@@ -766,8 +766,11 @@ static ssize_t show_device(struct device *dev, struct device_attribute *attr,

	n += scnprintf(buf + n, PAGE_SIZE - n, "speed             = %d\n",
		       gadget->speed);
	n += scnprintf(buf + n, PAGE_SIZE - n, "max_speed         = %d\n",
		       gadget->max_speed);
	/* TODO: Scheduled for removal in 3.8. */
	n += scnprintf(buf + n, PAGE_SIZE - n, "is_dualspeed      = %d\n",
		       gadget->is_dualspeed);
		       gadget_is_dualspeed(gadget));
	n += scnprintf(buf + n, PAGE_SIZE - n, "is_otg            = %d\n",
		       gadget->is_otg);
	n += scnprintf(buf + n, PAGE_SIZE - n, "is_a_peripheral   = %d\n",
@@ -2880,7 +2883,7 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev,

	udc->gadget.ops          = &usb_gadget_ops;
	udc->gadget.speed        = USB_SPEED_UNKNOWN;
	udc->gadget.is_dualspeed = 1;
	udc->gadget.max_speed    = USB_SPEED_HIGH;
	udc->gadget.is_otg       = 0;
	udc->gadget.name         = driver->name;

Loading