Skip to content
Commit 8051334e authored by Pho Tran's avatar Pho Tran Committed by Johan Hovold
Browse files

USB: serial: cp210x: add support for GPIOs on CP2108



Similar to some other CP210x device types, CP2108 has a number of GPIO
pins that can be exposed through gpiolib.

CP2108 has four serial interfaces but only one set of GPIO pins, which
is modelled as a single gpio chip and registered as a child of the first
interface.

CP2108 has 16 GPIOs so the width of the state variables needs to be
extended to 16 bits and this is also reflected in the control requests.

Like CP2104, CP2108 have GPIO pins with configurable alternate
functions and pins unavailable for GPIO use are determined and reported
to gpiolib at probe.

Signed-off-by: default avatarPho Tran <pho.tran@silabs.com>
Co-developed-by: default avatarTung Pham <tung.pham@silabs.com>
Signed-off-by: default avatarTung Pham <tung.pham@silabs.com>
[ johan: rewrite gpio get() and set(); misc cleanups; amend commit
         message ]
Link: https://lore.kernel.org/r/20210610132844.25495-1-johan@kernel.org


Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 17cd3a10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment