mos7720.c (e8cdfb0509f48d44d95d68d4f42d8d71a9ba4acd) mos7720.c (60b33c133ca0b7c0b6072c87234b63fee6e80558)
1/*
2 * mos7720.c
3 * Controls the Moschip 7720 usb to dual port serial convertor
4 *
5 * Copyright 2006 Moschip Semiconductor Tech. Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 1819 unchanged lines hidden (view full) ---

1828 result = TIOCSER_TEMT;
1829 }
1830 }
1831 if (copy_to_user(value, &result, sizeof(int)))
1832 return -EFAULT;
1833 return 0;
1834}
1835
1/*
2 * mos7720.c
3 * Controls the Moschip 7720 usb to dual port serial convertor
4 *
5 * Copyright 2006 Moschip Semiconductor Tech. Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 1819 unchanged lines hidden (view full) ---

1828 result = TIOCSER_TEMT;
1829 }
1830 }
1831 if (copy_to_user(value, &result, sizeof(int)))
1832 return -EFAULT;
1833 return 0;
1834}
1835
1836static int mos7720_tiocmget(struct tty_struct *tty, struct file *file)
1836static int mos7720_tiocmget(struct tty_struct *tty)
1837{
1838 struct usb_serial_port *port = tty->driver_data;
1839 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1840 unsigned int result = 0;
1841 unsigned int mcr ;
1842 unsigned int msr ;
1843
1844 dbg("%s - port %d", __func__, port->number);

--- 15 unchanged lines hidden (view full) ---

1860
1861static int mos7720_tiocmset(struct tty_struct *tty, struct file *file,
1862 unsigned int set, unsigned int clear)
1863{
1864 struct usb_serial_port *port = tty->driver_data;
1865 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1866 unsigned int mcr ;
1867 dbg("%s - port %d", __func__, port->number);
1837{
1838 struct usb_serial_port *port = tty->driver_data;
1839 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1840 unsigned int result = 0;
1841 unsigned int mcr ;
1842 unsigned int msr ;
1843
1844 dbg("%s - port %d", __func__, port->number);

--- 15 unchanged lines hidden (view full) ---

1860
1861static int mos7720_tiocmset(struct tty_struct *tty, struct file *file,
1862 unsigned int set, unsigned int clear)
1863{
1864 struct usb_serial_port *port = tty->driver_data;
1865 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1866 unsigned int mcr ;
1867 dbg("%s - port %d", __func__, port->number);
1868 dbg("he was at tiocmget");
1868 dbg("he was at tiocmset");
1869
1870 mcr = mos7720_port->shadowMCR;
1871
1872 if (set & TIOCM_RTS)
1873 mcr |= UART_MCR_RTS;
1874 if (set & TIOCM_DTR)
1875 mcr |= UART_MCR_DTR;
1876 if (set & TIOCM_LOOP)

--- 389 unchanged lines hidden ---
1869
1870 mcr = mos7720_port->shadowMCR;
1871
1872 if (set & TIOCM_RTS)
1873 mcr |= UART_MCR_RTS;
1874 if (set & TIOCM_DTR)
1875 mcr |= UART_MCR_DTR;
1876 if (set & TIOCM_LOOP)

--- 389 unchanged lines hidden ---