Thread (1 message) 1 message, 1 author, 2021-03-12

Re: [PATCH v4] USB: serial: cp210x: Make the CP210x driver work with GPIOs of CP2108

From: Johan Hovold <johan@kernel.org>
Date: 2021-03-12 08:37:29
Also in: lkml

On Fri, Mar 12, 2021 at 04:27:57AM +0000, Pho Tran wrote:
Similar to other CP210x devices, GPIO interfaces (gpiochip) should be
supported for CP2108.

CP2108 has 4 serial interfaces but only 1 set of GPIO pins are shared
to all of those interfaces. So, just need to initialize GPIOs of CP2108
with only one interface (I use interface 0). It means just only 1 gpiochip
device file will be created for CP2108.

CP2108 has 16 GPIOs, So data types of several variables need to be is u16
instead of u8(in struct cp210x_serial_private). This doesn't affect other
CP210x devices.

Because CP2108 has 16 GPIO pins, the parameter passed by cp210x functions
will be different from other CP210x devices. So need to check part number
of the device to use correct data format  before sending commands to
devices.

Like CP2104, CP2108 have GPIO pins with configurable options. Therefore,
should be mask all pins which are not in GPIO mode in cp2108_gpio_init()
function.

Signed-off-by: Pho Tran <pho.tran@silabs.com<mailto:pho.tran@silabs.com>>
—
03/05/2021: Patch v3 modified format and contents of changelog follow feedback
from Jonhan Hovold <johan@kernel.org<mailto:johan@kernel.org>>.
03/04/2021: Patch v2 modified format patch as comment from
Johan Hovold <johan@kernel.org<mailto:johan@kernel.org>>:
1. Break commit message lines at 80 cols
2. Use kernel u8 and u16 types instead of the c99 ones.
03/01/2021: Initialed submission of patch “Make the CP210x driver work with
GPIOs of CP2108.”.
Why are you resending the v4 that you submitted only four days ago? 

Note that this version is again white space corrupted, and something
happened to you SOB tag above.

Johan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help