summaryrefslogtreecommitdiffstats
path: root/drivers/usb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'devicetree-for-4.12' of ↵Linus Torvalds2017-05-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - fix sparse warnings in drivers/of/ - add more overlay unittests - update dtc to v1.4.4-8-g756ffc4f52f6. This adds more checks on dts files such as unit-address formatting and stricter character sets for node and property names - add a common DT modalias function - move trivial-devices.txt up and out of i2c dir - ARM NVIC interrupt controller binding - vendor prefixes for Sensirion, Dioo, Nordic, ROHM - correct some binding file locations * tag 'devicetree-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (24 commits) of: fix sparse warnings in fdt, irq, reserved mem, and resolver code of: fix sparse warning in of_pci_range_parser_one of: fix sparse warnings in of_find_next_cache_node of/unittest: Missing unlocks on error of: fix uninitialized variable warning for overlay test of: fix unittest build without CONFIG_OF_OVERLAY of: Add unit tests for applying overlays of: per-file dtc compiler flags fpga: region: add missing DT documentation for config complete timeout of: Add vendor prefix for ROHM Semiconductor of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() of: Add vendor prefix for Nordic Semiconductor dt-bindings: arm,nvic: Binding for ARM NVIC interrupt controller on Cortex-M dtc: update warning settings for new bus and node/property name checks scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6 scripts/dtc: automate getting dtc version and log in update script of: Add function for generating a DT modalias with a newline of: fix of_device_get_modalias returned length when truncating buffers Documentation: devicetree: move trivial-devices out of I2C realm dt-bindings: add vendor prefix for Dioo ..
| * of: Add function for generating a DT modalias with a newlineRob Herring2017-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The modalias sysfs attr is lacking a newline for DT aliases on platform devices. The macio and ibmebus correctly add the newline, but open code it. Introduce a new function, of_device_modalias(), that fills the buffer with the modalias including the newline and update users of the old of_device_get_modalias function. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Frank Rowand <frowand.list@gmail.com> Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'usb-4.12-rc1' of ↵Linus Torvalds2017-05-05161-3425/+5272
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB updates from Greg KH: "Here is the big USB patchset for 4.12-rc1. Lots of good stuff here, after many many many attempts, the kernel finally has a working typeC interface, many thanks to Heikki and Guenter and others who have taken the time to get this merged. It wasn't an easy path for them at all. There's also a staging driver that uses this new api, which is why it's coming in through this tree. Along with that, there's the usual huge number of changes for gadget drivers, xhci, and other stuff. Johan also finally refactored pretty much every driver that was looking at USB endpoints to do it in a common way, which will help prevent any "badly-formed" devices from causing problems in drivers. That too wasn't a simple task. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) staging: typec: Fairchild FUSB302 Type-c chip driver staging: typec: Type-C Port Controller Interface driver (tcpci) staging: typec: USB Type-C Port Manager (tcpm) usb: host: xhci: remove #ifdef around PM functions usb: musb: don't mark of_dev_auxdata as initdata usb: misc: legousbtower: Fix buffers on stack USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications" usb: Make sure usb/phy/of gets built-in USB: storage: e-mail update in drivers/usb/storage/unusual_devs.h usb: host: xhci: print correct command ring address usb: host: xhci: delete sp_dma_buffers for scratchpad usb: host: xhci: using correct specification chapter reference for DCBAAP xhci: switch to pci_alloc_irq_vectors usb: host: xhci-plat: set resume_quirk() for R-Car controllers usb: host: xhci-plat: add resume_quirk() usb: host: xhci-plat: enable clk in resume timing usb: host: plat: Enable xHCI plat runtime PM USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit USB: serial: constify static arrays usb: fix some references for /proc/bus/usb ...
| * | usb: host: xhci: remove #ifdef around PM functionsArnd Bergmann2017-04-262-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The #ifdef is slightly wrong as it doesn't cover the xhci_priv_resume_quirk() function, causing a harmless warning: drivers/usb/host/xhci-plat.c:58:12: error: 'xhci_priv_resume_quirk' defined but not used [-Werror=unused-function] static int xhci_priv_resume_quirk(struct usb_hcd *hcd) A simpler way to do this correctly is to use __maybe_unused annotations that let the compiler silently drop the functions when there is no reference. Fixes: b0c69b4bace3 ("usb: host: plat: Enable xHCI plat runtime PM") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: musb: don't mark of_dev_auxdata as initdataArnd Bergmann2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The probe function is not __init since it can be called for deferred probing or when unbinding/rebinding the device, and therefore it must not reference objects in __initdata, as pointed out by this link time warning: WARNING: drivers/usb/musb/da8xx.o(.text+0x9d4): Section mismatch in reference from the function da8xx_probe() to the (unknown reference) .init.data:(unknown) This removes the annotation. Reported-by: Olof's autobuilder <olof@lixom.net> Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: misc: legousbtower: Fix buffers on stackMaksim Salau2017-04-261-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate buffers on HEAP instead of STACK for local structures that are to be received using usb_control_msg(). Signed-off-by: Maksim Salau <maksim.salau@gmail.com> Tested-by: Alfredo Rafael Vicente Boix <alviboi@gmail.com>; Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications"Bjørn Mork2017-04-251-99/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 833415a3e781 ("cdc-wdm: fix "out-of-sync" due to missing notifications") There have been several reports of wdm_read returning unexpected EIO errors with QMI devices using the qmi_wwan driver. The reporters confirm that reverting prevents these errors. I have been unable to reproduce the bug myself, and have no explanation to offer either. But reverting is the safe choice here, given that the commit was an attempt to work around a firmware problem. Living with a firmware problem is still better than adding driver bugs. Reported-by: Kasper Holtze <kasper@holtze.dk> Reported-by: Aleksander Morgado <aleksander@aleksander.es> Reported-by: Daniele Palmas <dnlplm@gmail.com> Cc: <stable@vger.kernel.org> # v4.9+ Fixes: 833415a3e781 ("cdc-wdm: fix "out-of-sync" due to missing notifications") Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: storage: e-mail update in drivers/usb/storage/unusual_devs.hPhillip Potter2017-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Updates the e-mail address of Phillip Potter, updater of the Nokia 6288 entry in drivers/usb/storage/unusual_devs.h Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | Merge tag 'usb-serial-4.12-rc1' of ↵Greg Kroah-Hartman2017-04-2030-923/+517
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.12-rc1 Here are the USB-serial updates for 4.12, including: - support for devices with up to 16 ports (e.g. some Moxa devices) - support for endpoint sanity checks in core, which allows for code sharing and avoids allocating resources for rejected interfaces - support for endpoint-port remapping, which allows some driver hacks to be removed as well as omninet to use the generic write implementation - removal of an obsolete tty open-race workaround which prevented a port from being opened immediately after having been registered - generic-driver support for interfaces with just a bulk-in endpoint - improved ftdi_sio event-char and latency-timer handling - improved ftdi_sio support for some broken BM chips Included are also various clean ups and a new ftdi_sio device id. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev KitMarek Vasut2017-04-192-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This development kit has an FT4232 on it with a custom USB VID/PID. The FT4232 provides four UARTs, but only two are used. The UART 0 is used by the FlashPro5 programmer and UART 2 is connected to the SmartFusion2 CortexM3 SoC UART port. Note that the USB VID is registered to Actel according to Linux USB VID database, but that was acquired by Microsemi. Signed-off-by: Marek Vasut <marex@denx.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: constify static arraysJohan Hovold2017-04-193-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Declare three immutable static driver arrays as const. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: quatech2: drop redundant tty_buffer_request_roomJohan Hovold2017-04-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop redundant calls to tty_buffer_request_room and use the more efficient tty_insert_flip_char when inserting single characters. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: iuu_phoenix: drop excessive sanity checksJohan Hovold2017-04-101-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The transfer buffers and URBs are allocated and initialised by USB serial core during probe, and there's no need to check for NULL transfer buffers in the bulk-in completion handlers. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: drop obsolete open-race workaroundJohan Hovold2017-03-311-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a65a6f14dc24 ("USB: serial: fix race between probe and open") fixed a race between probe and open, which could lead to crashes when a not yet fully initialised port was being opened. This race was later incidentally closed by commit 7e73eca6a7b2 ("TTY: move cdev_add to tty_register_device") which moved character-device registration from tty_register_driver to tty_register_device, which isn't called until the port has been fully set up. Remove the now redundant workaround which had the negative side effect of not allowing a port to be opened immediately after user space had been notified of a new tty device. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: drop termios-flag debuggingJohan Hovold2017-03-295-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop some unnecessary termios-flag debugging that have been faithfully reproduced in a few old drivers, including the "clfag" typo and all. This also addresses a compiler warning on sparc where tcflag_t is unsigned long and would have required an explicit cast. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: f81534: clean up port bulk-out setupJohan Hovold2017-03-281-51/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup each port to use the first bulk-out endpoint in calc_num_ports so that core allocates the corresponding port resources for us. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: f81534: clean up calc_num_portsJohan Hovold2017-03-281-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up calc_num_ports with respect to handling older chips that lack config data. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: mxuport: clean up port bulk-out setupJohan Hovold2017-03-281-91/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup each port to use the first bulk-out endpoint in calc_num_ports so that core allocates the corresponding port resources for us. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: mxuport: add endpoint sanity checkJohan Hovold2017-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an explicit sanity check to make sure we have the expected endpoints. This will provide a descriptive error message in case an expected endpoint is missing when probing. Note that the driver already gracefully fails to probe (albeit with a less descriptive error message) if a bulk-in endpoint is missing, and an attempt to write to a port whose device lack a bulk-out endpoint would fail with -ENODEV. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: mxuport: register two ports for unknown devicesJohan Hovold2017-03-281-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print a message and register two ports for interfaces for which we do not know how many ports there are instead of binding, allocating resources, but not register any ports. This provides a hint that anyone adding a dynamic device id must also provide a reference id (driver info) from which the port count can be retrieved, for example: echo <vid> <pid> 0 0x110A 0x1410 > new_id Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: visor: clean up treo endpoint hackJohan Hovold2017-03-281-58/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new endpoint-remap functionality to configure the ports for treo devices instead of poking around in the port structures after the ports have been setup. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: visor: clean up clie_5 endpoint hackJohan Hovold2017-03-281-34/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new endpoint-remap functionality to configure the ports for clie_5 devices. Note that the same bulk-out endpoint is being used for both ports. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: visor: drop redundant calc_num_ports callbackJohan Hovold2017-03-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the redundant calc_num_ports callback from the clie_5 type, for which the callback always returns zero and hence falls back to the type num_ports value (2). Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: ti_usb_3410_5052: always require a bulk-out endpointJohan Hovold2017-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These devices always require at least one bulk-out endpoint so let core verify that. This avoids attempting to send bulk data to the default pipe when downloading firmware in boot mode. Note that further endpoints are still needed when not in boot mode. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: omninet: use generic write implementationJohan Hovold2017-03-281-76/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the endpoint-port mapping has been properly set up during probe, we can switch to using the more efficient generic write implementation. Note that this currently means that chars_in_buffer now overcounts slightly as we always write a full endpoint-sized packet. Also add a copyright entry. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: omninet: clean up port setupJohan Hovold2017-03-281-26/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These devices use the second bulk-out endpoint for writing. Instead of using the resources of the second port structure setup by core, use the new endpoint-remap functionality to simply ignore the first bulk-out endpoint. This specifically avoids allocating resources for the unused endpoint. Note that the disconnect callback was always redundant as all URBs would have been killed by USB core on disconnect. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: mos7840: clean up endpoint sanity checkJohan Hovold2017-03-281-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the endpoint sanity check by letting core verify the single interrupt endpoint, and verifying the bulk endpoints in calc_num_ports after having determined the number of ports. Note that the static type num_ports field was neither correct or used (since calc_num_ports never returns zero). Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: mos7720: always require an interrupt endpointJohan Hovold2017-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver have treated the interrupt endpoint as optional despite it always being present (according to the datasheet). Let's consider it mandatory instead. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: mos7720: clean up mcs7715 port setupJohan Hovold2017-03-281-32/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the mcs7715 port setup by using the new endpoint-remap functionality provided by core. Instead of poking around in internal port-structure fields, simply swap the endpoint descriptors of the two ports in calc_num_ports before the port structures are even allocated. Note that we still need to override the default interrupt completion handler. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: io_ti: drop redundant read-urb checkJohan Hovold2017-03-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the redundant read-urb check from open. The presence of a bulk-in endpoint is now verified during probe and core has allocated the corresponding resources. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: io_ti: verify interrupt endpoint at probeJohan Hovold2017-03-281-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verify that the required interrupt endpoint is present at probe rather than at open to avoid allocating resources for an unusable device. Note that the endpoint is only required when in download mode. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: io_ti: always require a bulk-out endpointJohan Hovold2017-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These devices always require at least one bulk-out endpoint so let core verify that. This avoids attempting to send bulk data to the default pipe when downloading firmware in boot mode. Note that further endpoints are still needed when not in boot mode. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: io_ti: use calc_num_endpoints to verify endpointsJohan Hovold2017-03-281-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the calc_num_ports rather than attach callback to verify that the required endpoints are present when in download mode. This avoids allocating port resources for interfaces that won't be bound. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: ipaq: always register a single portJohan Hovold2017-03-281-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the calc_num_ports callback to ignore unused endpoints. The driver binds to any interface with at least one bulk-in and one bulk-out endpoint, but some devices can have three or more endpoints of which only either the first or second pair of endpoints is needed. This avoids allocating resources for unused endpoints, and specifically a port is no longer registered for the unused first endpoint pair when there are more than three endpoints. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: ipaq: use calc_num_endpoints to verify endpointsJohan Hovold2017-03-281-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the calc_num_ports rather than attach callback to determine which interface to bind to in order to avoid allocating port-resources for interfaces that won't be bound. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: f81534: abort probe on early errorsJohan Hovold2017-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can now abort probe early after an error in calc_num_ports by returning an errno instead of attempting to continue probing but not register any ports. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: f81534: use calc_num_endpoints to verify endpointsJohan Hovold2017-03-281-44/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present and moving the max-packet check to calc_num_ports. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: aircable: use calc_num_endpoints to verify endpointsJohan Hovold2017-03-281-28/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the calc_num_ports rather than probe callback to determine which interface to bind to. This allows us to remove some duplicate code. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: pl2303: clean up legacy endpoint hackJohan Hovold2017-03-281-38/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the "horrible endpoint hack" for some legacy devices as a quirk and clean up the code somewhat. Note that the bulk-endpoint check can be removed as core will already have verified this. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: move pl2303 hack out of usb-serial coreJohan Hovold2017-03-282-42/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some pl2303 devices require the use of the interrupt endpoint of an unrelated interface. This has so far been dealt with in usb-serial core, but can now be moved to a driver calc_num_ports callback. Note that we relax the endpoint requirements checked by core and instead verify that we have an interrupt-in endpoint in calc_num_ports for all devices so that the hack can first be applied. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: relax generic driver bulk-endpoint requirementJohan Hovold2017-03-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Relax the generic driver bulk-endpoint requirement. The driver handles devices without bulk-out endpoints just fine these days. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: add calc_num_ports callback to generic driverJohan Hovold2017-03-282-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a calc_num_ports callback to the generic driver and verify that the device has the required endpoints there instead of in core. Note that the generic driver num_ports field was never used. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: add probe callback to generic driverJohan Hovold2017-03-282-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a probe callback to the generic driver and print the only-for-testing message there. This is a first step in getting rid of the CONFIG_USB_SERIAL_GENERIC ifdef from usb-serial core. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: allow subdrivers to modify port-endpoint mappingJohan Hovold2017-03-289-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow subdrivers to modify the port-endpoint mapping by passing the endpoint descriptors to calc_num_ports. The callback can now also be used to verify that the required endpoints exists and abort probing otherwise. This will allow us to get rid of a few hacks in subdrivers that are already modifying the port-endpoint mapping (or aborting probe due to missing endpoints), but only after the port structures have been setup. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: whiteheat: simplify endpoint checkJohan Hovold2017-03-161-30/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Note that the driver registers four ports but uses five bulk-endpoint pairs. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: symbolserial: simplify endpoint checkJohan Hovold2017-03-161-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: spcp8x5: simplify endpoint checkJohan Hovold2017-03-161-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: pl2303: simplify endpoint checkJohan Hovold2017-03-161-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: oti6858: simplify endpoint checkJohan Hovold2017-03-161-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold <johan@kernel.org>
| | * | USB: serial: opticon: simplify endpoint checkJohan Hovold2017-03-161-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold <johan@kernel.org>