mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
TTY/Serial driver patches for 4.4-rc1
Here is the big tty and serial driver update for 4.4-rc1.
Lots of serial driver updates and a few small tty core changes. Full
details in the shortlog.
All of these have been in linux-next for a while.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEABECAAYFAlY6f64ACgkQMUfUDdst+ykf8gCfYPjtHy5hD/TsharaeXROnVgi
W8cAn16xk1Nmnde220MNNpO6zDu65G/1
=kslf
-----END PGP SIGNATURE-----
Merge tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver updates from Greg KH:
"Here is the big tty and serial driver update for 4.4-rc1.
Lots of serial driver updates and a few small tty core changes. Full
details in the shortlog.
All of these have been in linux-next for a while"
* tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (148 commits)
tty: Use unbound workqueue for all input workers
tty: Abstract tty buffer work
tty: Prevent tty teardown during tty_write_message()
tty: core: Use correct spinlock flavor in tiocspgrp()
tty: Combine SIGTTOU/SIGTTIN handling
serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
ttyFDC: Fix build problems due to use of module_{init,exit}
tty: remove unneeded return statement
serial: 8250_mid: add support for DMA engine handling from UART MMIO
dmaengine: hsu: remove platform data
dmaengine: hsu: introduce stubs for the exported functions
dmaengine: hsu: make the UART driver in control of selecting this driver
serial: fix mctrl helper functions
serial: 8250_pci: Intel MID UART support to its own driver
serial: fsl_lpuart: add earlycon support
tty: disable unbind for old 74xx based serial/mpsc console port
serial: pl011: Spelling s/clocks-names/clock-names/
n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars
tty: synclink, fix indentation
serial: at91, fix rs485 properties
...
This commit is contained in:
commit
fd0d351de7
82 changed files with 2734 additions and 1941 deletions
|
|
@ -35,14 +35,23 @@ struct hsu_dma_chip {
|
|||
unsigned int length;
|
||||
unsigned int offset;
|
||||
struct hsu_dma *hsu;
|
||||
struct hsu_dma_platform_data *pdata;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_HSU_DMA)
|
||||
/* Export to the internal users */
|
||||
irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr);
|
||||
|
||||
/* Export to the platform drivers */
|
||||
int hsu_dma_probe(struct hsu_dma_chip *chip);
|
||||
int hsu_dma_remove(struct hsu_dma_chip *chip);
|
||||
#else
|
||||
static inline irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip,
|
||||
unsigned short nr)
|
||||
{
|
||||
return IRQ_NONE;
|
||||
}
|
||||
static inline int hsu_dma_probe(struct hsu_dma_chip *chip) { return -ENODEV; }
|
||||
static inline int hsu_dma_remove(struct hsu_dma_chip *chip) { return 0; }
|
||||
#endif /* CONFIG_HSU_DMA */
|
||||
|
||||
#endif /* _DMA_HSU_H */
|
||||
|
|
|
|||
|
|
@ -152,9 +152,6 @@ struct r3964_info {
|
|||
unsigned char *rx_buf; /* ring buffer */
|
||||
unsigned char *tx_buf;
|
||||
|
||||
wait_queue_head_t read_wait;
|
||||
//struct wait_queue *read_wait;
|
||||
|
||||
struct r3964_block_header *rx_first;
|
||||
struct r3964_block_header *rx_last;
|
||||
struct r3964_block_header *tx_first;
|
||||
|
|
@ -164,8 +161,9 @@ struct r3964_info {
|
|||
unsigned char last_rx;
|
||||
unsigned char bcc;
|
||||
unsigned int blocks_in_rx_queue;
|
||||
|
||||
|
||||
|
||||
struct mutex read_lock; /* serialize r3964_read */
|
||||
|
||||
struct r3964_client_info *firstClient;
|
||||
unsigned int state;
|
||||
unsigned int flags;
|
||||
|
|
|
|||
|
|
@ -19,12 +19,6 @@
|
|||
#include <linux/serial.h>
|
||||
#include <linux/platform_data/macb.h>
|
||||
|
||||
/*
|
||||
* at91: 6 USARTs and one DBGU port (SAM9260)
|
||||
* avr32: 4
|
||||
*/
|
||||
#define ATMEL_MAX_UART 7
|
||||
|
||||
/* Compact Flash */
|
||||
struct at91_cf_data {
|
||||
int irq_pin; /* I/O IRQ */
|
||||
|
|
|
|||
|
|
@ -18,8 +18,4 @@ struct hsu_dma_slave {
|
|||
int chan_id;
|
||||
};
|
||||
|
||||
struct hsu_dma_platform_data {
|
||||
unsigned short nr_channels;
|
||||
};
|
||||
|
||||
#endif /* _PLATFORM_DATA_DMA_HSU_H */
|
||||
|
|
|
|||
|
|
@ -227,7 +227,6 @@ struct tty_port {
|
|||
int blocked_open; /* Waiting to open */
|
||||
int count; /* Usage count */
|
||||
wait_queue_head_t open_wait; /* Open waiters */
|
||||
wait_queue_head_t close_wait; /* Close waiters */
|
||||
wait_queue_head_t delta_msr_wait; /* Modem status change */
|
||||
unsigned long flags; /* TTY flags ASY_*/
|
||||
unsigned char console:1, /* port is a console */
|
||||
|
|
@ -424,6 +423,7 @@ extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
|
|||
const char *routine);
|
||||
extern const char *tty_name(const struct tty_struct *tty);
|
||||
extern void tty_wait_until_sent(struct tty_struct *tty, long timeout);
|
||||
extern int __tty_check_change(struct tty_struct *tty, int sig);
|
||||
extern int tty_check_change(struct tty_struct *tty);
|
||||
extern void __stop_tty(struct tty_struct *tty);
|
||||
extern void stop_tty(struct tty_struct *tty);
|
||||
|
|
@ -467,6 +467,8 @@ extern void tty_buffer_free_all(struct tty_port *port);
|
|||
extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld);
|
||||
extern void tty_buffer_init(struct tty_port *port);
|
||||
extern void tty_buffer_set_lock_subclass(struct tty_port *port);
|
||||
extern bool tty_buffer_restart_work(struct tty_port *port);
|
||||
extern bool tty_buffer_cancel_work(struct tty_port *port);
|
||||
extern speed_t tty_termios_baud_rate(struct ktermios *termios);
|
||||
extern speed_t tty_termios_input_baud_rate(struct ktermios *termios);
|
||||
extern void tty_termios_encode_baud_rate(struct ktermios *termios,
|
||||
|
|
@ -656,50 +658,6 @@ extern void __lockfunc tty_unlock(struct tty_struct *tty);
|
|||
extern void __lockfunc tty_lock_slave(struct tty_struct *tty);
|
||||
extern void __lockfunc tty_unlock_slave(struct tty_struct *tty);
|
||||
extern void tty_set_lock_subclass(struct tty_struct *tty);
|
||||
/*
|
||||
* this shall be called only from where BTM is held (like close)
|
||||
*
|
||||
* We need this to ensure nobody waits for us to finish while we are waiting.
|
||||
* Without this we were encountering system stalls.
|
||||
*
|
||||
* This should be indeed removed with BTM removal later.
|
||||
*
|
||||
* Locking: BTM required. Nobody is allowed to hold port->mutex.
|
||||
*/
|
||||
static inline void tty_wait_until_sent_from_close(struct tty_struct *tty,
|
||||
long timeout)
|
||||
{
|
||||
tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */
|
||||
tty_wait_until_sent(tty, timeout);
|
||||
tty_lock(tty);
|
||||
}
|
||||
|
||||
/*
|
||||
* wait_event_interruptible_tty -- wait for a condition with the tty lock held
|
||||
*
|
||||
* The condition we are waiting for might take a long time to
|
||||
* become true, or might depend on another thread taking the
|
||||
* BTM. In either case, we need to drop the BTM to guarantee
|
||||
* forward progress. This is a leftover from the conversion
|
||||
* from the BKL and should eventually get removed as the BTM
|
||||
* falls out of use.
|
||||
*
|
||||
* Do not use in new code.
|
||||
*/
|
||||
#define wait_event_interruptible_tty(tty, wq, condition) \
|
||||
({ \
|
||||
int __ret = 0; \
|
||||
if (!(condition)) \
|
||||
__ret = __wait_event_interruptible_tty(tty, wq, \
|
||||
condition); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define __wait_event_interruptible_tty(tty, wq, condition) \
|
||||
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \
|
||||
tty_unlock(tty); \
|
||||
schedule(); \
|
||||
tty_lock(tty))
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
extern void proc_tty_register_driver(struct tty_driver *);
|
||||
|
|
|
|||
Loading…
Reference in a new issue