linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: linuxppc-dev@ozlabs.org
Cc: David Brownell <david-b@pacbell.net>
Subject: [RFC] GPIO-based flow control in the cpm_uart driver
Date: Tue, 15 Apr 2008 15:22:33 +0200	[thread overview]
Message-ID: <200804151522.36884.laurentp@cse-semaphore.com> (raw)

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

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.

Can anyone think of a better solution ?

Best regards,

-- 
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:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15 13:22 Laurent Pinchart [this message]
2008-04-15 13:40 ` [RFC] GPIO-based flow control in the cpm_uart driver Anton Vorontsov
2008-04-15 13:47   ` Laurent Pinchart
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=200804151522.36884.laurentp@cse-semaphore.com \
    --to=laurentp@cse-semaphore.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).