linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC] GPIO-based flow control in the cpm_uart driver
@ 2008-04-15 13:22 Laurent Pinchart
  2008-04-15 13:40 ` Anton Vorontsov
  2008-05-20  0:25 ` David Brownell
  0 siblings, 2 replies; 8+ messages in thread
From: Laurent Pinchart @ 2008-04-15 13:22 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: David Brownell

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-05-20 13:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).