linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: avorontsov@ru.mvista.com
Cc: David Brownell <david-b@pacbell.net>, linuxppc-dev@ozlabs.org
Subject: Re: [RFC] GPIO-based flow control in the cpm_uart driver
Date: Tue, 15 Apr 2008 15:47:41 +0200	[thread overview]
Message-ID: <200804151547.44052.laurentp@cse-semaphore.com> (raw)
In-Reply-To: <20080415134007.GA17096@polina.dev.rtsoft.ru>

[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]

On Tuesday 15 April 2008 15:40, Anton Vorontsov wrote:
> On Tue, Apr 15, 2008 at 03:22:33PM +0200, Laurent Pinchart wrote:
> > Hi everybody,
> > 
> > I'm implementing flow control and modem control lines support in the
> > cpm_uart driver.
> > 
> > The implementation is based on the GPIO lib. Modem control lines are
> > described in the device tree as GPIO resources and accessed through the OF
> > GPIO bindings. The I/O ports have to be initialized as GPIOs in the 
> > platform-specific code.
> > 
> > Reading and writing the modem control lines isn't an issue, but activating 
> > hardware flow control is more complex. The driver needs to turn dedicated 
> > functions on and off for the RTS and CTS signals, and the GPIO API doesn't 
> > provide a way to access the PPAR* registers (which does make sense -
> > although arguably - as PPAR* control specific functions, not GPIOs).
> > 
> > Hardcoding RTS and CTS lines control in the driver is not an option I want
> > to consider. Extending the GPIO API to handled special functions has been
> > nacked in the past (see 
> > http://ozlabs.org/pipermail/linuxppc-dev/2008-February/051241.html). An 
> > option would be to export gpio_to_chip from drivers/gpio/gpiolib.c and use 
> > cpm1/2_set_pin in the cpm_uart driver.
> 
> Since you have successfuly ported QE USB controller onto CPM USB
> hardware, now it's obvious that we will need generic gpio_set_dedicated()
> function. So I would rather beg David to accept gpio_set_dedicated()
> approach instead of exporting gpio_to_chip(). That way we'll kill two
> birds with one stone.

Or maybe some kind of gpio_set_option() with flags specific to the 
controller ? This could be used to enable open-drain outputs or internal 
pull-ups for instance.

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-04-15 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15 13:22 [RFC] GPIO-based flow control in the cpm_uart driver Laurent Pinchart
2008-04-15 13:40 ` Anton Vorontsov
2008-04-15 13:47   ` Laurent Pinchart [this message]
2008-04-15 14:30     ` Anton Vorontsov
2008-05-20  0:31     ` David Brownell
2008-05-20 13:00       ` Laurent Pinchart
2008-05-20  0:25 ` David Brownell
2008-05-20 12:50   ` Laurent Pinchart

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=200804151547.44052.laurentp@cse-semaphore.com \
    --to=laurentp@cse-semaphore.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=david-b@pacbell.net \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).