- 01 2月, 2022 1 次提交
-
-
由 Cameron Williams 提交于
This patch adds support for the Brainboxes US-159, US-235 and US-320 USB-to-Serial devices. Signed-off-by: NCameron Williams <cang1@live.co.uk> Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 21 9月, 2021 1 次提交
-
-
由 Himadri Pandya 提交于
usb_control_msg_recv() nicely wraps usb_control_msg() and removes the compulsion of using DMA buffers for USB messages. It also includes proper error check for possible short read. So use the wrapper where appropriate and remove DMA buffers from the callers. Signed-off-by: NHimadri Pandya <himadrispandya@gmail.com> Link: https://lore.kernel.org/r/20210801203122.3515-5-himadrispandya@gmail.com [ johan: amend commit message ] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 26 8月, 2021 1 次提交
-
-
由 Utkarsh Verma 提交于
Replace symbolic permission macros with octal permission numbers because octal permission numbers are easier to read and understand instead of their symbolic macro names. No functional change. Suggested-by: NLukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: NUtkarsh Verma <utkarshverma294@gmail.com> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 05 8月, 2021 1 次提交
-
-
由 David Bauer 提交于
The Auto-M3 OP-COM v2 is a OBD diagnostic device using a FTD232 for the USB connection. Signed-off-by: NDavid Bauer <mail@david-bauer.net> Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 05 6月, 2021 1 次提交
-
-
由 George McCollister 提交于
Add PID for the NovaTech OrionMX so it can be automatically detected. Signed-off-by: NGeorge McCollister <george.mccollister@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 10 5月, 2021 1 次提交
-
-
由 Dominik Andreas Schorpp 提交于
Add the IDS GmbH Vendor ID and the Product IDs for SI31A (2xRS232) and CM31A (LoRaWAN Modem). Signed-off-by: NDominik Andreas Schorpp <dominik.a.schorpp@ids.de> Signed-off-by: NJuergen Borleis <jbe@pengutronix.de> Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 08 4月, 2021 5 次提交
-
-
由 Johan Hovold 提交于
The TIOCSSERIAL implementation needs to compare the old flag and divisor settings with the new to detect ASYNC_SPD changes, but there's no need to copy all driver state to the stack for that. While at it, unbreak the function parameter list. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
Changing the deprecated custom_divisor field is an unprivileged operation so after verifying that flag field does not contain any privileged changes both updates can be carried out by any user. Combine the two branches and drop the erroneous comment. Note that private flags field is only used for ASYNC flags so there's no need to try to retain any other bits when updating the flags. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
The TIOCSSERIAL error handling is inconsistent at best, but drivers tend to ignore requests to change parameters which cannot be changed rather than return an error. The FTDI driver ignores change requests for all immutable parameters but baud_base so return success also in this case for consistency. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The closing_wait parameter determines how long to wait for the transfer buffers to drain during close and the default timeout of 30 seconds may not be sufficient at low line speeds. In other cases, when for example flow is stopped, the default timeout may instead be too long. Add generic support for TIOCSSERIAL and TIOCGSERIAL with handling of the three common parameters close_delay, closing_wait and line for the benefit of all USB serial drivers while still allowing drivers to implement further functionality through the existing callbacks. This currently includes a few drivers that report their base baud clock rate even if that is really only of interest when setting custom divisors through the deprecated ASYNC_SPD_CUST interface; an interface which only the FTDI driver actually implements. Some drivers have also been reporting back a fake UART type, something which should no longer be needed and will be dropped by a follow-on patch. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The FTDI driver is the only USB serial driver supporting the deprecated ASYNC_SPD flags, which are reported back as they should by TIOCGSERIAL, but the returned parameters did not include the line number. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 09 2月, 2021 1 次提交
-
-
由 Uwe Kleine-König 提交于
All usb_serial drivers return 0 in their remove callbacks and driver core ignores the value returned by usb_serial_device_remove(). So change the remove callback to return void and return 0 unconditionally in usb_serial_device_remove(). Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.orgSigned-off-by: NJohan Hovold <johan@kernel.org>
-
- 01 2月, 2021 2 次提交
-
-
由 Johan Hovold 提交于
Add back a few explanatory comments related to the divisor encoding which got lost in a coding-style clean up many years ago. Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
The most-significant bit of the sub-integer-prescaler index is set in the high byte of the baudrate request wIndex also for FTX devices. This fixes rates like 1152000 which got mapped to 1.2 MBd. Reported-by: NVladimir <svv75@mail.ru> Link: https://bugzilla.kernel.org/show_bug.cgi?id=210351 Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 10 12月, 2020 3 次提交
-
-
由 Marc Zyngier 提交于
The validity of the ftdi CBUS GPIO is pretty hidden so far, and finding out *why* some GPIOs don't work is sometimes hard to identify. So let's help the user by displaying the map of the CBUS pins that are valid for a GPIO. Suggested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201204164739.781812-4-maz@kernel.orgReviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> [johan: demote to KERN_DEBUG, rephrase messages, drop ftx-prog warning] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Marc Zyngier 提交于
Now that gpiolib can track the validity of GPIO pins, there is no need to check whether the line is valid in request(). Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201204164739.781812-5-maz@kernel.orgReviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> [johan: amend commit message] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Marc Zyngier 提交于
Since it is pretty common for only some of the CBUS lines to be valid as GPIO lines, let's report such validity to the rest of the kernel. Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201204164739.781812-3-maz@kernel.orgReviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 05 10月, 2020 1 次提交
-
-
由 Mychaela N. Falconia 提交于
ftdi_determine_type() function had this construct in it to get the number of the interface it is operating on: inter = serial->interface->altsetting->desc.bInterfaceNumber; Elsewhere in this driver cur_altsetting is used instead for this purpose. Change ftdi_determine_type() to use cur_altsetting for consistency. Signed-off-by: NMychaela N. Falconia <falcon@freecalypso.org> [ johan: fix old style issues; drop braces and random white space ] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 01 10月, 2020 1 次提交
-
-
由 Johan Hovold 提交于
Drivers should not assume that interface descriptors have been parsed in any particular order so match on interface number instead when rejecting JTAG interfaces. Also use the interface struct device for notifications so that the interface number is included. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 29 9月, 2020 1 次提交
-
-
由 Mychaela N. Falconia 提交于
There exist many FT2232-based JTAG+UART adapter designs in which FT2232 Channel A is used for JTAG and Channel B is used for UART. The best way to handle them in Linux is to have the ftdi_sio driver create a ttyUSB device only for Channel B and not for Channel A: a ttyUSB device for Channel A would be bogus and will disappear as soon as the user runs OpenOCD or other applications that access Channel A for JTAG from userspace, causing undesirable noise for users. The ftdi_sio driver already has a dedicated quirk for such JTAG+UART FT2232 adapters, and it requires assigning custom USB IDs to such adapters and adding these IDs to the driver with the ftdi_jtag_quirk applied. Boutique hardware manufacturer Falconia Partners LLC has created a couple of JTAG+UART adapter designs (one buffered, one unbuffered) as part of FreeCalypso project, and this hardware is specifically made to be used with Linux hosts, with the intent that Channel A will be accessed only from userspace via appropriate applications, and that Channel B will be supported by the ftdi_sio kernel driver, presenting a standard ttyUSB device to userspace. Toward this end the hardware manufacturer will be programming FT2232 EEPROMs with custom USB IDs, specifically with the intent that these IDs will be recognized by the ftdi_sio driver with the ftdi_jtag_quirk applied. Signed-off-by: NMychaela N. Falconia <falcon@freecalypso.org> [johan: insert in PID order and drop unused define] Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 24 8月, 2020 1 次提交
-
-
由 Patrick Riphagen 提交于
The device added has an FTDI chip inside. The device is used to connect Xsens USB Motion Trackers. Cc: stable@vger.kernel.org Signed-off-by: NPatrick Riphagen <patrick.riphagen@xsens.com> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 09 7月, 2020 5 次提交
-
-
由 Johan Hovold 提交于
Drop redundant URB transfer-buffer casts. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
Only set the sysrq timestamp for console ports to avoid having every driver also check the console flag when processing incoming data. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
Only the last NUL in a packet should be flagged as a break character, for example, to avoid dropping unrelated characters when IGNBRK is set. Also make sysrq work by consuming the break character instead of having it immediately cancel the sysrq request, and by not processing it prematurely to avoid triggering a sysrq based on an unrelated character received in the same packet (which was received *before* the break). Note that the break flag can be left set also for a packet received immediately following a break and that and an ending NUL in such a packet will continue to be reported as a break as there's no good way to tell it apart from an actual break. Tested on FT232R and FT232H. Fixes: 72fda3ca ("USB: serial: ftd_sio: implement sysrq handling on break") Fixes: 1da177e4 ("Linux-2.6.12-rc2") Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
Clean up receive processing by dropping the character pointer and keeping the length argument unchanged throughout the function. Also make it more apparent that sysrq processing can consume a characters by adding an explicit continue. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
Use an unsigned type for the process-packet buffer argument and give it a more apt name. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 15 11月, 2019 1 次提交
-
-
由 Fabio D'Urso 提交于
This device presents itself as a USB hub with three attached devices: - An ACM serial port connected to the GPS module (not affected by this commit) - An FTDI serial port connected to the GPS module (1546:0502) - Another FTDI serial port connected to the ODIN-W2 radio module (1546:0503) This commit registers U-Blox's VID and the PIDs of the second and third devices. Datasheet: https://www.u-blox.com/sites/default/files/C099-F9P-AppBoard-Mbed-OS3-FW_UserGuide_%28UBX-18063024%29.pdfSigned-off-by: NFabio D'Urso <fabiodurso@hotmail.it> Cc: stable <stable@vger.kernel.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 02 10月, 2019 1 次提交
-
-
由 Beni Mahler 提交于
Both devices added here have a FTDI chip inside. The device from Echelon is called 'Network Interface' it is actually a LON network gateway. ID 0403:8348 Future Technology Devices International, Ltd https://www.eltako.com/fileadmin/downloads/de/datenblatt/Datenblatt_PL-SW-PROF.pdf ID 0920:7500 Network Interface https://www.echelon.com/products/u20-usb-network-interfaceSigned-off-by: NBeni Mahler <beni.mahler@gmx.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 28 8月, 2019 1 次提交
-
-
由 Matthew Michilot 提交于
Enable support for cbus gpios on FT232H. The cbus configuration is stored in two words in the EEPROM at byte-offset 0x1a with the mux config for ACBUS5, ACBUS6, ACBUS8 and ACBUS9 (only pins that can be configured as I/O mode). Tested using FT232H by configuring one ACBUS pin at a time. Reviewed-by: NTim Harvey <tharvey@gateworks.com> Signed-off-by: NMatthew Michilot <matthew.michilot@gmail.com> [ johan: fix copy-paste error in commit message ] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 28 6月, 2019 1 次提交
-
-
由 Andreas Fritiofson 提交于
This adds the vid:pid of the isodebug v1 isolated JTAG/SWD+UART. Only the second channel is available for use as a serial port. Signed-off-by: NAndreas Fritiofson <andreas.fritiofson@unjo.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 20 6月, 2019 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
While there are a mix of things here, most of the stuff were written from Kernel developer's PoV. So, add them to the driver-api book. A follow up for this patch would be to move documents from there that are specific to sysadmins, adding them to the admin-guide. Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: NJohan Hovold <johan@kernel.org> Acked-by: NFelipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 3月, 2019 1 次提交
-
-
由 George McCollister 提交于
Add PIDs for the NovaTech OrionLX+ and Orion I/O so they can be automatically detected. Signed-off-by: NGeorge McCollister <george.mccollister@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 15 2月, 2019 1 次提交
-
-
由 Mans Rullgard 提交于
This adds the USB ID of the Hjelmslund Electronics USB485 Iso stick. Signed-off-by: NMans Rullgard <mans@mansr.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 14 1月, 2019 1 次提交
-
-
由 Karoly Pados 提交于
There is a bug in the current GPIO code for ftdi_sio: it failed to take USB autosuspend into account. If the device is in autosuspend, calls to usb_control_msg() fail with -EHOSTUNREACH. Because the standard value for autosuspend timeout is usually 2-5 seconds, this made it almost impossible to use the GPIOs on machines that have USB autosuspend enabled. This patch fixes the issue by acquiring a PM lock on the device for the duration of the USB transfers. Tested on an FT231X device. Signed-off-by: NKaroly Pados <pados@pados.hu> [ johan: simplify code somewhat ] Fixes: ba93cc7d ("USB: serial: ftdi_sio: implement GPIO support for FT-X devices") Cc: stable <stable@vger.kernel.org> # 4.20 Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 23 11月, 2018 1 次提交
-
-
由 Nikolaj Fogh 提交于
Improve baud-rate generation by using rounding-to-closest instead of truncation in divisor calculation. Results have been verified by logic analyzer on an FT232RT (232BM) chip. The following table shows the wanted baud rate, the baud rate obtained with the old method (truncation), with the new method (rounding) and the baud rate generated by the windows 10 driver. The numbers in parentheses is the error. +- Wanted --+------ Old -------+------ New -------+------ Win -------+ | 9600 | 9600 (0.00%) | 9604 (0.05%) | 9605 (0.05%) | | 19200 | 19200 (0.00%) | 19199 (0.01%) | 19198 (0.01%) | | 38400 | 38395 (0.01%) | 38431 (0.08%) | 38394 (0.02%) | | 57600 | 57725 (0.22%) | 57540 (0.10%) | 57673 (0.13%) | | 115200 | 115307 (0.09%) | 115330 (0.11%) | 115320 (0.10%) | | 921600 | 919963 (0.18%) | 920386 (0.13%) | 920810 (0.09%) | | 961200 | 996512 (3.67%) | 956480 (0.49%) | 956937 (0.44%) | +-----------+------------------+------------------+------------------+ The error due to noise in the measurements is in the order of a few tenths of a %. As can be seen, the baud rate is significantly improved for some rates (e.g. 961200), and corresponds to the output given by the windows driver. The theoretical baud rate has been calculated for all baud rates from 1 to 3M, and as expected, the error is centered around 0, with a triangle shape instead of a sawtooth, so the maximum error is decreased to half. Signed-off-by: NNikolaj Fogh <nikolajfogh@gmail.com> [ johan: edit commit message slightly ] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 13 10月, 2018 1 次提交
-
-
由 Al Viro 提交于
Reviewed-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 05 10月, 2018 2 次提交
-
-
由 Johan Hovold 提交于
Enable support for cbus gpios on FT232R. The cbus configuration is stored in one word in the EEPROM at offset 0x0a (byte-offset 0x14) with the mux config for CBUS0, CBUS1, CBUS2 and CBUS3 in bits 0..3, 4..7, 8..11 and 12..15, respectively. Tested using FT232RL by configuring one cbus pin at a time. Signed-off-by: NJohan Hovold <johan@kernel.org>
-
由 Johan Hovold 提交于
Drop the gpio line names, which cause gpiolib to complain loudly whenever a second ftdi gpiochip is registered: gpio gpiochip5: Detected name collision for GPIO name 'CBUS0' gpio gpiochip5: Detected name collision for GPIO name 'CBUS1' gpio gpiochip5: Detected name collision for GPIO name 'CBUS2' gpio gpiochip5: Detected name collision for GPIO name 'CBUS3' and also prevents the legacy sysfs interface from being used (as the line names are used as device names whenever they are set): sysfs: cannot create duplicate filename '/class/gpio/CBUS0' Until non-unique names are supported by gpiolib (without warnings and stack dumps), let's leave the gpio lines unnamed. Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 26 9月, 2018 1 次提交
-
-
由 Karoly Pados 提交于
This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS bitbanging mode. There is no conflict between the GPIO and VCP functionality in this mode. Tested on FT230X and FT231X. As there is no way to request the current CBUS register configuration from the device, all CBUS pins are set to a known state when the first GPIO is requested. This allows using libftdi to set the GPIO pins before loading this module for UART functionality, a behavior that existing applications might be relying upon (though no specific case is known to the authors of this patch). Signed-off-by: NKaroly Pados <pados@pados.hu> [ johan: minor style changes ] Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 21 5月, 2018 1 次提交
-
-
由 Johan Hovold 提交于
Clean up the somewhat convoluted hardware-assisted flow control handling. Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJohan Hovold <johan@kernel.org>
-