]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/tty_driver.h
Merge branch 'master' into tk71
[mv-sheeva.git] / include / linux / tty_driver.h
index b086779825252b40612062391dad9c67c3912ddf..c3d43eb4150c2155c4eb34b54d6ca92123a0af7f 100644 (file)
  *         unsigned int cmd, unsigned long arg);
  *
  *     This routine allows the tty driver to implement
- *     device-specific ioctl's.  If the ioctl number passed in cmd
+ *     device-specific ioctls.  If the ioctl number passed in cmd
  *     is not recognized by the driver, it should return ENOIOCTLCMD.
  *
  *     Optional
  * 
  * void (*hangup)(struct tty_struct *tty);
  *
- *     This routine notifies the tty driver that it should hangup the
+ *     This routine notifies the tty driver that it should hang up the
  *     tty device.
  *
  *     Optional:
  *
- * int (*break_ctl)(struct tty_stuct *tty, int state);
+ * int (*break_ctl)(struct tty_struct *tty, int state);
  *
  *     This optional routine requests the tty driver to turn on or
  *     off BREAK status on the RS-232 port.  If state is -1,
  *     unless the tty also has a valid tty->termiox pointer.
  *
  *     Optional: Called under the termios lock
+ *
+ * int (*get_icount)(struct tty_struct *tty, struct serial_icounter *icount);
+ *
+ *     Called when the device receives a TIOCGICOUNT ioctl. Passed a kernel
+ *     structure to complete. This method is optional and will only be called
+ *     if provided (otherwise EINVAL will be returned).
  */
 
 #include <linux/fs.h>
 #include <linux/list.h>
 #include <linux/cdev.h>
+#include <linux/termios.h>
 
 struct tty_struct;
 struct tty_driver;
+struct serial_icounter_struct;
 
 struct tty_operations {
        struct tty_struct * (*lookup)(struct tty_driver *driver,
@@ -268,6 +276,8 @@ struct tty_operations {
                        unsigned int set, unsigned int clear);
        int (*resize)(struct tty_struct *tty, struct winsize *ws);
        int (*set_termiox)(struct tty_struct *tty, struct termiox *tnew);
+       int (*get_icount)(struct tty_struct *tty,
+                               struct serial_icounter_struct *icount);
 #ifdef CONFIG_CONSOLE_POLL
        int (*poll_init)(struct tty_driver *driver, int line, char *options);
        int (*poll_get_char)(struct tty_driver *driver, int line);
@@ -348,7 +358,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
  *     overruns, either.)
  *
  * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need
- *     to be registered with a call to tty_register_driver() when the
+ *     to be registered with a call to tty_register_device() when the
  *     device is found in the system and unregistered with a call to
  *     tty_unregister_device() so the devices will be show up
  *     properly in sysfs.  If not set, driver->num entries will be