mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Claudio Scordino <claudio@evidence.eu.com>,
	Jesper Nilsson <Jesper.Nilsson@axis.com>,
	Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org,
	Mikael Starvik <mikael.starvik@axis.com>,
	Darron Black <darron@griffin.net>,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, alan@linux.intel.com
Subject: Re: [PATCH] RS485: fix inconsistencies in the meaning of some variables
Date: Tue, 8 Nov 2011 10:59:59 +0100	[thread overview]
Message-ID: <20111108095959.GB31737@game.jcrosoft.org> (raw)
In-Reply-To: <4EB8F6B9.6010008@atmel.com>

On 10:30 Tue 08 Nov     , Nicolas Ferre wrote:
> On 11/04/2011 09:19 AM, Claudio Scordino :
> > Hi Alan, Hi Greg,
> > 
> > 	it seems that the crisv10.c and the atmel_serial.c serial
> > drivers interpret the fields of the serial_rs485 structure in a different
> > way.
> > 
> > In particular, it seems that crisv10.c uses SER_RS485_RTS_AFTER_SEND and
> > SER_RS485_RTS_ON_SEND for the _logic value_ of the RTS pin;
> > atmel_serial.c, instead, uses these values to know if a _delay_ must be
> > set before and after sending.
> 
> It seems sensible, but, on the other hand, I fear that this is a big
> change in the user interface: If people are already relying on this for
> their application, this can be difficult to understand the change. Can't
> we imagine an smoother migration path?
> 
> It seems from de6f86ce5 that 16C950 may also use rs485 mode (with
> another signal that RTS BTW)...
> 
> See comments online...
> 
> > This patch makes the usage of these variables consistent across all
> > drivers and fixes the Documentation as well.
> > In particular, SER_RS485_RTS_AFTER_SEND and SER_RS485_RTS_ON_SEND will
> > be used to set the logic value of the RTS pin (as in the crisv10.c
> > driver); the delay is understood by looking only at the value of
> > delay_rts_before_send and delay_rts_after_send.
> > 
> > Best regards,
> > 
> > 	Claudio
> > 
> > 
> > Subject: RS485: fix inconsistencies in the meaning of some variables
> > From: Claudio Scordino <claudio@evidence.eu.com>
> > 
> > The crisv10.c and the atmel_serial.c serial drivers interpret the fields
> > of the serial_rs485 structure in a different way.
> > In particular, crisv10.c uses SER_RS485_RTS_AFTER_SEND and 
> > SER_RS485_RTS_ON_SEND for the voltage of the RTS pin; atmel_serial.c, instead,
> > uses these values to know if a delay must be set before and after sending.
> > This patch makes the usage of these variables consistent across all drivers and
> > fixes the Documentation as well.
> >>From now on, SER_RS485_RTS_AFTER_SEND and SER_RS485_RTS_ON_SEND will be used to
> > set the voltage of the RTS pin (as in the crisv10.c driver); the delay will be
> > understood by looking only at the value of delay_rts_before_send and 
> > delay_rts_after_send.
> 
> Ok, but don't you think that the flags names are not so much
> self-explanatory for this new meaning?
> 
> What about:
> SER_RS485_RTS_LEVEL_DURING_SEND
> SER_RS485_RTS_VALUE_DURING_SEND (maybe too vague?)
> SER_RS485_RTS_LOGICAL_VALUE_DURING_SEND (maybe too long?)
> 
> Moreover, can't we just use one property for this? I mean, if RTS
> logical value is high during the sending of data, can it mean that RTS
> will be low before and after? And the other way around: if the signal is
> low during data send, will it be high before and after?
> 
> Here again, changing the user interface is not a good idea, so I fear
> that it can be a show stopper.
agreed with nicolas

Best Regards,
J.

  reply	other threads:[~2011-11-08 16:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15 14:28 [PATCH] atmel_serial: RS485: receiving enabled when sending data Bernhard Roth
2011-08-22 21:18 ` Greg KH
2011-08-23  8:30   ` Claudio Scordino
2011-08-23  9:30     ` Russell King - ARM Linux
2011-08-23 10:06       ` Claudio Scordino
2011-08-23 10:14         ` Alan Cox
2011-08-23 10:21           ` Russell King - ARM Linux
2011-08-23 15:39     ` Greg KH
2011-08-24  7:48       ` Claudio Scordino
2011-11-04  8:19   ` [PATCH] RS485: fix inconsistencies in the meaning of some variables Claudio Scordino
2011-11-04 10:36     ` Jesper Nilsson
2011-11-08  9:30     ` Nicolas Ferre
2011-11-08  9:59       ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-11-08 10:48       ` Claudio Scordino
2011-11-08 13:48         ` Alan Cox
2011-11-08 14:24           ` Greg KH
2011-11-09 14:51             ` Claudio Scordino
2011-11-13 21:53               ` Wolfram Sang
2011-11-14  0:37                 ` Darron Black
2011-11-14 11:11                   ` Nicolas Ferre
2011-11-14 12:07                   ` Alan Cox
2011-11-14  8:22                 ` Claudio Scordino
2011-11-14 12:18               ` Nicolas Ferre
2011-11-08 15:02         ` Nicolas Ferre
2011-11-08 15:45           ` Claudio Scordino
2011-11-08 16:34             ` Jesper Nilsson

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=20111108095959.GB31737@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=Jesper.Nilsson@axis.com \
    --cc=alan@linux.intel.com \
    --cc=claudio@evidence.eu.com \
    --cc=darron@griffin.net \
    --cc=greg@kroah.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mikael.starvik@axis.com \
    --cc=nicolas.ferre@atmel.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®