From: Johan Hovold <johan@kernel.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 5/7] USB: serial: xr: add support for XR21B1411
Date: Tue, 30 Mar 2021 17:07:10 +0200 [thread overview]
Message-ID: <YGM+nqOCC4CcX1hU@hovoldconsulting.com> (raw)
In-Reply-To: <b53d8889ed0f47c8ae12a8c65df7a970819e72fd.1616571453.git.mchehab+huawei@kernel.org>
On Wed, Mar 24, 2021 at 08:41:09AM +0100, Mauro Carvalho Chehab wrote:
> There's nothing special on this device: it has just one port.
>
> The only difference is that it uses a different register set.
Not quite true. First, it uses 12-bit registers, which the driver isn't
updated for. Similarly, it used 12-bit register *addresses* which
likewise the driver isn't updated for and the upper bits are simply
discarded.
This device also doesn't support CS5 and CS6 which would need to be
handled.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> drivers/usb/serial/xr_serial.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c
> index 058624d15505..b1044dd3e994 100644
> --- a/drivers/usb/serial/xr_serial.c
> +++ b/drivers/usb/serial/xr_serial.c
> @@ -99,6 +99,7 @@ struct xr_txrx_clk_mask {
> #define VIA_CDC_REGISTER -1
>
> enum xr_model {
> + XR21B1411,
> XR21V141X,
> XR21B142X,
> MAX_XR_MODELS
> @@ -132,6 +133,30 @@ enum xr_hal_type {
> };
>
> static const int xr_hal_table[MAX_XR_MODELS][MAX_XR_HAL_TYPE] = {
> + [XR21B1411] = {
> + [REG_ENABLE] = 0xc00,
> + [REG_FORMAT] = VIA_CDC_REGISTER,
> + [REG_FLOW_CTRL] = 0xc06,
> + [REG_XON_CHAR] = 0xc07,
> + [REG_XOFF_CHAR] = 0xc08,
> + [REG_TX_BREAK] = 0xc0a,
> + [REG_RS485_DELAY] = 0xc0b,
> + [REG_GPIO_MODE] = 0xc0c,
> + [REG_GPIO_DIR] = 0xc0d,
> + [REG_GPIO_SET] = 0xc0e,
> + [REG_GPIO_CLR] = 0xc0f,
> + [REG_GPIO_STATUS] = 0xc10,
> + [REG_GPIO_INT_MASK] = 0xc11,
> + [REG_CUSTOMIZED_INT] = 0xc12,
> + [REG_GPIO_PULL_UP_ENABLE] = 0xc14,
> + [REG_GPIO_PULL_DOWN_ENABLE] = 0xc15,
> + [REG_LOOPBACK] = 0xc16,
> + [REG_LOW_LATENCY] = 0xcc2,
> + [REG_CUSTOM_DRIVER] = 0x20d,
> +
> + [REQ_SET] = 0,
> + [REQ_GET] = 1,
> + },
> [XR21V141X] = {
> [REG_ENABLE] = 0x03,
> [REG_FORMAT] = 0x0b,
Johan
next prev parent reply other threads:[~2021-03-30 15:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 7:41 [PATCH v2 0/7] Add support for the other MaxLinear/Exar UARTs Mauro Carvalho Chehab
2021-03-24 7:41 ` [PATCH v2 1/7] USB: serial: xr: simplify its namespace Mauro Carvalho Chehab
2021-03-24 7:41 ` [PATCH v2 2/7] USB: serial: xr: use a table for device-specific settings Mauro Carvalho Chehab
2021-03-30 14:44 ` Johan Hovold
2021-03-24 7:41 ` [PATCH v2 3/7] USB: serial: xr: add support for multi-port XR21V141X variants Mauro Carvalho Chehab
2021-03-30 14:50 ` Johan Hovold
2021-03-24 7:41 ` [PATCH v2 4/7] USB: serial: xr: add support for XR21B142X devices Mauro Carvalho Chehab
2021-03-30 15:04 ` Johan Hovold
2021-03-24 7:41 ` [PATCH v2 5/7] USB: serial: xr: add support for XR21B1411 Mauro Carvalho Chehab
2021-03-30 15:07 ` Johan Hovold [this message]
2021-03-24 7:41 ` [PATCH v2 6/7] USB: serial: xr: add support for XR2280X devices Mauro Carvalho Chehab
2021-03-30 15:08 ` Johan Hovold
2021-03-24 7:41 ` [PATCH v2 7/7] USB: cdc-acm: add other non-standard xr_serial models to ignore list Mauro Carvalho Chehab
2021-03-30 15:14 ` Johan Hovold
2021-03-30 14:35 ` [PATCH v2 0/7] Add support for the other MaxLinear/Exar UARTs 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=YGM+nqOCC4CcX1hU@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab+huawei@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®