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
Date: Tue, 23 Feb 2021 11:14:28 +0100 [thread overview]
Message-ID: <YDTVhIrMrFtbcJy9@hovoldconsulting.com> (raw)
In-Reply-To: <MWHPR1101MB20783123E0E9AD359DD48186E3809@MWHPR1101MB2078.namprd11.prod.outlook.com>
On Tue, Feb 23, 2021 at 10:02:08AM +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 which is 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, in cp2108_gpio_init() function,
> Should be mask all pins which are not in GPIO mode.
>
> Signed-off-by: Pho Tran <pho.tran@silabs.com<mailto:pho.tran@silabs.com>>
> ---
> drivers/usb/serial/cp210x.c | 199 +++++++++++++++++++++++++++++++-----
> 1 file changed, 172 insertions(+), 27 deletions(-)
You sent this patch twice, and I'm afraid both have been white-space
corrupted (e.g. by your mailer).
Try sending the patch to yourself first and make sure you can apply it
using git-am (and run checkpatch.pl on it without any obvious errors).
Johan
parent reply other threads:[~2021-02-23 10:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <MWHPR1101MB20783123E0E9AD359DD48186E3809@MWHPR1101MB2078.namprd11.prod.outlook.com>]
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=YDTVhIrMrFtbcJy9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®