]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: cp210x: Adding GPIO support for CP2105
authorMartyn Welch <martyn.welch@collabora.co.uk>
Thu, 20 Oct 2016 14:13:54 +0000 (15:13 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 24 Oct 2016 10:00:19 +0000 (12:00 +0200)
commit3cc0c108d1b11036b77ddc996d3ddf6dd7a5c493
tree1fb0b0d1d179ce58f44f953abcdea3a5582c10fe
parent078c55f0c65038e72a9ba95e3d63c716f37843ce
USB: serial: cp210x: Adding GPIO support for CP2105

This patch adds support for the GPIO found on the CP2105. Unlike the GPIO
provided by some of the other devices supported by the cp210x driver, the
GPIO on the CP2015 is muxed on pins otherwise used for serial control
lines. The GPIO have been configured in 2 separate banks as the choice to
configure the pins for GPIO is made separately for pins shared with each
of the 2 serial ports this device provides, though the choice is made for
all pins associated with that port in one go. The choice of whether to use
the pins for GPIO or serial is made by adding configuration to a one-time
programable PROM in the chip and can not be changed at runtime. The device
defaults to GPIO.

This device supports either push-pull or open-drain modes, it doesn't
provide an explicit input mode, though the state of the GPIO can be read
when used in open-drain mode. Like with pin use, the mode is configured in
the one-time programable PROM and can't be changed at runtime.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c