[patch 4/6] staging: speakup: Add spk_ttyio

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Feb 25 19:38:09 EST 2017


One thing you can already do easily is this:

Okash Khawaja, on sam. 25 févr. 2017 19:26:57 +0000, wrote:
> +static int spk_ttyio_initialise_ldisc(void)

Add an "int ser" parameter here.

> +{
> +        int ret = 0;
> +        struct tty_struct *tty;
> +
> +        ret = tty_register_ldisc(N_SPEAKUP, &spk_ttyio_ldisc_ops);
> +        if (ret) {
> +                pr_err("speakup_test_init(): Error registering line discipline.\n");
> +                return ret;
> +        }
> +
> +        tty = tty_open_by_driver(MKDEV(4, 64), NULL, NULL);

Here, check that ser is between 0 and (255-64), and add ser to 64.

> +int spk_ttyio_synth_probe(struct spk_synth *synth)
> +{
> +	int rv = spk_ttyio_initialise_ldisc();

Here, pass synth->ser to spk_ttyio_initialise_ldisc()


That way, people want easily configure the serial port with the existing
ser parameter, e.g. speakup_dummy.ser=1

and AIUI we should be getting the same support as before, and thus get
this tested and pushed upstream.

Samuel


More information about the Speakup mailing list