aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/spk_priv.h
diff options
context:
space:
mode:
authorOkash Khawaja <okash.khawaja@gmail.com>2017-05-15 18:45:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-16 14:05:42 +0200
commit1ab92da32e37758c0e2e2a455f06d5f40609f14e (patch)
treeb18ad58e8088c5b731480c2155034f6edf590281 /drivers/staging/speakup/spk_priv.h
parenttty: export tty_open_by_driver (diff)
downloadlinux-dev-1ab92da32e37758c0e2e2a455f06d5f40609f14e.tar.xz
linux-dev-1ab92da32e37758c0e2e2a455f06d5f40609f14e.zip
staging: speakup: add tty-based comms functions
This adds spk_ttyio.c file. It contains a set of functions which implement those methods in spk_synth struct which relate to sending bytes out using serial comms. Implementations in this file perform the same function but using TTY subsystem instead. Currently synths access serial ports, directly poking standard ISA ports by trying to steal them from serial driver. Some ISA cards actually need this way of doing it, but most other synthesizers don't, and can actually work by using the proper TTY subsystem through a new N_SPEAKUP line discipline. So this adds the methods for drivers to switch to accessing serial ports through the TTY subsystem, whenever appropriate. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/spk_priv.h')
-rw-r--r--drivers/staging/speakup/spk_priv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/speakup/spk_priv.h b/drivers/staging/speakup/spk_priv.h
index 6895373902de..53142fee0df6 100644
--- a/drivers/staging/speakup/spk_priv.h
+++ b/drivers/staging/speakup/spk_priv.h
@@ -44,6 +44,7 @@ const struct old_serial_port *spk_serial_init(int index);
void spk_stop_serial_interrupt(void);
int spk_wait_for_xmitr(struct spk_synth *in_synth);
void spk_serial_release(void);
+void spk_ttyio_release(void);
void synth_buffer_skip_nonlatin1(void);
u16 synth_buffer_getc(void);
@@ -56,7 +57,9 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count);
int spk_serial_synth_probe(struct spk_synth *synth);
+int spk_ttyio_synth_probe(struct spk_synth *synth);
const char *spk_serial_synth_immediate(struct spk_synth *synth, const char *buff);
+const char *spk_ttyio_synth_immediate(struct spk_synth *synth, const char *buff);
void spk_do_catch_up(struct spk_synth *synth);
void spk_synth_flush(struct spk_synth *synth);
unsigned char spk_synth_get_index(struct spk_synth *synth);
@@ -78,5 +81,6 @@ extern struct speakup_info_t speakup_info;
extern struct var_t synth_time_vars[];
extern struct spk_io_ops spk_serial_io_ops;
+extern struct spk_io_ops spk_ttyio_ops;
#endif