From: Johan Hovold <johan@kernel.org>
To: Pho Tran <Pho.Tran@silabs.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
Hung Nguyen <Hung.Nguyen@silabs.com>
Subject: Re: [PATCH] USB: serial: cp210x: Make the CP210x driver work with GPIOs of CP2108
Date: Fri, 5 Mar 2021 10:59:35 +0100 [thread overview]
Message-ID: <YEIBB+Se1zdUpctn@hovoldconsulting.com> (raw)
In-Reply-To: <3734B8C1-9AFA-494E-9C5B-433219D1F55A@silabs.com>
On Thu, Mar 04, 2021 at 09:50:47AM +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>
> ---
Which version is this and what changed since the previous one? Always
include a patch revision in the Subject when resending (e.g.
"[PATCH v3]: USB: ...") and add a short changelog here.
I tried not to look at the code but I still see some overly long lines
(e.g. comments beyond 80 cols).
Johan
next prev parent reply other threads:[~2021-03-05 10:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 8:13 [PATCH] USB: serial: cp210x: Make the CP210x driver work with GPIOs of CP2108 Pho Tran
2021-03-01 8:55 ` Johan Hovold
2021-03-04 9:50 ` Pho Tran
2021-03-05 9:59 ` Johan Hovold [this message]
[not found] ` <71DBC945-FBA0-4FDF-8167-95697A5AFF44@silabs.com>
2021-03-05 10:51 ` [PATCH v2] " Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YEIBB+Se1zdUpctn@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=Hung.Nguyen@silabs.com \
--cc=Pho.Tran@silabs.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.