Revision tags: v3.11-rc6, v3.11-rc5, v3.11-rc4, v3.11-rc3, v3.11-rc2, v3.11-rc1, v3.10, v3.10-rc7, v3.10-rc6, v3.10-rc5, v3.10-rc4, v3.10-rc3, v3.10-rc2, v3.10-rc1, v3.9, v3.9-rc8, v3.9-rc7, v3.9-rc6, v3.9-rc5, v3.9-rc4, v3.9-rc3, v3.9-rc2, v3.9-rc1, v3.8, v3.8-rc7, v3.8-rc6, v3.8-rc5, v3.8-rc4, v3.8-rc3, v3.8-rc2 |
|
#
88af8bbe |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: the start of the configfs interface
|# modprobe dummy_hcd num=2 |# modprobe libcomposite
|# lsmod |Module Size Used by |libcomposite 31648 0 |dummy_hcd
usb: gadget: the start of the configfs interface
|# modprobe dummy_hcd num=2 |# modprobe libcomposite
|# lsmod |Module Size Used by |libcomposite 31648 0 |dummy_hcd 19871 0
|# mkdir /sys/kernel/config/usb_gadget/oha |# cd /sys/kernel/config/usb_gadget/oha |# mkdir configs/def.1 |# mkdir configs/def.2 |# mkdir functions/acm.ttyS1 |# mkdir strings/0x1 |mkdir: cannot create directory `strings/0x1': Invalid argument |# mkdir strings/0x409 |# mkdir strings/1033 |mkdir: cannot create directory `strings/1033': File exists |# mkdir strings/1032 |# mkdir configs/def.1/strings/0x409 |# mkdir configs/def.2/strings/0x409
|#find . -ls | 975 0 drwxr-xr-x 5 root root 0 Dec 23 17:40 . | 978 0 drwxr-xr-x 4 root root 0 Dec 23 17:43 ./strings | 4100 0 drwxr-xr-x 2 root root 0 Dec 23 17:43 ./strings/1032 | 995 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./strings/1032/serialnumber | 996 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./strings/1032/product | 997 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./strings/1032/manufacturer | 2002 0 drwxr-xr-x 2 root root 0 Dec 23 17:41 ./strings/0x409 | 998 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./strings/0x409/serialnumber | 999 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./strings/0x409/product | 1000 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./strings/0x409/manufacturer | 977 0 drwxr-xr-x 4 root root 0 Dec 23 17:41 ./configs | 4081 0 drwxr-xr-x 3 root root 0 Dec 23 17:41 ./configs/def.2 | 4082 0 drwxr-xr-x 3 root root 0 Dec 23 17:42 ./configs/def.2/strings | 2016 0 drwxr-xr-x 2 root root 0 Dec 23 17:42 ./configs/def.2/strings/0x409 | 1001 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./configs/def.2/strings/0x409/configuration | 1002 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./configs/def.2/bmAttributes | 1003 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./configs/def.2/MaxPower | 979 0 drwxr-xr-x 3 root root 0 Dec 23 17:42 ./configs/def.1 | 980 0 drwxr-xr-x 3 root root 0 Dec 23 17:42 ./configs/def.1/strings | 5122 0 drwxr-xr-x 2 root root 0 Dec 23 17:42 ./configs/def.1/strings/0x409 | 1004 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./configs/def.1/strings/0x409/configuration | 1005 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./configs/def.1/bmAttributes | 1006 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./configs/def.1/MaxPower | 976 0 drwxr-xr-x 3 root root 0 Dec 23 17:41 ./functions | 981 0 drwxr-xr-x 2 root root 0 Dec 23 17:41 ./functions/acm.ttyS1 | 1007 0 -r--r--r-- 1 root root 4096 Dec 23 17:43 ./functions/acm.ttyS1/port_num | 1008 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./UDC | 1009 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./bcdUSB | 1010 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./bcdDevice | 1011 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./idProduct | 1012 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./idVendor | 1013 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./bMaxPacketSize0 | 1014 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./bDeviceProtocol | 1015 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./bDeviceSubClass | 1016 0 -rw-r--r-- 1 root root 4096 Dec 23 17:43 ./bDeviceClass
|# cat functions/acm.ttyS1/port_num |0 |# ls -lah /dev/ttyGS* |crw-rw---T 1 root dialout 252, 0 Dec 23 17:41 /dev/ttyGS0 | |# echo 0x1234 > idProduct |# echo 0xabcd > idVendor |# echo 1122 > strings/0x409/serialnumber |# echo "The manufacturer" > strings/0x409/manufacturer |# echo 1 > strings/1032/manufacturer |# echo 1sa > strings/1032/product |# echo tada > strings/1032/serialnumber |echo "Primary configuration" > configs/def.1/strings/0x409/configuration |# echo "Secondary configuration" > configs/def.2/strings/0x409/configuration |# ln -s functions/acm.ttyS1 configs/def.1/ |# ln -s functions/acm.ttyS1 configs/def.2/ |find configs/def.1/ -ls | 979 0 drwxr-xr-x 3 root root 0 Dec 23 17:49 configs/def.1/ | 6264 0 lrwxrwxrwx 1 root root 0 Dec 23 17:48 configs/def.1/acm.ttyS1 -> ../../../../usb_gadget/oha/functions/acm.ttyS1 | 980 0 drwxr-xr-x 3 root root 0 Dec 23 17:42 configs/def.1/strings | 5122 0 drwxr-xr-x 2 root root 0 Dec 23 17:49 configs/def.1/strings/0x409 | 6284 0 -rw-r--r-- 1 root root 4096 Dec 23 17:47 configs/def.1/strings/0x409/configuration | 6285 0 -rw-r--r-- 1 root root 4096 Dec 23 17:49 configs/def.1/bmAttributes | 6286 0 -rw-r--r-- 1 root root 4096 Dec 23 17:49 configs/def.1/MaxPower | |echo 120 > configs/def.1/MaxPower | |# ls -lh /sys/class/udc/ |total 0 |lrwxrwxrwx 1 root root 0 Dec 23 17:50 dummy_udc.0 -> ../../devices/platform/dummy_udc.0/udc/dummy_udc.0 |lrwxrwxrwx 1 root root 0 Dec 23 17:50 dummy_udc.1 -> ../../devices/platform/dummy_udc.1/udc/dummy_udc.1 |# echo dummy_udc.0 > UDC |# lsusb |Bus 001 Device 002: ID abcd:1234 Unknown | |lsusb -d abcd:1234 -v |Device Descriptor: … | idVendor 0xabcd Unknown | idProduct 0x1234 | bcdDevice 3.06 | iManufacturer 1 The manufacturer | iProduct 2 | iSerial 3 1122 | bNumConfigurations 2 … |echo "" > UDC
v5…v6 - wired up strings with usb_gstrings_attach() - add UDC attribe. Write "udc-name" will bind the gadget. Write an empty string (it should contain \n since 0 bytes write get optimzed away) will unbind the UDC from the gadget. The name of available UDCs can be obtained from /sys/class/udc/
v4…v5 - string rework. This will add a strings folder incl. language code like strings/409/manufacturer as suggested by Alan. - rebased ontop reworked functions.c which has usb_function_instance which is used prior after "mkdir acm.instance" and can be directly used for configuration via configfs.
v3…v4 - moved functions from the root folde down to the gadget as suggested by Michał - configs have now their own configs folder as suggested by Michał. The folder is still name.bConfigurationValue where name becomes the sConfiguration. Is this usefull should we just stilc configs/bConfigurationValue/ ? - added configfs support to the ACM function. The port_num attribute is exported by f_acm. An argument has been added to the USB alloc function to distinguish between "old" (use facm_configure() to configure and configfs interface (expose a config_node). The port_num is currently a dumb counter. It will require some function re-work to make it work.
scheduled for v5: - sym linking function into config.
v2…v3 - replaced one ifndef by ifdef as suggested by Micahał - strstr()/strchr() function_make as suggested by Micahł - replace [iSerialNumber|iProduct|iManufacturer] with [sSerialNumber|sProduct|sManufacturer] as suggested by Alan - added creation of config descriptors
v1…v2 - moved gadgets from configfs' root directory into /udcs/ within our "usb_gadget" folder. Requested by Andrzej & Michał - use a dot as a delimiter between function's name and its instance's name as suggested by Michał - renamed all config_item_type, configfs_group_operations, make_group, drop_item as suggested by suggested by Andrzej to remain consisten within this file and within other configfs users - Since configfs.c and functions.c are now part of the udc-core module, the module itself is now called udc. Also added a tiny ifdef around init code becuase udc-core is subsys init and this is too early for configfs in the built-in case. In the module case, we can only have one init function.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
43febb27 |
| 04-Mar-2013 |
Nishanth Menon <nm@ti.com> |
usb: gadget: composite: fix kernel-doc warnings
A few trivial fixes for composite driver:
Warning(include/linux/usb/composite.h:165): No description found for parameter 'fs_descriptors' Warning(in
usb: gadget: composite: fix kernel-doc warnings
A few trivial fixes for composite driver:
Warning(include/linux/usb/composite.h:165): No description found for parameter 'fs_descriptors' Warning(include/linux/usb/composite.h:165): Excess struct/union/enum/typedef member 'descriptors' description in 'usb_function' Warning(include/linux/usb/composite.h:321): No description found for parameter 'gadget_driver' Warning(drivers/usb/gadget/composite.c:1777): Excess function parameter 'bind' description in 'usb_composite_probe'
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Kosina <trivial@kernel.org> Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
27a46633 |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: f_acm: use usb_gstrings_attach()
Use usb_gstrings_attach() to assign strings in f_acm to assign strings ids.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off
usb: gadget: f_acm: use usb_gstrings_attach()
Use usb_gstrings_attach() to assign strings in f_acm to assign strings ids.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
9bb2859f |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: composite: introduce usb_gstrings_attach()
The USB strings don't (yet) fully work in multiple configs/gadget environment. The string id is assigned to the descriptor and the struct usb_
usb: gadget: composite: introduce usb_gstrings_attach()
The USB strings don't (yet) fully work in multiple configs/gadget environment. The string id is assigned to the descriptor and the struct usb_strings. We create a copy of the individual descriptor so we don't clash if we use a function more than once. However, we have only one struct usb_string for each string.
Currently each function which is used multiple times checks for "id != 0" and only assigns string ids if it did not happen yet. This works well if we use the same function multiple times as long as we do it within the "one" gadget we have. Trouble starts once we use the same function in a second gadget.
In order to solve this I introduce usb_gstrings_attach(). This function will crate a copy all structs except for the strings which are not copied. After the copy it will assign USB ids and attach it to cdev.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
2d5a8899 |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: export composite's setup & disconnect function
The configfs can't use all of composite's hooks because ->bind() and ->unbind() has to be done a little differently. ->disconnect() and ->
usb: gadget: export composite's setup & disconnect function
The configfs can't use all of composite's hooks because ->bind() and ->unbind() has to be done a little differently. ->disconnect() and ->setup() on the hand can be recycled. This patch exports them both so configfs can use them.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
a5923340 |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: factor out two helper functions from composite_bind()
This patch factors out two helper functions from composite_bind() that is composite_dev_prepare() and its counterpart composite_dev
usb: gadget: factor out two helper functions from composite_bind()
This patch factors out two helper functions from composite_bind() that is composite_dev_prepare() and its counterpart composite_dev_cleanup().
This will be used by the configfs which requries a slightly different bind/setup code because part of its configurations (i.e. config descripts, cdev, …) are setup in advance and VID/PID and so one should not be overwritten. Also the setup of ep0 endpoint can be delayed until the UDC is assigned.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
b4735778 |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: composite: add usb_remove_function()
This will be used to remove a single function from a given config. Right now "ignore" that an error at ->bind() time and cleanup later during compos
usb: gadget: composite: add usb_remove_function()
This will be used to remove a single function from a given config. Right now "ignore" that an error at ->bind() time and cleanup later during composite_unbind() / remove_config().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
de53c254 |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: add some infracture to register/unregister functions
This patch provides an infrastructure to register & unregister a USB function. This allows to turn a function into a module and avoi
usb: gadget: add some infracture to register/unregister functions
This patch provides an infrastructure to register & unregister a USB function. This allows to turn a function into a module and avoid the '#include "f_.*.c"' magic and we get a clear API / cut between the bare gadget and its functions. The concept is simple: Each function defines the DECLARE_USB_FUNCTION_INIT macro whith an unique name of the function and two allocation functions. - one to create an "instance". The instance holds the current configuration set. In case there are two usb_configudations with one function there will be one instance and two usb_functions - one to create an "function" from the instance.
The name of the instance is used to automaticaly load the module if it the instance is not yet available. The usb_function callbacks are slightly modified and extended: - usb_get_function() creates a struct usb_function inclunding all pointers (bind, unbind,…). It uses the "instance" to map its configuration. So we can have _two_ struct usb_function, one for each usb_configuration. - ->unbind() Since the struct usb_function was not allocated in ->bind() it should not kfree()d here. This function should only reverse what happens in ->bind() that is request cleanup and the cleanup of allocated descriptors. - ->free_func() a simple kfree() of the struct usb_function
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
779d516c |
| 23-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: composite: don't call driver's unbind() if bind() failed
Lets assume nokia_bind() starts with "return -EINVAL". After loading the gadget we end up with:
|udc dummy_udc.0: registering U
usb: gadget: composite: don't call driver's unbind() if bind() failed
Lets assume nokia_bind() starts with "return -EINVAL". After loading the gadget we end up with:
|udc dummy_udc.0: registering UDC driver [g_nokia] |BUG: unable to handle kernel NULL pointer dereference at 00000040 |IP: [<c11f9555>] __list_add+0x25/0xf0 |Call Trace: | [<c12d4e21>] rollback_registered+0x21/0x40 | [<c12d513f>] unregister_netdevice_queue+0x4f/0xa0 | [<c12d5259>] unregister_netdev+0x19/0x30 | [<f81335b2>] gphonet_cleanup+0x32/0x50 [g_nokia] | [<f8133f1c>] nokia_unbind+0x1c/0x2a [g_nokia] | [<f802509f>] __composite_unbind.constprop.10+0x4f/0xb0 [libcomposite] | [<f80255be>] composite_bind+0x1ae/0x230 [libcomposite] | [<c129e576>] usb_gadget_probe_driver+0xc6/0x1b0 | [<f8024aba>] usb_composite_probe+0x7a/0xa0 [libcomposite]
That is crash from nokia_unbind() invoked via nokia_bind(). This crash will look different we if make it until usb_string_ids_tab() before we enter an error condition in the probe function. nokia_bind_config() tries to clean up which is IMHO the right thing to do. Leaving things as-is and hoping that its unbind() will clean it up is kinda backwards. Especially since the bind function never succeeded so it can't know how much it needs to clean up. This fixes the behaviour by not calling the driver's unbind function if its bind function failed.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
Revision tags: v3.8-rc1, v3.7, v3.7-rc8 |
|
#
8f900a9a |
| 03-Dec-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: consider link speed for bMaxPower
The USB 2.0 specification says that bMaxPower is the maximum power consumption expressed in 2 mA units and the USB 3.0 specification says that it is ex
usb: gadget: consider link speed for bMaxPower
The USB 2.0 specification says that bMaxPower is the maximum power consumption expressed in 2 mA units and the USB 3.0 specification says that it is expressed in 8 mA units.
This patch renames bMaxPower to MaxPower and the various /2 and *2 are removed. Before reporting the config descriptor, the proper value is computer based on the speed, all in-tree users are updated. MaxPower is also increased to u16 so we can store the nokia gadget value which is larger than the max value allowed for u8.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
Revision tags: v3.7-rc7, v3.7-rc6, v3.7-rc5, v3.7-rc4, v3.7-rc3 |
|
#
10287bae |
| 22-Oct-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: always update HS/SS descriptors and create a copy of them
HS and SS descriptors are staticaly created. They are updated during the bind process with the endpoint address, string id or i
usb: gadget: always update HS/SS descriptors and create a copy of them
HS and SS descriptors are staticaly created. They are updated during the bind process with the endpoint address, string id or interface numbers.
After that, the descriptor chain is linked to struct usb_function which is used by composite in order to serve the GET_DESCRIPTOR requests, number of available configs and so on.
There is no need to assign the HS descriptor only if the UDC supports HS speed because composite won't report those to the host if HS support has not been reached. The same reasoning is valid for SS.
This patch makes sure each function updates HS/SS descriptors unconditionally and uses the newly introduced helper function to create a copy the descriptors for the speed which is supported by the UDC.
While at that, also rename f->descriptors to f->fs_descriptors in order to make it more explicit what that means.
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
Revision tags: v3.7-rc2, v3.7-rc1, v3.6, v3.6-rc7, v3.6-rc6 |
|
#
ed9cbda6 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: remove usb_gadget_controller_number()
The bcdDevice field is defined as |Device release number in binary-coded decimal in the USB 2.0 specification. We use this field to distinguish the
usb: gadget: remove usb_gadget_controller_number()
The bcdDevice field is defined as |Device release number in binary-coded decimal in the USB 2.0 specification. We use this field to distinguish the UDCs from each other. In theory this could be used on the host side to apply certain quirks if the "special" UDC in combination with this gadget is used. This hasn't been done as far as I am aware. In practice it would be better to fix the UDC driver before shipping since a later release might not need this quirk anymore.
There are some driver in tree (on the host side) which use the bcdDevice field to figure out special workarounds for a given firmware revision. This seems to make sense. Therefore this patch converts all gadgets (except a few) to use the kernel version instead a random 2 or 3 plus the UDC number. The few that don't report kernel's version are: - webcam This one reports always a version 0x10 so allow it to do so in future. - nokia This one reports always 0x211. The comment says that this gadget works only if the UDC supports altsettings so I added a check for this. - serial This one reports 0x2400 + UDC number. Since the gadget version is 2.4 this could make sense. Therefore bcdDevice is 0x2400 here.
I also remove various gadget_is_<name> macros which are unused. The remaining few macros should be moved to feature / bug bitfield.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
Revision tags: v3.6-rc5 |
|
#
d80c304b |
| 06-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: libcomposite: move MODULE_VERSION to composite.c
MODULE_VERSION and AUTHOR looks better in composite.c than in usbstrings.c so I move it there. I put David Brownell as the module Author
usb: gadget: libcomposite: move MODULE_VERSION to composite.c
MODULE_VERSION and AUTHOR looks better in composite.c than in usbstrings.c so I move it there. I put David Brownell as the module Author as I belive he wrote most of it.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
721e2e91 |
| 06-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: libcomposite: move composite.c into libcomposite
This moves composite.c into libcomposite and updates all gadgets. Finally!
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-b
usb: gadget: libcomposite: move composite.c into libcomposite
This moves composite.c into libcomposite and updates all gadgets. Finally!
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
cc2683c3 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: Provide a default implementation of default manufacturer string
Some gadgets provide custom entry here. Some may override it with an etntry that is also created by composite if there wa
usb: gadget: Provide a default implementation of default manufacturer string
Some gadgets provide custom entry here. Some may override it with an etntry that is also created by composite if there was no value sumbitted at all. This patch removes all "custom manufacturer" strings which are the same as these which are created by composite. Then it moves the creation of the default manufacturer string to usb_composite_overwrite_options() in case no command line argument has been used and the entry is still an empty string. By doing this we get rid of the global variable "composite_manufacturer" in composite.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
d33f74fc |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: remove string override from struct usb_composite_driver
The struct usb_composite_driver members iProduct, iSerial and iManufacturer can be entered directly via the string array. There i
usb: gadget: remove string override from struct usb_composite_driver
The struct usb_composite_driver members iProduct, iSerial and iManufacturer can be entered directly via the string array. There is no need for them to appear here.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
2d35ee47 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: push iProduct into gadgets
This patch pushes the iProduct module argument from composite into each gadget.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andr
usb: gadget: push iProduct into gadgets
This patch pushes the iProduct module argument from composite into each gadget.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
03de9bf6 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: push iManufacturer into gadgets
This patch pushes the iManufacturer module argument from composite into each gadget. Once the user uses the module paramter, the string is overwritten wi
usb: gadget: push iManufacturer into gadgets
This patch pushes the iManufacturer module argument from composite into each gadget. Once the user uses the module paramter, the string is overwritten with the final value.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
1cf0d264 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: push iSerialNumber into gadgets
This patch pushes the iSerialNumber module argument from composite into each gadget. Once the user uses the module paramter, the string is overwritten wi
usb: gadget: push iSerialNumber into gadgets
This patch pushes the iSerialNumber module argument from composite into each gadget. Once the user uses the module paramter, the string is overwritten with the final value.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
7d16e8d3 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: push VID/PID/USB BCD module option into gadgets
This patch moves the module options idVendor, idProduct and bcdDevice from composite.c into each gadgets. This ensures compatibility with
usb: gadget: push VID/PID/USB BCD module option into gadgets
This patch moves the module options idVendor, idProduct and bcdDevice from composite.c into each gadgets. This ensures compatibility with current gadgets and removes the global variable which brings me step closer towards composite.c in libcomposite
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
72258493 |
| 06-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: make composite module options readonly only
This is a partly revert of 4fffd6e5 ("usb: gadget: composite: make module parameters accessible at runtime"). It is not possible to change th
usb: gadget: make composite module options readonly only
This is a partly revert of 4fffd6e5 ("usb: gadget: composite: make module parameters accessible at runtime"). It is not possible to change the VID or other property for a gadget right now. This change has been made for Anrdoid gadget which has this functionality in its copy of the file. This function is executed currently only once and most caller in tree are __init.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
40bfef05 |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: remove bufsiz from struct usb_composite_dev
there is no read user of bufsiz, its content is available via USB_COMP_EP0_BUFSIZ. Remove it.
Acked-by: Michal Nazarewicz <mina86@mina86.com
usb: gadget: remove bufsiz from struct usb_composite_dev
there is no read user of bufsiz, its content is available via USB_COMP_EP0_BUFSIZ. Remove it.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
e13f17ff |
| 10-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: move USB_BUFSIZ into global composite.h
This patch moves USB_BUFSIZ into global header file as USB_COMP_EP0_BUFSIZ. There is currently only one user (f_sourcesink) besides composite whi
usb: gadget: move USB_BUFSIZ into global composite.h
This patch moves USB_BUFSIZ into global header file as USB_COMP_EP0_BUFSIZ. There is currently only one user (f_sourcesink) besides composite which need it. Ideally f_sourcesink would have its own ep0 buffer. Lets keep it that way it was for now.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
ffe0b335 |
| 07-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: remove global variable composite in composite.c
This patch removes the global variable composite in composite.c. The private data which was saved there is now passed via an additional a
usb: gadget: remove global variable composite in composite.c
This patch removes the global variable composite in composite.c. The private data which was saved there is now passed via an additional argument to the bind() function in struct usb_gadget_driver.
Only the "old-style" UDC drivers have to be touched here, new style are doing it right because this change is made in udc-core.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|
#
93952956 |
| 06-Sep-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
usb: gadget: move bind() callback back to struct usb_gadget_driver
This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in struct usb_composite_driver") and fixes new drivers. The sec
usb: gadget: move bind() callback back to struct usb_gadget_driver
This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in struct usb_composite_driver") and fixes new drivers. The section missmatch problems was solved by whitelisting bind callback in modpost.
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
show more ...
|