Commit Graph

2124 Commits

Author SHA1 Message Date
Linus Torvalds
0bf6a210a4 ARM SoC driver specific changes
These changes are all driver specific and cross over between arm-soc
 contents and some other subsystem, in these cases cpufreq, crypto,
 dma, pinctrl, mailbox and usb, and the subsystem owners agreed to
 have these changes merged through arm-soc. As we proceed to untangle
 the dependencies between platform code and driver code, the amount of
 changes in this category is fortunately shrinking, for 3.11 we have
 16 branches here and 101 non-merge changesets, the majority of which
 are for the stedma40 dma engine driver used in the ux500 platform.
 Cleaning up that code touches multiple subsystems, but gets rid
 of the dependency in the end.
 
 The mailbox code moved out from mach-omap2 to drivers/mailbox
 is an intermediate step and is still omap specific at the moment.
 Patches exist to generalize the subsystem and add other drivers
 with the same API, but those did not make it for 3.11.
 
 Conflicts:
 * In cpu-db8500.c results from the removal of the u8500_of_init_devices
   function in combination with the split of u8500_auxdata_lookup.
 
 * In arch/arm/mach-omap2/devices.c, the includes got reshuffled.
   we need to keep linux/wl12xx.h and linux/platform_data/mailbox-omap.h.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUdLnomCrR//JCVInAQJI/A/9FydsQa9sdnzLFgcdX5BeRRwkXLfDifCM
 zDTfUBo+LriKOs7QHblmDg1MnY1UMB2IfrdHD0FsjK7WbZ/91EMAGDPYcI7Fu4+u
 pGStxwWi2v+oCT1jjeOkCPT7hdCqogsSpybYq8itSb+zdvdOi6U35dWEKz8xGqz4
 vTL9gTZbJP0kowkjIcaryk7FIj7BTIvMCW8n55JZEkDe0BuSJGYn5c3Mntut12ZK
 5xM2PeNe2sd3dIdA6XbM2ye/XmYa8xY8Qu4/ijxfH1gnJLvz9Unp96nRXpEbIeMb
 BH2Sro8dxsMCaweIQhSRKGnUWMYO/Rh7/+5EqzJ163Ezthx9nvHXJY2ndWuD7uM1
 IcGrMxLtqP22TEMtZAVEATDp/5ymxEo5GM+eayUojQDn213wOJjRs5xz5IBsH4KM
 8CM/gpadWmLjWku72yEV4lryLcdS0NVQzpTnEbILEGOU4u7qJtxRAp7x7tWBtFg8
 4m/eWcSVk/U2SYbXmQHsfukuWgKY0cnZbctPcdnaqXwTP7toJEAK3gxoMtWh49Jq
 2M2PVFyFejaaq5b/71wAJ7ePYw56H0N/F3RsGpPE55AY15++gSoQ+3t2Si68hDw8
 NtyJMkQYpTvtqJbHXWpQQ3Zfs7pDBe01WDV7i+m4JTNggxUDaO/t1Fqp+fEksm4J
 r+luEf5Gcgk=
 =mJsI
 -----END PGP SIGNATURE-----

Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver specific changes from Arnd Bergmann:
 "These changes are all driver specific and cross over between arm-soc
  contents and some other subsystem, in these cases cpufreq, crypto,
  dma, pinctrl, mailbox and usb, and the subsystem owners agreed to have
  these changes merged through arm-soc.

  As we proceed to untangle the dependencies between platform code and
  driver code, the amount of changes in this category is fortunately
  shrinking, for 3.11 we have 16 branches here and 101 non-merge
  changesets, the majority of which are for the stedma40 dma engine
  driver used in the ux500 platform.  Cleaning up that code touches
  multiple subsystems, but gets rid of the dependency in the end.

  The mailbox code moved out from mach-omap2 to drivers/mailbox is an
  intermediate step and is still omap specific at the moment.  Patches
  exist to generalize the subsystem and add other drivers with the same
  API, but those did not make it for 3.11."

* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (101 commits)
  crypto: ux500: use dmaengine_submit API
  crypto: ux500: use dmaengine_prep_slave_sg API
  crypto: ux500: use dmaengine_device_control API
  crypto: ux500/crypt: add missing __iomem qualifiers
  crypto: ux500/hash: add missing static qualifiers
  crypto: ux500/hash: use readl on iomem addresses
  dmaengine: ste_dma40: Declare memcpy config as static
  ARM: ux500: Remove mop500_snowball_ethernet_clock_enable()
  ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO
  ARM: ux500: Provide a AB8500 GPIO Device Tree node
  gpio: rcar: fix gpio_rcar_of_table
  gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  gpio-rcar: Reference core gpio documentation in the DT bindings
  clk: exynos5250: Add enum entries for divider clock of i2s1 and i2s2
  ARM: dts: Update Samsung I2S documentation
  ARM: dts: add clock provider information for i2s controllers in Exynos5250
  ARM: dts: add Exynos audio subsystem clock controller node
  clk: samsung: register audio subsystem clocks using common clock framework
  ARM: dts: use #include for all device trees for Samsung
  pinctrl: s3c24xx: use correct header for chained_irq functions
  ...
2013-07-02 14:33:21 -07:00
Wei Yongjun
df48fc74bf usb: gadget: f_subset: fix missing unlock on error in geth_alloc()
Add the missing unlock before return from function geth_alloc()
in the error handling case.

Introduced by commit 02832e56f8.
(usb: gadget: f_subset: add configfs support)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 10:50:08 -07:00
Wei Yongjun
c92834c19f usb: gadget: f_ncm: fix missing unlock on error in ncm_alloc()
Add the missing unlock before return from function ncm_alloc()
in the error handling case.

Introduced by commit e730660378.
(usb: gadget: f_ncm: add configfs support)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 10:50:08 -07:00
Wei Yongjun
2a98dbbcd7 usb: gadget: f_ecm: fix missing unlock on error in ecm_alloc()
Add the missing unlock before return from function ecm_alloc()
in the error handling case.

Introduced by commit da92801c64.
(usb: gadget: f_ecm: add configfs support)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 10:50:07 -07:00
Andrzej Pietrasiewicz
d1c02452a2 usb/gadget: Kconfig: fix separate building of configfs-enabled functions
USB_CONFGFS_ZZZZ should appear under a tristate option in order to allow
selecting more than one function without building the legacy gadgets.
Now there are two problems:

1) they can't be selected at all, because they depend on USB_CONFIGFS,
and the patch which adds USB_CONFIGFS has not been merged.
2) they don't select USB_LIBCOMPOSITE (which they need but which is
selected by USB_CONFIGFS)

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 13:41:57 -07:00
Olof Johansson
1247034ea6 Adding the DT support to USB gadget High-Speed aka usba.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRu5FQAAoJEAf03oE53VmQB40H/RfSFjAMRak2yPSb+4Cw2038
 3BQ7iDowps/jJwD7D79SZOY44X+dOMfGO5Pj9C1J61y5ThhiS3QDFnpfzHb74Cl8
 AHLRI9ugG496pdKk6aWjAq4oJozDBrwznnwTJpZshrkSkfOklHjhd/Z5uTIBW3pn
 gQL9tbcTmjqhemhRB160ZHaJebMZBDZgAtft4pVt2JFjXZCokkHLxpf57z4S79D9
 RJ84AU/o2IlQnrcY8fwnyWiU9LNeFzEF+bhNH7XiSoN5suTAdIN6grmHvkqdbSon
 GCiAGp2samBoewnSa+Je32jXdqHORnxHZ6gaZsj+WOnz8zqJG7VNpc4KCJs0Hos=
 =MvZy
 -----END PGP SIGNATURE-----

Merge tag 'at91-drivers' of git://github.com/at91linux/linux-at91 into next/drivers

From Nicolas Ferre:
Adding the DT support to USB gadget High-Speed aka usba.

* tag 'at91-drivers' of git://github.com/at91linux/linux-at91:
  USB: gadget: atmel_usba: add DT support
  USB: gadget: atmel_usba: allow multi instance
  USB: gadget: atmel_usba: move global struct usba_ep usba_ep to struct usba_udc
  ARM: at91: udpate defconfigs
  ARM: at91: dt: switch to standard IRQ flag defines
  ARM: at91: dt: switch to pinctrl to pre-processor
  ARM: at91: dt: add pinctrl pre-processor define
  ARM: at91: dt: switch to standard GPIO flag defines.
  ARM: at91: dt: use #include for all device trees

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	arch/arm/boot/dts/at91sam9260.dtsi
	arch/arm/boot/dts/sama5d3.dtsi
2013-06-14 18:58:28 -07:00
Andrzej Pietrasiewicz
758b463d83 usb: gadget: f_mass_storage: fix default product name
If cfg->product name is not set, a default name is chosen depending
on the common->luns->cdrom flag. If the flag is set the name should
be "File-CD Gadget", and if the flag is not set the name should be
"File-Stor Gadget".

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-12 23:57:12 +03:00
Yuan-Hsin Chen
b84a8dee23 usb: gadget: add Faraday fotg210_udc driver
Faraday fotg210 udc driver supports only Bulk transfer so far.
fotg210 could be configured as an USB2.0 peripheral.

This driver is tested with mass storage gadget driver on Faraday
EVB a369.

Signed-off-by: Yuan-Hsin Chen <yhchen@faraday-tech.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:11 +03:00
Andrzej Pietrasiewicz
b3df2faacb usb: gadget: f_rndis: add configfs support
f_rndis learns about configfs so we can, eventually,
remove in-kernel gadget drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:10 +03:00
Andrzej Pietrasiewicz
4e75e72756 usb: gadget: f_rndis: use usb_gstrings_attach
use new usb_gstrings_attach interface

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:10 +03:00
Andrzej Pietrasiewicz
76da66d170 usb: gadget: rndis: init & exit rndis at module load/unload
This is required in preparation for using usb_gstrings_attach.

The rndis initialization so far has been performed on the first
occurence of rndis_bind(), but the condition to check it (first
or not first) was "borrowed" from strings handling.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:09 +03:00
Andrzej Pietrasiewicz
9bd4a10e1b usb: gadget: ether: convert to new interface of f_rndis
use new interface so old one can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:09 +03:00
Andrzej Pietrasiewicz
f466c63538 usb: gadget: f_rndis: convert to new function interface with backward compatibility
Converting rndis to the new function interface requires converting
the USB rndis' function code and its users.

This patch converts the f_rndis.c to the new function interface.

The file is now compiled into a separate usb_f_rndis.ko module.

The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:08 +03:00
Andrzej Pietrasiewicz
02832e56f8 usb: gadget: f_subset: add configfs support
f_subset learns about configfs so we can, eventually,
remove in-kernel gadget drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:08 +03:00
Andrzej Pietrasiewicz
74bf963d1d usb: gadget: f_subset: use usb_gstrings_attach
use the new usb_gstrings_attach interface.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:07 +03:00
Andrzej Pietrasiewicz
8af5232d6f usb: gadget: ether: convert to new interface of f_subset
teach ethernet code about the new interface of f_subset so
the old one can eventually be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:07 +03:00
Andrzej Pietrasiewicz
8cedba7c73 usb: gadget: f_subset: convert to new function interface with backward compatibility
Converting ecm subset to the new function interface requires converting
the USB subset's function code and its users.

This patch converts the f_subset.c to the new function interface.

The file is now compiled into a separate usb_f_subset.ko module.

The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:06 +03:00
Andrzej Pietrasiewicz
cf99e8c689 usb: gadget: multi: Remove unused include
cleanup only, no functional changes.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:06 +03:00
Andrzej Pietrasiewicz
17b80976f0 usb: gadget: f_eem: add configfs support
f_eem learns about our configfs interface so we
can remove in-kernel gadget drivers in future.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:58:00 +03:00
Andrzej Pietrasiewicz
998da497ec usb: gadget: f_eem: use usb_gstrings_attach
use the new usb_gstrings_attach interface

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:47 +03:00
Andrzej Pietrasiewicz
c96022ded7 usb: gadget: f_eem: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:47 +03:00
Andrzej Pietrasiewicz
94b5573e97 usb: gadget: ether: convert to new interface of f_eem
use new interface so old one can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:46 +03:00
Andrzej Pietrasiewicz
b29002a157 usb: gadget: f_eem: convert to new function interface with backward compatibility
Converting eem to the new function interface requires converting
the USB eem's function code and its users.

This patch converts the f_eem.c to the new function interface.

The file is now compiled into a separate usb_f_eem.ko module.

The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:46 +03:00
Andrzej Pietrasiewicz
9c62ce83e4 usb: gadget: ether: convert to new interface of f_ecm
moving to new interface so we can remove the older one.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:45 +03:00
Andrzej Pietrasiewicz
bf4277c73a usb: gadget: u_ether: allow getting binary-form host address
helper function to copy MAC address to proper place.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:45 +03:00
Andrzej Pietrasiewicz
83408745b2 usb: gadget: f_phonet: add configfs support
f_phonet learns about configfs so we can remove
in-kernel gadget drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:57:39 +03:00
Andrzej Pietrasiewicz
b904d0811d usb: gadget: nokia: convert to new interface of f_ecm
this will let us deprecate (and remove) the old interface.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:32:23 +03:00
Andrzej Pietrasiewicz
0383070e8d usb: gadget: f_phonet: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:31:55 +03:00
Andrzej Pietrasiewicz
83167f12da usb: gadget: nokia: convert to new interface of f_phonet
use the new interface which will allow us to deprecate the
legacy way of binding functions.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:31:39 +03:00
Andrzej Pietrasiewicz
fcbdf12ebe usb: gadget: f_phonet: convert to new function interface with backward compatibility
Converting f_phonet to the new function interface requires converting
the f_phonet's function code and its users.

This patch converts the f_phonet.c to the new function interface.

The file is now compiled into a separate usb_f_phonet.ko module.

The old function interface is provided by means of preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:31:07 +03:00
Andrzej Pietrasiewicz
0189e63ad8 usb: gadget: phonet: move global dev variable to its user
cleanup patch only in preparation for configfs.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:30:46 +03:00
Andrzej Pietrasiewicz
9b2252cace usb: gadget: f_obex: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:29:08 +03:00
Andrzej Pietrasiewicz
3a34344979 usb: gadget: nokia: convert to new interface of f_obex
preparation to use configfs-based approach on g_nokia.ko

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:28:51 +03:00
Andrzej Pietrasiewicz
1af877c409 usb: gadget: f_obex: use usb_gstrings_attach
use the new usb_gstrings_attach interface

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:28:19 +03:00
Andrzej Pietrasiewicz
da92801c64 usb: gadget: f_ecm: add configfs support
f_ecm learns about our new configfs-based binding.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:27:54 +03:00
Andrzej Pietrasiewicz
06b72598e8 usb: gadget: f_ecm: use usb_gstrings_attach
use the new usb_gstrings_attach interface.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:27:14 +03:00
Andrzej Pietrasiewicz
a38a275030 usb: gadget: cdc2: convert to new interface of f_ecm
f_ecm has been converted to new configfs infrastructure,
fixing cdc2 gadget driver.

[ balbi@ti.com : fixed a bunch of errors when adding ECM function ]

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:26:56 +03:00
Andrzej Pietrasiewicz
fee562a645 usb: gadget: f_ecm: convert to new function interface with backward compatibility
Converting ecm to the new function interface requires converting
the USB ecm's function code and its users.

This patch converts the f_ecm.c to the new function interface.

The file is now compiled into a separate usb_f_ecm.ko module.

The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:16:02 +03:00
Andrzej Pietrasiewicz
aa83c6adf7 usb: gadget: add helpers for configfs support for USB Ethernet
All USB Ethernet functions will have very similar attributes in configfs.

This patch provides helper definitions to ease writing the functions and
reduce source code duplication.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:15:43 +03:00
Andrzej Pietrasiewicz
e730660378 usb: gadget: f_ncm: add configfs support
Add configfs support to the NCM function driver so
that we can, eventually, get rid of kernel-based
gadget drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:15:02 +03:00
Andrzej Pietrasiewicz
8feffd0030 usb: gadget: f_ncm: use usb_gstrings_attach
Trivial patch making use of the new usb_gstrings_attach
interface.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:13:57 +03:00
Andrzej Pietrasiewicz
dd67a17f2b usb: gadget: f_ncm: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:13:22 +03:00
Andrzej Pietrasiewicz
9575bcf9c0 usb: gadget: ncm: convert to new function interface
Utilize our new configfs-based interface.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:12:52 +03:00
Andrzej Pietrasiewicz
40d133d7f5 usb: gadget: f_ncm: convert to new function interface with backward compatibility
Converting ncm to the new function interface requires converting
the USB ncm's function code and its users.

This patch converts the f_ncm.c to the new function interface.

The file is now compiled into a separate usb_f_ncm.ko module.

The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:12:18 +03:00
Andrzej Pietrasiewicz
bcd4a1c40b usb: gadget: u_ether: construct with default values and add setters/getters
Add an interface to create a struct netdev_dev filled with default values, an
interface which makes it an interface to fill the struct with useful values and
an interface to read the values set.

The patch also adds an interface to register the net device associated with an
ethernet-over-usb link.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:11:51 +03:00
Andrzej Pietrasiewicz
cbbd14a902 usb: gadget: rndis: convert into module
In order to convert to configfs the usb functions need to be converted
to a new interface and compiled as modules. This patch creates an rndis
module which will be used by the new functions. After all users of
f_rndis are converted to the new interface, this module can be
merged with f_rndis module.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:11:33 +03:00
Andrzej Pietrasiewicz
f1a1823ff2 usb: gadget: u_ether: convert into module
u_ether.c has been #include'd by all gadgets which implement
USB Ethernet functions. In order to add configfs support,
the f_ecm.c, f_eem.c, f_ncm.c, f_subset.c, f_rndis.c need to be
converted into modules and must not be #include'd. Consequently,
the u_ether.c needs to be a module too, in a manner similar
to u_serial.c. The resulting module should not take any parameters,
so they are pushed to the current users of it, that is ether.c,
g_ffs.c, multi.c, ncm.c, nokia.c.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:10:57 +03:00
UCHINO Satoshi
d68c277b50 usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed
Without this memory barrier, the file-storage thread may fail to
escape from the following while loop, because it may observe new
common->thread_wakeup_needed and old bh->state which are updated by
the callback functions.

	/* Wait for the CBW to arrive */
	while (bh->state != BUF_STATE_FULL) {
		rc = sleep_thread(common);
		if (rc)
			return rc;
	}

Cc: stable@vger.kernel.org
Signed-off-by: UCHINO Satoshi <satoshi.uchino@toshiba.co.jp>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:10:34 +03:00
Jassi Brar
eb127cb519 USB: gadget: f_uac2: Fix broken prm to uac2 mapping
prm_to_uac2() is broken because it tests against pointer it itself
mapped onto, which will never be different.
Fix the mapping by adding pointer to parent chip in each rtd param
and removing the prm_to_uac2().

Reported-by: Julien Rouviere <jrouviere@qualistream.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:10:23 +03:00
Alexey Khoroshilov
f37d49ad6e usb: gadget: r8a66597-udc: do not unlock unheld spinlock in r8a66597_sudmac_irq()
r8a66597_irq() processes sudmac part (r8a66597_sudmac_irq()) before locking r8a66597->lock.
But transfer_complete(), that is called inside (r8a66597_sudmac_irq()->sudmac_finish()->transfer_complete()),
expects r8a66597->lock is locked. As a result unheld spinlock can be unlocked.

The patch just moves locking before calling r8a66597_sudmac_irq().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-06-10 17:08:48 +03:00