Line discipline
Samuel Thibault
samuel.thibault at ens-lyon.org
Thu Feb 2 19:11:44 EST 2017
Hello,
Okash Khawaja, on Thu 02 Feb 2017 23:51:26 +0000, wrote:
> I have attached the patch which uses tty for speakup_dummy.
It looks good, cool :)
> It applies without conflicts to 4.10.x kernel code but showed
> conflicts for 4.8.6.
No problem, it'll take some time to get to a point where it is
submittable, so no need to target old kernels.
> Please note that major and minor device numbers are hard coded as 4
> and 64 inside spk_ttyio_initialise() function.
Sure, that's fine for now.
> I have changed names slightly, so there is spk_ttyio_* prefix which
> identifies functions related to tty-based comms. The related code is
> grouped inside spk_ttyio.c file.
Good :)
> I noticed that `startup` member of synth_dummy instance was set to
> SYNTH_START which meant that probe function for dummy won't be called
> when built into kernel image.
Yes, AIUI that is on purpose, so that one can build a kernel with all
drivers compiled in, and use e.g. the synth=dummy kernel parameter to
make the dummy driver started. So please do not change that part, leave
it as it is.
> Tested dummy and also soft synth/espeakup for regressions. Both seemed
> okay but I didn't fully test them. Any ideas for testing will be
> useful.
>From looking at the patch, I wouldn't expect any regression anyway.
Ideally you'd do some daily work like hacking source code, compiling,
etc. with the dummy driver enabled, to exercice speakup in harsh
conditions.
Last but not least, you will need to maintain a patch queue, so that the
whole thing is easy to review. So before developping more, please learn
about quilt, and split what you have into several parts already, which
can be easily reviewed and make sense separately, I'd say five patches
in the patch queue:
- the drivers/tty/*+include/linux/tty.h
- the addition of the serial_out method, ploggued onto spk_serial_out
for all drivers
- the move of spk_stop_serial_interrupt into spk_serial_release
- the addition of spk_ttyio and N_SPEAKUP
- making dummy use ttyio methods instead of serial
The idea is that when applying patches one after the other, everything
should be working fine at each step. Each patch needs a changelog to
explain what it does, see patch submissions on the linux kernel mailing
list for examples of changelogs.
Then you'll be able to insert a patch for the serial_in method, and
another patch that would add a parameter to be parsed to produce
e.g. 4,64 in the ttyS0 case, 188,0 in the ttyUSB0 case, etc. (see
Documentation/devices.txt), and a patch to make other drivers use it.
Samuel
More information about the Speakup
mailing list