From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
To: Dong Aisheng <dongas86@gmail.com>
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
linux-serial@vger.kernel.org, fugang.duan@nxp.com,
gregkh@linuxfoundation.org, yangbo.lu@nxp.com,
linux-kernel@vger.kernel.org, stefan@agner.ch,
Mingkai.Hu@nxp.com, jslaby@suse.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support
Date: Wed, 17 May 2017 08:43:34 +0300 [thread overview]
Message-ID: <48819894-4943-7d14-ccf8-83cfd2195c9a@cogentembedded.com> (raw)
In-Reply-To: <20170517033139.GB9913@b29396-OptiPlex-7040>
>>> @@ -2000,6 +2007,7 @@ static int lpuart_probe(struct platform_device *pdev)
>>> }
>>> sport->port.line = ret;
>>> sport->lpuart32 = sdata->is_32;
>>> + lpuart_is_be = sdata->is_be;
>>
>> Setting a global variable in per-device routine is quite bad design.
>>
>
> There is a reason for that we don't want to change the exist
> lpuart32_read[write] API which is widely used in driver.
> Making a global lpuart_is_be is the simplest way to do it.
>
> Any strong blocking reason?
Code should be consistent.
There is no good reason to have sport->lpuart32 inside sport, but
lpuart_is_be outside of it. Both these values describe properties of
particular device, and thus should be in per-device structure.
If that implies adding sport arg to lpuart32_(read|write), just do that.
next prev parent reply other threads:[~2017-05-17 5:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 7:48 [PATCH V2 0/6] tty: serial: lpuart: add imx7ulp support Dong Aisheng
2017-05-15 7:48 ` [PATCH V2 1/6] tty: serial: lpuart: introduce lpuart_soc_data to represent SoC property Dong Aisheng
2017-05-15 13:35 ` Andy Shevchenko
2017-05-15 7:48 ` [PATCH V2 2/6] tty: serial: lpuart: add little endian 32 bit register support Dong Aisheng
2017-05-15 13:36 ` Andy Shevchenko
2017-05-17 3:26 ` Dong Aisheng
2017-05-16 11:08 ` [V2, " Nikita Yushchenko
2017-05-17 3:31 ` Dong Aisheng
2017-05-17 5:43 ` Nikita Yushchenko [this message]
2017-05-17 6:01 ` A.S. Dong
2017-05-17 6:25 ` Nikita Yushchenko
2017-05-17 7:00 ` Dong Aisheng
2017-05-17 8:04 ` Nikita Yushchenko
2017-05-19 15:07 ` Dong Aisheng
2017-05-23 5:24 ` Nikita Yushchenko
2017-05-31 8:07 ` Dong Aisheng
2017-05-16 11:15 ` Nikita Yushchenko
2017-05-17 3:39 ` Dong Aisheng
2017-05-17 5:37 ` Nikita Yushchenko
2017-05-17 5:43 ` Dong Aisheng
2017-05-17 5:50 ` Nikita Yushchenko
2017-05-17 6:09 ` Dong Aisheng
2017-05-17 9:55 ` Andy Shevchenko
2017-05-31 7:47 ` Dong Aisheng
2017-05-17 9:53 ` Andy Shevchenko
2017-05-15 7:48 ` [PATCH V2 3/6] dt-bindings: serial: fsl-lpuart: add i.MX7ULP support Dong Aisheng
2017-05-15 7:48 ` [PATCH V2 4/6] tty: serial: lpuart: add imx7ulp support Dong Aisheng
2017-05-15 7:48 ` [PATCH V2 5/6] tty: serial: lpuart: add earlycon support for imx7ulp Dong Aisheng
2017-05-15 7:48 ` [PATCH V2 6/6] tty: serial: lpuart: add a more accurate baud rate calculation method Dong Aisheng
2017-05-15 17:06 ` Stefan Agner
2017-05-17 3:47 ` Dong Aisheng
2017-05-17 17:35 ` Stefan Agner
2017-05-19 11:50 ` Dong Aisheng
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=48819894-4943-7d14-ccf8-83cfd2195c9a@cogentembedded.com \
--to=nikita.yoush@cogentembedded.com \
--cc=Mingkai.Hu@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=dongas86@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=stefan@agner.ch \
--cc=yangbo.lu@nxp.com \
/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®