]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - arch/um/drivers/chan.h
Merge tag 'rpmsg-v4.7' of git://github.com/andersson/remoteproc
[mirror_ubuntu-zesty-kernel.git] / arch / um / drivers / chan.h
CommitLineData
1da177e4
LT
1/*
2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __CHAN_KERN_H__
7#define __CHAN_KERN_H__
8
510c72a3
AV
9#include <linux/tty.h>
10#include <linux/list.h>
11#include <linux/console.h>
1da177e4
LT
12#include "chan_user.h"
13#include "line.h"
14
15struct chan {
16 struct list_head list;
165dc591
JD
17 struct list_head free_list;
18 struct line *line;
1da177e4
LT
19 char *dev;
20 unsigned int primary:1;
21 unsigned int input:1;
22 unsigned int output:1;
23 unsigned int opened:1;
165dc591 24 unsigned int enabled:1;
1da177e4 25 int fd;
5e7672ec 26 const struct chan_ops *ops;
1da177e4
LT
27 void *data;
28};
29
2e124b4a 30extern void chan_interrupt(struct line *line, int irq);
165dc591 31extern int parse_chan_pair(char *str, struct line *line, int device,
f28169d2 32 const struct chan_opts *opts, char **error_out);
bed5e39c 33extern int write_chan(struct chan *chan, const char *buf, int len,
1da177e4 34 int write_irq);
bed5e39c 35extern int console_write_chan(struct chan *chan, const char *buf,
1da177e4 36 int len);
a52f362f 37extern int console_open_chan(struct line *line, struct console *co);
bed5e39c
AV
38extern void deactivate_chan(struct chan *chan, int irq);
39extern void reactivate_chan(struct chan *chan, int irq);
2116bda6 40extern void chan_enable_winch(struct chan *chan, struct tty_port *port);
d14ad81f 41extern int enable_chan(struct line *line);
10c890c0 42extern void close_chan(struct line *line);
bed5e39c 43extern int chan_window_size(struct line *line,
1da177e4
LT
44 unsigned short *rows_out,
45 unsigned short *cols_out);
bed5e39c 46extern int chan_config_string(struct line *line, char *str, int size,
1da177e4
LT
47 char **error_out);
48
49#endif