lkml.org 
[lkml]   [2008]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] ldisc: new dcd_change() method for line disciplines.
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
---
Documentation/tty.txt | 4 ++++
include/linux/tty_ldisc.h | 10 ++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Documentation/tty.txt b/Documentation/tty.txt
index 8e65c44..3fc812a 100644
--- a/Documentation/tty.txt
+++ b/Documentation/tty.txt
@@ -100,6 +100,10 @@ write_wakeup() - May be called at any point between open and close.
is permitted to call the driver write method from
this function. In such a situation defer it.

+dcd_change() - Report to the tty line the current DCD pin status
+ changes and the relative timestamp. The timestamp
+ can be NULL.
+

Driver Access

diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index 6226504..a135d6c 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -99,11 +99,19 @@
* cease I/O to the tty driver. Can sleep. The driver should
* seek to perform this action quickly but should wait until
* any pending driver I/O is completed.
+ *
+ * void (*dcd_change)(struct uart_port *port, unsigned int status,
+ * struct timespec *ts)
+ *
+ * Tells the discipline that the DCD pin has changed its status and
+ * the relative timestamp. Pointer ts can be NULL.
*/

#include <linux/fs.h>
#include <linux/wait.h>

+struct uart_port;
+
struct tty_ldisc {
int magic;
char *name;
@@ -136,6 +144,8 @@ struct tty_ldisc {
void (*receive_buf)(struct tty_struct *, const unsigned char *cp,
char *fp, int count);
void (*write_wakeup)(struct tty_struct *);
+ void (*dcd_change)(struct uart_port *, unsigned int,
+ struct timespec *);

struct module *owner;

--
1.5.4.3


\
 
 \ /
  Last update: 2008-11-25 22:15    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site