USB: serial: cp210x: add GPIO support for CP2104
authorIcenowy Zheng <icenowy@aosc.io>
Mon, 28 Jan 2019 05:57:17 +0000 (13:57 +0800)
committerJohan Hovold <johan@kernel.org>
Mon, 4 Feb 2019 16:24:48 +0000 (17:24 +0100)
commit15fb84b741966c8a08e02e145ec5932d51b6c4ad
treef3834781910c045ab47e6a926fab2260080051f0
parenta49e1abf07701600ad5ef990e56d676cbab91bf5
USB: serial: cp210x: add GPIO support for CP2104

The CP2104 chips feature 4 controllable GPIO pins, which are similar to
the ones on CP2102N chip (output-only when push-pull, output or
simulated input mode when open-drain).

Add support for the GPIO pins for cp210x driver. The pin get/set routine
is shared with CP2102N, but the pinconf initialization code is not
shared because the acquisition of GPIO configuration in OTP ROM is
similar to CP2105, not CP2102N.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c