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

Commit 35a0e0bf authored by Tatyana Brokhman's avatar Tatyana Brokhman Committed by Greg Kroah-Hartman
Browse files

usb: gadget: add max_speed to usb_composite_driver



This field is used by the Gadget drivers to specify
the maximum speed they support, meaning: the maximum
speed they can provide descriptors for.

The driver speed will be set in consideration of this
value.

[ balbi@ti.com : dropped the ifdeffery ]

Signed-off-by: default avatarTatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9ea35331
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -165,6 +165,7 @@ static struct usb_composite_driver audio_driver = {
	.name		= "g_audio",
	.dev		= &device_desc,
	.strings	= audio_strings,
	.max_speed	= USB_SPEED_HIGH,
	.unbind		= __exit_p(audio_unbind),
};

+1 −0
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@ static struct usb_composite_driver cdc_driver = {
	.name		= "g_cdc",
	.dev		= &device_desc,
	.strings	= dev_strings,
	.max_speed	= USB_SPEED_HIGH,
	.unbind		= __exit_p(cdc_unbind),
};

+2 −0
Original line number Diff line number Diff line
@@ -1386,6 +1386,8 @@ int usb_composite_probe(struct usb_composite_driver *driver,
		driver->iProduct = driver->name;
	composite_driver.function =  (char *) driver->name;
	composite_driver.driver.name = driver->name;
	composite_driver.speed = min((u8)composite_driver.speed,
				     (u8)driver->max_speed);
	composite = driver;
	composite_gadget_bind = bind;

+1 −0
Original line number Diff line number Diff line
@@ -401,6 +401,7 @@ static struct usb_composite_driver eth_driver = {
	.name		= "g_ether",
	.dev		= &device_desc,
	.strings	= dev_strings,
	.max_speed	= USB_SPEED_HIGH,
	.unbind		= __exit_p(eth_unbind),
};

+1 −0
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@ static struct usb_composite_driver gfs_driver = {
	.name		= DRIVER_NAME,
	.dev		= &gfs_dev_desc,
	.strings	= gfs_dev_strings,
	.max_speed	= USB_SPEED_HIGH,
	.unbind		= gfs_unbind,
	.iProduct	= DRIVER_DESC,
};
Loading