浏览代码

ldisc: new dcd_change() method for line disciplines

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rodolfo Giometti 15 年之前
父节点
当前提交
b3e63afe8a
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 4 0
      Documentation/serial/tty.txt
  2. 8 0
      include/linux/tty_ldisc.h

+ 4 - 0
Documentation/serial/tty.txt

@@ -105,6 +105,10 @@ write_wakeup()	-	May be called at any point between open and close.
 			is permitted to call the driver write method from
 			is permitted to call the driver write method from
 			this function. In such a situation defer it.
 			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
 Driver Access
 
 

+ 8 - 0
include/linux/tty_ldisc.h

@@ -99,6 +99,12 @@
  *	cease I/O to the tty driver. Can sleep. The driver should
  *	cease I/O to the tty driver. Can sleep. The driver should
  *	seek to perform this action quickly but should wait until
  *	seek to perform this action quickly but should wait until
  *	any pending driver I/O is completed.
  *	any pending driver I/O is completed.
+ *
+ * void (*dcd_change)(struct tty_struct *tty, 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/fs.h>
@@ -136,6 +142,8 @@ struct tty_ldisc_ops {
 	void	(*receive_buf)(struct tty_struct *, const unsigned char *cp,
 	void	(*receive_buf)(struct tty_struct *, const unsigned char *cp,
 			       char *fp, int count);
 			       char *fp, int count);
 	void	(*write_wakeup)(struct tty_struct *);
 	void	(*write_wakeup)(struct tty_struct *);
+	void	(*dcd_change)(struct tty_struct *, unsigned int,
+				struct timespec *);
 
 
 	struct  module *owner;
 	struct  module *owner;