public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/6] serial: add UniPhier serial driver
Date: Fri, 5 Sep 2014 14:59:32 +0200	[thread overview]
Message-ID: <201409051459.32383.marex@denx.de> (raw)
In-Reply-To: <20140905210338.4FA6.AA925319@jp.panasonic.com>

On Friday, September 05, 2014 at 02:03:38 PM, Masahiro Yamada wrote:
> Hi Marek,
> 
> 
> 
> On Fri, 5 Sep 2014 12:35:18 +0200
> 
> Marek Vasut <marex@denx.de> wrote:
> > On Friday, September 05, 2014 at 07:50:19 AM, Masahiro Yamada wrote:
> > > The driver for on-chip UART used on Panasonic UniPhier platform.
> > > 
> > > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> > 
> > [...]
> > 
> > Hi!
> > 
> > > +static void uniphier_serial_putc(struct uniphier_serial *port, const
> > > char c) +{
> > > +	if (c == '\n')
> > > +		uniphier_serial_putc(port, '\r');
> > 
> > Just curious, but what is the concensus about inserting \r upon \n ?
> > Shouldn't this be something that the "upper layers" do consistently ? I
> > recall seeing this in some drivers and not seeing this in the others, so
> > I wonder why this is like so ...
> 
> This converts "\n" to "\r\n".

Apologies, you're right. This is what I meant.

> Without this conversion, CarriageReturn is not provided,
> which means the cursor goes to the next line, but
> column position does not change.
> 
> 
> For example,
> 
> printf("Hello\nWorld\n");
> 
> will be displayed on (at least my) terminal emulator like this:
> 
> 
> Hello
>      World
> 
> 
> With the conversion code, it will be displaye as follows:
> 
> Hello
> World
> 
> Perhaps the behavior might depend on
> which therminal emulator you are using.
> (also depend on the preference
> how LF and CR are handled.)

I use minicom . You do have a point that it might be it.

> Maybe we can move  "\n -> \r\n" logic
> to the upper layer and allow users to enable/disable it
> with a CONFIG_ option.

Either that or make it even run-time configurable, esp. if this depends on the 
users' terminal setting.

Best regards,
Marek Vasut

  reply	other threads:[~2014-09-05 12:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05  5:50 [U-Boot] [PATCH v4 0/6] Add support for Panasonic UniPhier SoCs/boards Masahiro Yamada
2014-09-05  5:50 ` [U-Boot] [PATCH v4 1/6] nand: denali: add Denali NAND driver for SPL Masahiro Yamada
2014-09-12  7:09   ` Chin Liang See
2014-09-12  8:06     ` Masahiro Yamada
2014-09-15  6:39       ` Chin Liang See
2014-09-17  9:09         ` Masahiro Yamada
2014-09-17 12:10           ` Chin Liang See
2014-09-05  5:50 ` [U-Boot] [PATCH v4 2/6] serial: add UniPhier serial driver Masahiro Yamada
2014-09-05 10:35   ` Marek Vasut
2014-09-05 12:03     ` Masahiro Yamada
2014-09-05 12:59       ` Marek Vasut [this message]
2014-09-05 16:41       ` Simon Glass
2014-09-06 14:49         ` Masahiro YAMADA
2014-09-19 12:15         ` Masahiro Yamada
2014-09-19 16:30           ` Simon Glass
2014-09-20  7:18             ` Masahiro YAMADA
2014-09-22  6:35               ` Simon Glass
2014-09-05  5:50 ` [U-Boot] [PATCH v4 3/6] arm: uniphier: add UniPhier SoC support code Masahiro Yamada
2014-09-05 18:59   ` Simon Glass
2014-09-06 15:34     ` Masahiro YAMADA
2014-09-06 16:39       ` Simon Glass
2014-09-05  5:50 ` [U-Boot] [PATCH v4 4/6] arm: uniphier: add Kconfig and defconfig Masahiro Yamada
2014-09-05  5:50 ` [U-Boot] [PATCH v4 5/6] MAINTAINERS: add me as a maintainer of UniPhier platform Masahiro Yamada
2014-09-18 11:33   ` Albert ARIBAUD
2014-09-18 11:40     ` Michal Simek
2014-09-05  5:50 ` [U-Boot] [PATCH v4 6/6] git-mailrc: " Masahiro Yamada

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=201409051459.32383.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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