Commit graph

349353 commits

Author SHA1 Message Date
Lan Tianyu
3b2ab2b84c Revert "usb: Register usb port's acpi power resources"
This reverts commit 88bb965ed7.

The linux-next branch of linux-pm tree has replaced
acpi_power_resource_(un)register_device() with new routines.
Commit 88bb965 will cause conflict in the linux-next tree.
So revert it and this will not affect other functions. Will
send a new patch with new routines after 3.9 merge window.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29 07:33:07 -08:00
Greg Kroah-Hartman
67635d397a Merge 3.8-rc5 into usb-next
This fixes up a conflict with drivers/usb/serial/io_ti.c that came up in
linux-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:41:02 -08:00
Linus Torvalds
949db153b6 Linux 3.8-rc5 2013-01-25 11:57:28 -08:00
Linus Torvalds
d7df025eb4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "It turns out that we had two crc bugs when running fsx-linux in a
  loop.  Many thanks to Josef, Miao Xie, and Dave Sterba for nailing it
  all down.  Miao also has a new OOM fix in this v2 pull as well.

  Ilya fixed a regression Liu Bo found in the balance ioctls for pausing
  and resuming a running balance across drives.

  Josef's orphan truncate patch fixes an obscure corruption we'd see
  during xfstests.

  Arne's patches address problems with subvolume quotas.  If the user
  destroys quota groups incorrectly the FS will refuse to mount.

  The rest are smaller fixes and plugs for memory leaks."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (30 commits)
  Btrfs: fix repeated delalloc work allocation
  Btrfs: fix wrong max device number for single profile
  Btrfs: fix missed transaction->aborted check
  Btrfs: Add ACCESS_ONCE() to transaction->abort accesses
  Btrfs: put csums on the right ordered extent
  Btrfs: use right range to find checksum for compressed extents
  Btrfs: fix panic when recovering tree log
  Btrfs: do not allow logged extents to be merged or removed
  Btrfs: fix a regression in balance usage filter
  Btrfs: prevent qgroup destroy when there are still relations
  Btrfs: ignore orphan qgroup relations
  Btrfs: reorder locks and sanity checks in btrfs_ioctl_defrag
  Btrfs: fix unlock order in btrfs_ioctl_rm_dev
  Btrfs: fix unlock order in btrfs_ioctl_resize
  Btrfs: fix "mutually exclusive op is running" error code
  Btrfs: bring back balance pause/resume logic
  btrfs: update timestamps on truncate()
  btrfs: fix btrfs_cont_expand() freeing IS_ERR em
  Btrfs: fix a bug when llseek for delalloc bytes behind prealloc extents
  Btrfs: fix off-by-one in lseek
  ...
2013-01-25 10:55:21 -08:00
Lan Tianyu
192fef18d0 usb: enable usb port device's async suspend.
This patch is to set power.async_suspend for usb port in order
to allow it to be suspended and resumed asynchronously during
system sleep transitions.

The power.async_suspend flag is also set for devices that don't have
suspend or resume callbacks, because otherwise they would make the
main suspend/resume thread wait for their "asynchronous" children
(during suspend) or parents (during resume), effectively negating the
possible gains from executing these devices' suspend and resume
callbacks asynchronously.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:14:20 -08:00
Lan Tianyu
f6cced1a08 usb: expose usb port's pm qos flags to user space
This patch is to expose usb port's pm qos flags(pm_qos_no_power_off,
pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off
flag to prohibit the port from being powered off.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:14:20 -08:00
Lan Tianyu
ad493e5e58 usb: add usb port auto power off mechanism
This patch is to add usb port auto power off mechanism.
When usb device is suspending, usb core will suspend usb port and
usb port runtime pm callback will clear PORT_POWER feature to
power off port if all conditions were met. These conditions are
remote wakeup disable, pm qos NO_POWER_OFF flag clear and persist
enable. When it resumes, power on port again.

Add did_runtime_put in the struct usb_port to ensure
pm_runtime_get/put(portdev) to be called pairedly.  Set did_runtime_put
to true when call pm_runtime_put(portdev) during suspending. The
pm_runtime_get(portdev) only will be called when did_runtime_put
is set to true during resuming. Set did_runtime_put to false after
calling pm_runtime_get(portdev).

Make clear_port_feature() and hdev_to_hub() as global symbol.
Rename clear_port_feature() to usb_clear_port_feature() and
hdev_to_hub() to usb_hub_to_struct_hub().

Extend hub_port_debounce() with the fuction of debouncing to
be connected. Add two wraps: hub_port_debounce_be_connected()
and hub_port_debouce_be_stable().

Increase HUB_DEBOUNCE_TIMEOUT to 2000 because some usb ssds
needs around 1.5 or more to make the hub port status to be
connected steadily after being powered off and powered on.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:14:20 -08:00
Lan Tianyu
971fcd492c usb: add runtime pm support for usb port device
This patch is to add runtime pm callback for usb port device.
Set/clear PORT_POWER feature in the resume/suspend callback.
Add portnum for struct usb_port to record port number. Do
pm_rumtime_get_sync/put(portdev) when a device is plugged/unplugged
to prevent it from being powered off when it is active.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:12:19 -08:00
Lan Tianyu
6802771bba PM/Qos: Expose dev_pm_qos_flags symbol
The dev_pm_qos_flags() will be used in the usb core which could be
compiled as a module. This patch is to export it.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:12:18 -08:00
Lan Tianyu
88bb965ed7 usb: Register usb port's acpi power resources
This patch is to register usb port's acpi power resources. Create
link between usb port device and its acpi power resource.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:07:59 -08:00
Gerd Hoffmann
8eae0fb7ef usb-uas: update MAINTAINERS entry
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:55 -08:00
Gerd Hoffmann
bde027b456 usb-uas: set max_lun and max_channel
256 luns is what the sam-4 address method 0 can handle and what
the qemu uas emulation supports.  So pick that for now.

[ v2: unlike the other two max_* fields max_channel isn't max+1 ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:54 -08:00
Frans Klaver
59e931c47f usb: add driver for xsens motion trackers
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:54 -08:00
Dongjin Kim
8ab03dd48a USB: misc: usb3503: Fix compiler warning
This patch fixes the compiler warning of uninitialized variable.

drivers/usb/misc/usb3503.c: In function ‘usb3503_probe’:
drivers/usb/misc/usb3503.c:215:13: warning: ‘mode’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:54 -08:00
Greg Kroah-Hartman
4811f53fad usb: xceiv: patches for v3.9 merge window
Two new PHY drivers coming here: one for Samsung,
 one for OMAP. Both architectures are adding USB3
 support to mainline kernel.
 
 The PHY layer now allows us to have mulitple PHYs
 of the same type, which is necessary for platforms
 which provide more than one USB peripheral port.
 
 There's also a few cleanups here: removal of __dev*
 annotations, conversion of a cast to to_delayed_work(),
 and mxs-phy learns about ->set_suspend.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqlWAAoJEIaOsuA1yqREo+0P/AnevihQnUfh1WlICZeHvQMR
 +XwSZGVlZYMTiThFldDOsV0ZpngMWW7y7iNc/YjCTyYr1skRjdYahRAc9YZtz2aR
 2aIdIbdt6gS4wthPhMUGdeGlGuXngmrFCKeo7xD8RQQgeJecGqrD/y629fAfnq0Z
 /bCOq+BKj3R9oLOVKtBCOE+j4KQKJSDkywz4GRaZ5yyOmn55Ci/FNJH6EAoGQC5Q
 D1j+PyhlVpqW/XESn9ceRdXIG9i4a9b3PwKFNbO3iCfaLh5JGTW67pTZ+A7+XNcz
 iT3+WibsZIAF6ya/Eu/1NcBgj8an6rhuRN/Nu7GTIOxwZNuKbqpYfuOXf1/StTiJ
 rwmPQ4mh3PzqbLSfe4+H3SIkj8IZCh6NuPiREAwge2HGxOSY7FSIdQSGV6jOqa7F
 7Qi3K9aFMqJYAkhEelPfNtZZhK1fVlQTn+t/q4Zr7r593xpV1Ur73Kn3EwGDBcM3
 5hyKo9DC1Gr1KXtf1B/hzojnMWqmT5BxJhFBSsw7Nj1F0fUaA3G15+vkanvUSWRV
 /wP8pjZD44T/bguion7LSdscX98S4fCTJSf571UYymmVGKejfpYI0wRWearVbrhm
 cwdONVyIt0EFqX2gd2pthx2SBTTOEetb5ssqSKXRBCTDiApjdAPdejVGk3iblw7C
 LOydELt71ER/o2RNVR+h
 =c796
 -----END PGP SIGNATURE-----

Merge tag 'xceiv-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: xceiv: patches for v3.9 merge window

	Two new PHY drivers coming here: one for Samsung,
	one for OMAP. Both architectures are adding USB3
	support to mainline kernel.

	The PHY layer now allows us to have mulitple PHYs
	of the same type, which is necessary for platforms
	which provide more than one USB peripheral port.

	There's also a few cleanups here: removal of __dev*
	annotations, conversion of a cast to to_delayed_work(),
	and mxs-phy learns about ->set_suspend.
2013-01-25 09:09:46 -08:00
Greg Kroah-Hartman
cba6c85027 usb: gadget: patches for v3.9 merge window
finally getting rid of the old ->start()/->stop() methods
 in favor of the better and improved ->udc_start()/->udc_stop().
 
 There were surprisingly quite a few users left, but all of them
 have been converted.
 
 f_mass_storage removed some dead code, which is always great ;-)
 
 There's also a big cleanup to the gadget framework from Sebastian
 which gets us a lot closer to having only function drivers in
 kernel and move over to configfs-based binding.
 
 Other than these, there's the usual set of cleanups: s3c UDCs are
 moving over to devm_regulator_bulk_get() API, at91_udc removed
 an unnecessary check for work_pending() before scheduling and
 there's the removal of an unused variable from uac2_pcm_trigger().
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqbFAAoJEIaOsuA1yqREkXsQAInuD5h4OE4gMQSFWJbYY+it
 BWN3JAIxm5NTKD9cez7d0vQ45v+9qDygBpHP4lsGGjhI0tkOr+nQ/g/sfSi3xbHM
 HQ6/z7Y68pNz9k57ans9NfIt0AuIsHE79tlOx3g+QVvryLHmQSAUzk9ru0VUHw4D
 rSI3Czk3yCA4UnRITxJYpsnmEAZw/M7DwyMANqdNFzZaruMB77phsCWGIM2O0h1T
 lw3sgcBoFcvYodWCzi90NWMA8FccQLMxBg6G+7ViaqGvAPqSuYwNTHJxxUwPHdbI
 o28gQY7gkxZY9MwbnFZ+7jSbpcmzRpYtpgBflubf4iAkv+197lG6I5XyVgfdEZSF
 AF3qi7asrXX/jjFoXASpmphBdCazz6G9bTmtdT3RpV3MKC6fnS1tXImBgreveIWh
 sjhPQCleCCZI2+KLpVOujk3kUVHc9aJ5zbqcNLu03Ux1qqqK0VlZ9bahtip6HQ8H
 GYhEdOmgIAe83CcJeWBdWAoz2c7fzEEvCj+TxxbyB7nE8TRsOYooKrBcfEM1plVy
 qWcXULlhTdD4aWpQLanL8XSamKFvyDk+lEn4803of0eaVpE9gUxKi0fwD+j6UOMV
 iBa7mEx5zIym7gJI4+SlvXIn8fPHfcHGX4BPLASd+G4ndkLIPc2wAb/KqVyIUCXt
 I5K8UNYb0DiuQtxKXg8R
 =PCP4
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: gadget: patches for v3.9 merge window

	finally getting rid of the old ->start()/->stop() methods
	in favor of the better and improved ->udc_start()/->udc_stop().

	There were surprisingly quite a few users left, but all of them
	have been converted.

	f_mass_storage removed some dead code, which is always great ;-)

	There's also a big cleanup to the gadget framework from Sebastian
	which gets us a lot closer to having only function drivers in
	kernel and move over to configfs-based binding.

	Other than these, there's the usual set of cleanups: s3c UDCs are
	moving over to devm_regulator_bulk_get() API, at91_udc removed
	an unnecessary check for work_pending() before scheduling and
	there's the removal of an unused variable from uac2_pcm_trigger().
2013-01-25 09:08:05 -08:00
Greg Kroah-Hartman
a9b8676c17 usb: dwc3: patches for v3.9 merge window
We're saving some extra memory now by being a lot
 more conservative when allocating our event buffers.
 
 Our default HIRD threshold value was mistakenly set
 as one of the unsupported which would cause undefined
 behavior. Turns out that it broke OMAP5 ES2.0, so we're
 fixing it now by setting the maximum allowed HIRD
 threshold (12).
 
 Quite a few fixes to Isochronous transfers and scatter/gather
 support from Pratyush.
 
 We're also starting to support devicetree-based probe with
 the latest changes from Kishon.
 
 The usual set of cleanups also available: converting debugfs
 regdump utility to regsets, better "compatible" strings for
 Exynos platforms and the removal of the dependency for
 Host and Gadget; now dwc3 can be compiled host-only, device-only,
 and/or Dual-Role.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqfLAAoJEIaOsuA1yqRExJ4P/jzWWpIos3bDSvWyzyP/HbL+
 3EQ+jfERFsZRtpuZ/V/YAsiGkA3SAKSnougMKFHjsiX835KSLNKcaYAz4uaeg2ki
 CtrrZF59NvLefiAL7aE/vILllHPPMwt3l8ojiDhpGghvQjYVKD9EYd3A1lYW4kpI
 u/nXoJIs3++DcTmgIAfhaqYZnSEoO1rhoPYUGaJRBGlO3YYD6UiT//LhAnGIGSDM
 ZZW69feoCogqUxSx6x4cbhV9W/FD3jKxO8Cn/3poyag8Ou+91lhbAL+7EZm+WnZ5
 0+aslV9LYAzRJBBT/dvoD/3hwXNRS7/0L/OcYjrhqnUoQReWZppHQO1mFBgf/gOk
 bool4uIH8sNvmsDqh8Lm9pzG101vnOHSKr15e2fH+h8Z2nM8cNsKCIvP7JZ1Tnyf
 cehXGkE5PSEm0ViRQxqjbdRpqNlNp03wshh5J1HWiToTf0wxFGhgmOdxIquwO7cR
 eBVFz2zQexyiMW0Plr0GBtjDm3LaojzvK1YEjHTesMdWx/yVXaLLu38Qv05sG7Nd
 g4tRJOLrem03eqvv0zFbtGEPziilb/p7o699AHtiDJk330SHZUDvcoTQrIlXqsy1
 nPBdjrOauZRRYYmhzS2I9RE8e4tj02uwb3mNyiHFdomZLTXS47fn3SrK/mL+iU6K
 gpzStpT3xlvyzfHdP7of
 =JJ6/
 -----END PGP SIGNATURE-----

Merge tag 'dwc3-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: dwc3: patches for v3.9 merge window

	We're saving some extra memory now by being a lot
	more conservative when allocating our event buffers.

	Our default HIRD threshold value was mistakenly set
	as one of the unsupported which would cause undefined
	behavior. Turns out that it broke OMAP5 ES2.0, so we're
	fixing it now by setting the maximum allowed HIRD
	threshold (12).

	Quite a few fixes to Isochronous transfers and scatter/gather
	support from Pratyush.

	We're also starting to support devicetree-based probe with
	the latest changes from Kishon.

	The usual set of cleanups also available: converting debugfs
	regdump utility to regsets, better "compatible" strings for
	Exynos platforms and the removal of the dependency for
	Host and Gadget; now dwc3 can be compiled host-only, device-only,
	and/or Dual-Role.
2013-01-25 09:02:26 -08:00
Greg Kroah-Hartman
468234984f usb: musb: patches for v3.9 merge window
Mostly fixes all over which weren't urgent enough for
 the late -rc cycle.
 
 There is a Double Buffering fix for Host Mode TX,
 a dependency fix for the transceiver driver, some
 fixes to the error path and a fix for the use of
 omap_musb_maibox.
 
 Other than these fixes, there a removal duplicate
 headers from the dsps glue layer and removal of
 redundant assignments in omap2430_probe().
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqSpAAoJEIaOsuA1yqRE1VEQALCzApuKqj5V3VV3kVQLVdUc
 Sk6i/EJRxebcV6TjHOqbojISNUURAAGbBx7PSzdFFbZT54jaj0qdZgvUaAhEOQk8
 FiJJt1u8qdFoz0MRfHX32HWh3L7M62PXZeDjcAxDE7+1bg/xBqUm1sc3VEq63Qd7
 nyq+h7Ov7AxF19gVm5LLjal1qc5BQsUB5Cx2bYOrpnceW7LPCSaJmWQEqP6o97Yi
 6seSp4Q4GW5TK7WEKXW8pwLYXxr/1X84dOg+OWcTct3kGrg98rhVfwBBYEbSQI/6
 UccWWn65sufym0Gj/CWd6mgTiOdjbBw70P+j3qX+/eZhuv37hNKTaLPTzZhkGyRP
 +pTs/ROEDGnM3BEMxT3jzg2qFR4F3rU7OP3fa4kuf1iGdbnoJbJV8jI9PElZmI5F
 bxN0F1v0+7QJUlJ4IcQhTlcT7GYsP+UZDbax18AMApsWqE5TbBtDqPhhHKGfWCkd
 FnfGTZP8onKjnIan4kdh4usLSzE5+OPCklRAyQQNorZw6t3mgBU3Lr811kXGtg6J
 GMzvXVQ6QZo5aVxWq3dJ39AQTp/Lrs4QFJRzmt0Krdwm9ND5HbnNSJUPntoeztOx
 D3GCLbyUmJ/eDY1wk6TZTx3pMdXVy94NdGf/ZRZyST1k/QX5JNU7EfLDqrvQS6Yp
 mW+nVB7gAOXWzaYir9KL
 =dDY3
 -----END PGP SIGNATURE-----

Merge tag 'musb-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: musb: patches for v3.9 merge window

	Mostly fixes all over which weren't urgent enough for
	the late -rc cycle.

	There is a Double Buffering fix for Host Mode TX,
	a dependency fix for the transceiver driver, some
	fixes to the error path and a fix for the use of
	omap_musb_maibox.

	Other than these fixes, there a removal duplicate
	headers from the dsps glue layer and removal of
	redundant assignments in omap2430_probe().
2013-01-25 09:00:42 -08:00
Vivek Gautam
52758bcb7c usb: dwc3: host: Change platform device ID for xhci-hcd to AUTO
Multiple dwc3 controllers will try to allocate multiple xhci-hcd
interfaces.
Changing platform device IDs from NONE to AUTO to support
such cases.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:19:52 +02:00
Vivek Gautam
b0e45ddb96 usb: dwc3: exynos/omap: Change platform device IDs for no_op_xceive to AUTO
Multiple dwc3 probe calls try to allocate no_op_xceive platform
device. Having static IDs for these will throw sysfs error -EEXIST.
Changing these static platform device IDs to AUTO to enable
multiple dwc3 controller support on a SoC.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:19:50 +02:00
Kishon Vijay Abraham I
5088b6f5bc usb: dwc3: core: add dt support for dwc3 core
Added dt support for dwc3 core and update the documentation with
device tree binding information. Getting a PHY is now done using
devm_usb_get_phy_by_phandle() for dt boot.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:17:54 +02:00
Kishon Vijay Abraham I
0c4c8bbbfd usb: phy: omap-usb2: enable 960Mhz clock for omap5
"usb_otg_ss_refclk960m" is needed for usb2 phy present in omap5. For
omap4, the clk_get of this clock will fail since it does not have this
clock.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:03:10 +02:00
Kishon Vijay Abraham I
b16604f2c1 usb: musb: omap: get phy by phandle for dt boot
The OMAP glue has been modified to get PHY by phandle
for dt boot.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:03:10 +02:00
Kishon Vijay Abraham I
c11747f6ce usb: musb: omap: make use of the new PHY lib APIs
New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
used in MUSB (OMAP), in order to make use of the binding information
provided in the board file (of OMAP platforms).

All the platforms should be modified similar to this to add and get the
PHY.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:03:09 +02:00
Kishon Vijay Abraham I
57f6ce072e usb: phy: add a new driver for usb3 phy
Added a driver for usb3 phy that handles the interaction between usb phy
device and dwc3 controller.

This also includes device tree support for usb3 phy driver and
the documentation with device tree binding information is updated.

Currently writing to control module register is taken care in this
driver which will be removed once the control module driver is in place.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:02:50 +02:00
Kishon Vijay Abraham I
ca784be36c usb: start using the control module driver
Start using the control module driver for powering on the PHY and for
writing to the mailbox instead of writing to the control module
registers on their own.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 12:27:24 +02:00
Kishon Vijay Abraham I
01658f0f8d usb: phy: add a new driver for usb part of control module
Added a new driver for the usb part of control module. This has an API
to power on the USB2 phy and an API to write to the mailbox depending on
whether MUSB has to act in host mode or in device mode.

Writing to control module registers for doing the above task which was
previously done in omap glue and in omap-usb2 phy will be removed.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 12:25:36 +02:00
Kishon Vijay Abraham I
5d3c28b5a4 usb: otg: add device tree support to otg library
Added an API devm_usb_get_phy_by_phandle(), to get usb phy by passing a
device node phandle value. This function will return a pointer to
the phy on success, -EPROBE_DEFER if there is a device_node for the phandle,
but the phy has not been added, or a ERR_PTR() otherwise.

Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 10:20:14 +02:00
Kishon Vijay Abraham I
0fa4fab4ee usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
In order to add support for multipe PHY's of the same type, new API's
for adding PHY and getting PHY has been added. Now the binding
information for the PHY and controller should be done in platform file
using usb_bind_phy API. And for getting a PHY, the device pointer of the
USB controller and an index should be passed. Based on the binding
information that is added in the platform file, usb_get_phy_dev will return the
appropriate PHY.
Already existing API's to add and get phy by type is not removed. These
API's are deprecated and will be removed once all the platforms start to
use the new API.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 10:20:14 +02:00
Kishon Vijay Abraham I
b4a83e4df1 usb: otg: add an api to bind the usb controller and phy
In order to support platforms which has multiple PHY's (of same type) and
which has multiple USB controllers, a new design is adopted wherin the binding
information (between the PHY and the USB controller) should be passed to the
PHY library from platform specific file (board file).
So added a new API to pass the binding information.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 10:20:09 +02:00
Kishon Vijay Abraham I
5ea921320f usb: dwc3: core: stray statements are removed
No functional change. Stray statements where removed from dwc3 core.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:19:49 +02:00
Kishon Vijay Abraham I
8ba007a971 usb: dwc3: core: enable the USB2 and USB3 phy in probe
Enabled the USB2 and USB3 PHY in probe by calling usb_phy_set_suspend
and disabled the PHYs on driver removal. When PM is implemented this
will be optimized to enable the PHYs only when needed.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:19:43 +02:00
Kishon Vijay Abraham I
7e41bba946 usb: dwc3: omap: Add an API to write to dwc mailbox
Add an API in the omap glue layer to write to the mailbox register which
can be used by comparator driver(twl). To pass the detection of the attached
device (signified by VBUS, ID) to the dwc3 core, dwc3 core has to write
to the mailbox regiter.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:17:09 +02:00
Kishon Vijay Abraham I
6373218da1 usb: dwc3: omap: Remove explicit writes to SYSCONFIG register
The runtime API's takes care of setting the SYSCONFIG register with
appropriate values. Hence explicit writes to SYSCONFIG register is
removed.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:16:57 +02:00
Kishon Vijay Abraham I
af310e96a0 usb: dwc3: omap: use runtime API's to enable clocks
Before accessing any register, runtime API's should be invoked to enable
the clocks. runtime API's are added here to prevent abort during register
access.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:15:54 +02:00
Kishon Vijay Abraham I
b4bfe6aa9b usb: dwc3: omap: use of_platform API to create dwc3 core pdev
Used of_platform_populate() to create dwc3 core platform_device
from device tree data.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:15:19 +02:00
Kishon Vijay Abraham I
94c6a436f6 usb: dwc3: omap: use device_for_each_child to handle child removal
Used device_for_each_child() to handle child device (dwc3 core) removal
during devexit of dwc3 omap. This is in preparation for creating the child
devices from subnode of dwc3 omap glue using of_platform_populate.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:15:06 +02:00
Vivek Gautam
fe29db8fb2 usb: dwc3: exynos: fix compatible strings for the device
Using specific chip in compatible strings. Newer SOCs can claim
device by using older string in the compatible list.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 09:04:44 +02:00
Linus Torvalds
66e2d3e8c2 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French:
 "Two small cifs fixes"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  fs/cifs/cifs_dfs_ref.c: fix potential memory leakage
  cifs: fix srcip_matches() for ipv6
2013-01-24 19:15:43 -08:00
Linus Torvalds
d93816a63c Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixlet from Marcelo Tosatti.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: PPC: Emulate dcbf
2013-01-24 19:14:22 -08:00
Vivek Gautam
6e2477777c usb: ehci-s5p/ohci-exynos: Fix compatible strings for the device
Using specific chip in compatible strings. Newer SOCs can claim
device by using older string in the compatible list.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 14:03:56 -08:00
Alan Stern
bdb6bc06f7 USB: fix sign-extension bug in the hub driver
This patch (as1646) fixes a long-standing bug in the USB hub driver.
Upon conversion from char to unsigned long, the bytes in the status
buffer are subject to unwanted sign extension.  The bytes should be
declared as u8 rather than char, to prevent this.

This effects of this bug are minimal.  The hub driver may end up doing
a little unnecessary extra work because it thinks events have occurred
on some ports when they really haven't.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 14:03:56 -08:00
Chen Gang
3171fcabb1 USB: uhci: beautify source code
get rid of the line breaks in string constants.
  let comments within 80 with limitation.
  delete ' \' at the end of a statement.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:59:26 -08:00
Bjørn Mork
f8f0302bbc USB: option: add and update Alcatel modems
Adding three currently unsupported modems based on information
from .inf driver files:

  Diag  VID_1BBB&PID_0052&MI_00
  AGPS  VID_1BBB&PID_0052&MI_01
  VOICE VID_1BBB&PID_0052&MI_02
  AT    VID_1BBB&PID_0052&MI_03
  Modem VID_1BBB&PID_0052&MI_05
  wwan  VID_1BBB&PID_0052&MI_06

  Diag  VID_1BBB&PID_00B6&MI_00
  AT    VID_1BBB&PID_00B6&MI_01
  Modem VID_1BBB&PID_00B6&MI_02
  wwan  VID_1BBB&PID_00B6&MI_03

  Diag  VID_1BBB&PID_00B7&MI_00
  AGPS  VID_1BBB&PID_00B7&MI_01
  VOICE VID_1BBB&PID_00B7&MI_02
  AT    VID_1BBB&PID_00B7&MI_03
  Modem VID_1BBB&PID_00B7&MI_04
  wwan  VID_1BBB&PID_00B7&MI_05

Updating the blacklist info for the X060S_X200 and X220_X500D,
reserving interfaces for a wwan driver, based on

  wwan VID_1BBB&PID_0000&MI_04
  wwan VID_1BBB&PID_0017&MI_06

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:42:10 -08:00
Dongjin Kim
eab8050c01 USB: misc: usb3503: add dt support
Added device tree support for usb3503 driver and add new document with device tree binding information.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:42:10 -08:00
Woody Suwalski
9bc5d12620 USB: UHCI: remove unused definition
Remove an unused (and erroneous) definition from the UHCI driver.

Signed-off: Woody Suwalski <terraluna977@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:42:09 -08:00
Chen Gang
13996ca7af USB: uhci: check buffer length to avoid memory overflow
for function uhci_sprint_schedule:
    the buffer len is MAX_OUTPUT: 64 * 1024, which may not be enough:
      may loop UHCI_NUMFRAMES times (UHCI_NUMFRAMES is 1024)
      each time of loop may get more than 64 bytes
    so need check the buffer length to avoid memory overflow

  this patch fix it like this:
    at first, make enough room for buffering the exceeding contents
    judge the contents which written whether bigger than buffer length
    if bigger (the exceeding contents will be in the exceeding buffer)
      break current work flow, and return.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:42:09 -08:00
Linus Torvalds
01acd3efd7 Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "A number of fixes:

  Patrik found a problem with preempt counting in the VFP assembly
  functions which can cause the preempt count to be upset.

  Nicolas fixed a problem with the parsing of the DT when it straddles a
  1MB boundary.

  Subhash Jadavani reported a problem with sparsemem and our highmem
  support for cache maintanence for DMA areas, and TI found a bug in
  their strongly ordered memory mapping type.

  Also, three fixes by way of Will Deacon's tree from Dave Martin for
  instruction compatibility and Marc Zyngier to fix hypervisor boot mode
  issues."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7629/1: mm: Fix missing XN flag for for MT_MEMORY_SO
  ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem
  ARM: 7628/1: head.S: map one extra section for the ATAG/DTB area
  ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone
  ARM: virt: simplify __hyp_stub_install epilog
  ARM: virt: boot secondary CPUs through the right entry point
  ARM: virt: Avoid bx instruction for compatibility with <=ARMv4
2013-01-24 12:44:57 -08:00
Linus Torvalds
1496ec13a1 ARM: arm-soc: Fixes for 3.8-rc, take 2
Here's a long-pending fixes pull request for arm-soc (I didn't send one
 in the -rc4 cycle).
 
 The larger deltas are from:
 - A fixup of error paths in the mvsdio driver
 - Header file move for a driver that hadn't been properly converted to
   multiplatform on i.MX, which was causing build failures when included
 - Device tree updates for at91 dealing mostly with their new
   pinctrl setup merged in 3.8 and mistakes in those initial configs
 
 The rest are the normal mix of small fixes all over the place; sunxi,
 omap, imx, mvebu, etc, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAV2RAAoJEIwa5zzehBx32N0P/AsFOLaVWjuvf3kBZTaZgp3J
 jZjhmAfJ2dQCITA792U2bI0d+gPiXm49EY3KWaNdb7S2UmQ1MwXHhKOwOQSVXli0
 j+qAgVUa4nSsi3FQesKS0zThG/Xr+RsyiJZ2dHu71hendJu5NB1O1hzO4hDEHkMc
 K8NGglKjtGirEiLIoub9ag8E9k5sd8X4nulrEJclon1BoolPcef18Bs96tdPmq/o
 Ss634vBqhzSE8OInFc6RDNzTSM52zXbornr/5xGAvFqQv6L0rSXHPvjeeWVdNjj1
 aNqkOrQOAHWRwTcyHOR0GdJfuAPSUwF+JkBWcUbgmsda7XunFiSb5tKV3FSVbJfN
 pMFvbg/iK+ByhWq8iAOkT7OP64wi++FlOFa39IAiQ1QPRD0j93OlKMp0LjqEEiKd
 Gw8o3X03GWhqoJUlSz40TF0Pvkje1UTk2Y8k2y24I3AnnEAcO5x+5pZYUTOe6x5N
 THqqSMsdKWIibrQJRuOXll/DkS8zcepTHU7o8hyHBKYh7LxdAs4ITQoYZjcU5lse
 HGwldByKfuNlzF3+96Jh9wZsr/9zjD8yovEcQYk37s56T/b7kT0sQm6XGS1dFE8Q
 xQgcXLEUXZLt/79B0bn/5ogh26xswx/3GHgNjL1tJQc/MhbQ6C0bb2bBVoU21qzq
 I5yMMwNSkH8+7+PGPiaQ
 =YDHs
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Olof Johansson:
 "Here's a long-pending fixes pull request for arm-soc (I didn't send
  one in the -rc4 cycle).

  The larger deltas are from:

   - A fixup of error paths in the mvsdio driver

   - Header file move for a driver that hadn't been properly converted
     to multiplatform on i.MX, which was causing build failures when
     included

   - Device tree updates for at91 dealing mostly with their new pinctrl
     setup merged in 3.8 and mistakes in those initial configs

  The rest are the normal mix of small fixes all over the place; sunxi,
  omap, imx, mvebu, etc, etc."

* tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (40 commits)
  mfd: vexpress-sysreg: Don't skip initialization on probe
  ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
  ARM: vexpress: extend the MPIDR range used for pen release check
  ARM: at91/dts: correct comment in at91sam9x5.dtsi for mii
  ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig
  ARM: at91/at91_dt_defconfig: remove memory specification to cmdline
  ARM: at91/dts: add macb mii pinctrl config for kizbox
  ARM: at91: rm9200: remake the BGA as default version
  ARM: at91: fix gpios on i2c-gpio for RM9200 DT
  ARM: at91/at91sam9x5 DTS: add SCK USART pins
  ARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts
  ARM: at91/at91-pinctrl documentation: fix typo and add some details
  ARM: kirkwood: fix missing #interrupt-cells property
  mmc: mvsdio: use devm_ API to simplify/correct error paths.
  clk: mvebu/clk-cpu.c: fix memory leakage
  ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport
  ARM: OMAP2+: DT node Timer iteration fix
  ARM: OMAP2+: Fix section warning for omap_init_ocp2scp()
  ARM: OMAP2+: fix build break for omapdrm
  ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function calls
  ...
2013-01-24 12:42:50 -08:00
Felipe Balbi
eeef458766 usb: gadget: constify all struct usb_gadget_ops
Add the missing 'const' keyword to all struct
usb_gadget_ops in the gadget framework.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-24 21:11:35 +02:00