summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | usb: gadget: add module.h to u_ether.cSebastian Andrzej Siewior2012-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spotted by Fengguang Wu: |In file included from drivers/usb/gadget/ether.c:110:0: |drivers/usb/gadget/u_ether.c:87:21: error: expected ')' before 'uint' |drivers/usb/gadget/u_ether.c:88:25: error: expected ')' before string constant This is because u_ether.c relied on having module.h included somewhere. This isn't the case since composite.c is no longer included. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: remove usb_gadget_controller_number()Sebastian Andrzej Siewior2012-09-1019-311/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: at91_udc: fix dt supportFabio Porcedda2012-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't fail the initialization check for the platform_data if there is avaiable an associated device tree node. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: at91_udc: move the dereference below the NULL testWei Yongjun2012-09-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: libcomposite: move MODULE_VERSION to composite.cSebastian Andrzej Siewior2012-09-102-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: libcomposite: move composite.c into libcompositeSebastian Andrzej Siewior2012-09-1019-51/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: Provide a default implementation of default manufacturer stringSebastian Andrzej Siewior2012-09-1019-138/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: remove string override from struct usb_composite_driverSebastian Andrzej Siewior2012-09-105-40/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: push iProduct into gadgetsSebastian Andrzej Siewior2012-09-102-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: push iManufacturer into gadgetsSebastian Andrzej Siewior2012-09-102-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: push iSerialNumber into gadgetsSebastian Andrzej Siewior2012-09-104-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: make sure each gadget is using same index for Product, Serial,…Sebastian Andrzej Siewior2012-09-1017-118/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The index in usb_string array is defined by the gadget. The gadget can choose which index entry it assigns for the serial number and which the product name. The gadget has just to ensure that the descriptor contains the proper string id which is assigned by composite. If the composite layer knows the index of the "default" information which will be overwritten by module parameters, it can be used later to overwrite 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>
| * | | usb: gadget: push VID/PID/USB BCD module option into gadgetsSebastian Andrzej Siewior2012-09-1018-28/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: move usb_gadget_controller_number() into a .c file and libcompositeSebastian Andrzej Siewior2012-09-103-76/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After I moved the function from the header file to the c file I see: | $ size drivers/usb/gadget/gadget_chips.o | text data bss dec hex filename | 1048 0 0 1048 418 drivers/usb/gadget/gadget_chips.o That is almost a KiB which is removed from each user. As Felipe pointed out, the function / usage is very dumb actually. This is used for the following reasons: - epautoconf ep hint (could provide a per-gadget callback) - miss-features. currently the missing altsetting on pxa's and something ZLP related on musbhdrc (looks like an optimisation which could be implemented in musb itself if it is correct) - unique BCD accross all UDCs. Not sure how important this is. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: initialize the strings in tcm_usb_gadget properlySebastian Andrzej Siewior2012-09-102-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have no idea what I've been thinking while I was doing this in the first place. Now the strings are initialized properly and reported by lsusb. Cc: stable@vger.kernel.org # v3.5 Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: make g_printer enumerate againSebastian Andrzej Siewior2012-09-101-63/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken in 2e87edf49 ("usb: gadget: make g_printer use composite"). The USB-strings were not setup properly and were not used. No function was added which results in an empty USB config. While fixing this, the interface number is now auto generated and not hard coded to 0. Cc: stable@vger.kernel.org # v3.5 Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: use usb_string_ids_tab instead multiple usb_string_id()Sebastian Andrzej Siewior2012-09-1011-137/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using usb_string_ids_tab() instead multiple calls of usb_string_id() seems to be handy. It also allows to add string without many checks. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: make composite module options readonly onlySebastian Andrzej Siewior2012-09-101-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: remove bufsiz from struct usb_composite_devSebastian Andrzej Siewior2012-09-102-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: move USB_BUFSIZ into global composite.hSebastian Andrzej Siewior2012-09-103-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: libcomposite: add epautoconf.c to libcompositeSebastian Andrzej Siewior2012-09-1021-35/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds epautoconf.c into libcomposite and updates all gadgets. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: move global vars from epautoconf into struct usb_gadgetSebastian Andrzej Siewior2012-09-102-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | epautoconf has two global variables which count the endpoint number of last assigned endpoint. This patch removes the global variable and keeps it as per (UDC) gadget. While here, the ifdef is removed and now the in and outpoint are enumerated unconditionally. The dwc3 for instance supports 32 endpoints in total. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: libcomposite: move config.c into libcompositeSebastian Andrzej Siewior2012-09-1019-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves config.c into libcomposite and updates all gadgets. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: start with libcompositeSebastian Andrzej Siewior2012-09-1020-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to be simple. It removes #include usbstribgs.c line from each gadget and creates libcomposite.ko which has only one member, that is usbstribgs.c. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: pxa25x: make it compile with debug againSebastian Andrzej Siewior2012-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |drivers/usb/gadget/pxa25x_udc.h: In function 'dump_state': |drivers/usb/gadget/pxa25x_udc.h:228:20: error: invalid type argument of '->' (have 'struct usb_ep') Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: remove global variable composite in composite.cSebastian Andrzej Siewior2012-09-1019-63/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | staging: ccg: include all sourced filesSebastian Andrzej Siewior2012-09-1020-15/+15072
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This Android gadget includes a bunch of .c files. Fixing normal gadgets is not the real problem but this gadget is not always fixable since the problem here are fundumential / design. *I* wanted to get this removed but other people want to keep it even though there were reports that Android itself is not using it. Some poeple think that it is better to have this instead of nothing and other argue that they need sdb and mass storage gadget. The sdb function is not provided by ccg so I don't see the point of this. I don't see any logical reasoning behind it and I decided that it is time for retreat. This patch brings all dependencies of ccg into staging so I can do whatever I want in drivers/usb/gadget without breaking ccg. Cc: devel@driverdev.osuosl.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: move bind() callback back to struct usb_gadget_driverSebastian Andrzej Siewior2012-09-106-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: gadget: move bind() callback back to struct usb_composite_driverSebastian Andrzej Siewior2012-09-1019-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 structs in question via __ref. Cc: devel@driverdev.osuosl.org Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: push all usb_composite_driver structs into __refdataSebastian Andrzej Siewior2012-09-1018-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it turns out, Sam's comment was better than I initially assumed. This patch pushes as struct usb_composite_driver data structures into __refdata section to avoid a section missmatch report from modpost because the ->bind() can be marked __init. The only downside is that modpost does not check between ->bind() and other member. However, it is temporary. Cc: Sam Ravnborg <sam@ravnborg.org> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: remove __devexit in f_uac2Sebastian Andrzej Siewior2012-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoids the following section missmatch |WARNING: drivers/usb/gadget/g_audio.o(.init.text+0x2e7): Section |mismatch in reference from the function afunc_bind() to the function |.devexit.text:snd_uac2_remove() |The function __init afunc_bind() references |a function __devexit snd_uac2_remove(). |This is often seen when error handling in the init function |uses functionality in the exit path. |The fix is often to remove the __devexit annotation of |snd_uac2_remove() so it may be used outside an exit section. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: move bind callback into driver struct usb_composite_driverSebastian Andrzej Siewior2012-09-102-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was moved to be an argument in 07a18bd716ed5 ("usb gadget: don't save bind callback in struct usb_composite_driver"). The reason was to avoid the section missmatch. The warning was shown because ->bind is marked as __init becuase it is a one time init. The warning can be also suppresed by whitelisting the variable i.e. rename it to lets say _probe. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | staging: ccg: Add a note about compatibility issues.Sebastian Andrzej Siewior2012-09-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first item on the todo list is a new user interface. Put this information into Kconfig's help entry to people are not too confusing once an user API changes which does not happen in kernel otherwise. Cc: devel@driverdev.osuosl.org Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: bcm63xx UDC driverKevin Cernekee2012-09-054-0/+2479
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Driver for the "USB20D" / "USBD" block on BCM6328, BCM6368, BCM6816, BCM6362, BCM3383, and others. The hardware block was designed to support networking applications (direct connection of a home router to a PC), and the endpoint configuration is fixed. [ balbi@ti.com : dropped USB_GADGET_DUALSPEED from Kconfig ] Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Acked-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c-hsotg: Use devm_clk_get functionSachin Kamat2012-09-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_* functions are already used in this file. Hence convert clk_get to devm_clk_get for completeness. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c-hsudc: Replace 0 with NULL for pointersSachin Kamat2012-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silences the following type of sparse warnings: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c-hsudc: Add missing braces around sizeofSachin Kamat2012-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silences the following checkpatch warning: WARNING: sizeof *hsreq should be sizeof(*hsreq) Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c-hsudc: Use devm_* functionsSachin Kamat2012-09-031-32/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_* functions are used to replace kzalloc, request_mem_region, ioremap clk_get and request_irq functions in probe call. With the usage of devm_* functions explicit freeing and unmapping is not required. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: remove duplicated include from pxa25x_udc.cWei Yongjun2012-08-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: lpc32xx_udc.c: adjust inconsistent IS_ERR and PTR_ERRJulia Lawall2012-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the call to PTR_ERR to access the value just tested by IS_ERR. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e,e1; @@ ( if (IS_ERR(e)) { ... PTR_ERR(e) ... } | if (IS_ERR(e=e1)) { ... PTR_ERR(e) ... } | *if (IS_ERR(e)) { ... * PTR_ERR(e1) ... } ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEEDMichal Nazarewicz2012-08-318-72/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED Kconfig options. Since now kernel allows many UDC drivers to be compiled, those options may turn to no longer be valid. For instance, if someone decides to build UDC that supports super speed and UDC that supports high speed only, the latter will be "assumed" to support super speed since USB_GADGET_SUPERSPEED will be selected by the former. The test of whether CONFIG_USB_GADGET_*SPEED was defined was just an optimisation which removed otherwise dead code (ie. if UDC is not dual speed, there is no need to handle cases that can happen if speed is high). This commit removes those checks. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c2410_udc: Do not use integer for NULLSachin Kamat2012-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'req' being a pointer shouldn't be equated with 0. Fixes the following compilation warning: drivers/usb/gadget/s3c2410_udc.c:1299:13: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c2410_udc: Move assignment outside if conditionSachin Kamat2012-08-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following checkpatch errors: ERROR: do not use assignment in if condition Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c2410_udc: Silence checkpatch errors and warningsSachin Kamat2012-08-311-64/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silences about 75 errors and warnings related to - Spacing - Alignment of braces - Line over 80 characters Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c2410_udc: Use pr_* and dev_err functionsSachin Kamat2012-08-311-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace printk with corresponding pr_* and dev_err functions. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: s3c2410_udc: Replace <asm/io.h> with <linux/io.h>Sachin Kamat2012-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following warning: WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: dummy-hcd: remember to update driver pointerAlan Stern2012-08-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1599) fixes dummy-hcd to make it update the appropriate driver pointer when a new gadget driver is bound or unbound. Without this change, the gadget driver's name doesn't appear in dev_printk output. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: lpc32xx_udc: Support multiple controllersRoland Stigge2012-08-311-26/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lpc32xx_udc driver supported only one controller by defining a global static struct for it. This patch enables multiple instances of the controller by dynamic allocation of the struct at probe(). A static struct is kept as a template on initialization since it does some complex preset, reflecting fixed hardware endpoint structure. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: lpc32xx_udc: Remove usb_endpoint_descriptorRoland Stigge2012-08-311-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the utilization of struct usb_endpoint_descriptor, as done by other drivers also. This was done on request by the USB gadget maintainers, since this API is obsoleted. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: lpc32xx_udc: Port to new start/stop interfaceRoland Stigge2012-08-311-35/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adjusts the LPC32xx USB gadget driver to the new udc_start / udc_stop interface. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud