aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/speakup_apollo.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-15staging: speakup: remove redundant license textGreg Kroah-Hartman1-10/+0
Now that the SPDX tag is in all drivers/staging/speakup/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@reisers.ca> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: speakup: add SPDX identifier.Greg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the remaining staging speakup files to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@reisers.ca> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: speakup: Use octal permissions '0444'Mihaela Muraru1-1/+1
Fixed the following checkpatch warning: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-27staging: speakup: make ttyio synths use device nameOkash Khawaja1-0/+3
This patch introduces new module parameter, dev, which takes a string representing the device that the external synth is connected to, e.g. ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. That way, speakup can support more than ttyS*. As of this patch, it only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter is only available for tty-migrated synths. Users will either use dev or ser as both serve same purpose. This patch maintains backward compatility by allowing ser to be specified. When both are specified, whichever is non-default, i.e. not ttyS0, is used. If both are non-default then dev is used. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16staging: speakup: migrate apollo, ltlk, audptr, decext, dectlk and spkoutOkash Khawaja1-5/+5
This patch simply uses the changes introduced in previous patches and migrates apollo, ltlk, audptr, decext, spkout and dectlk. Migrations are straightforward function pointer updates. 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>
2017-04-25staging: speakup: add send_xchar and tiocmset methodsOkash Khawaja1-3/+2
This adds two methods to spk_synth struct: send_xchar and tiocmset, and creates serial implementation for each of them. It takes existing code in apollo, audptr and spkout which already fits the behaviour of send_xchar and tiocmset. In follow-up patches there will be TTY-based implementations of these methods. Then migrating the synths to TTY will include repointing these methods to their TTY implementations Rest of the changes simply make use of serial implementation of these two functions. 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>
2017-03-27staging: speakup: Align the code.Arushi Singhal1-1/+1
Delete tabs and add spaces to align the code to fix the checkpatch issue: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-17staging: speakup: move those functions which do outgoing serial comms, into serialio.cOkash Khawaja1-1/+1
This moves spk_synth_immediate and spk_serial_synth_probe functions into serialio.c. These functions do outgoing serial comms. The move is a step towards collecting all serial comms in serialio.c. This also renames spk_synth_immediate to spk_serial_synth_immediate. Code inside those functions has not been changed. Along the way, this patch also fixes a couple of spots which were calling spk_synth_immediate directly, so that the calls now happen via the spk_syth struct. 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>
2017-03-16staging: speakup: add spk_io_ops struct to spk_synthOkash Khawaja1-3/+4
This patch adds spk_io_ops struct which contain those methods whose job is to communicate with synth device. Currently, all comms with external synth device use raw serial i/o. The idea is to group all methods which do the actual communication with external device into this new struct. Then migrating a serial-based synth over to an alternative to raw serial i/o will mean swapping serial spk_io_ops instance with the io_ops instance of the new method, making the migration simpler. At the moment, this struct only contains one method, synth_out but more will be added in future when migrating synths which require input functionality. Also at the moment, synth_out method has one implementation which uses serial i/o. Plan is to add an alternative. 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>
2017-03-16staging: speakup: spk_serial_out and spk_wait_for_xmitr to take synth argOkash Khawaja1-3/+3
These two functions are always called from a context where spk_synth instance is available. They also use the spk_synth instance but instead of taking it as an argument, they rely on a global spk_synth instance inside synth.c which points to the same synth as the one being passed in as argument. 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>
2017-03-09speakup: extend synth buffer to 16bit unicode charactersSamuel Thibault1-0/+1
This extends the synth buffer slots to 16bit, so as to hold 16bit unicode characters. synth_buffer_getc and synth_buffer_peek now return 16bit characters. Speech synthesizers which do not support characters beyond latin1 can use the synth_buffer_skip_nonlatin1() helper to skip the non-latin1 characters before getting or peeking. All synthesizers are made to use it for now. This makes synth_buffer_add take a 16bit character. For simplicity for now, synth_printf is left to using latin1 formats and strings. synth_putwc, synth_putwc_s, synth_putws and synth_putws_s helpers are however added to put 16bit characters and strings. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Chris Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192e: Aligning the * on each line in block commentsArushi Singhal1-1/+1
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-31Staging: speakup - syle fix permissions to octalDerek Robson1-14/+14
A style fix across whole driver. changed permissions to octal style, found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: speakup: Remove FSF mailing addressShraddha Barke1-4/+0
FSF mailing address is no longer required to be specified. Hence removed. Detected using checkpatch Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20Staging: speakup: Use module_spk_synthVaishali Thakkar1-11/+1
Macro module_spk_synth can be used for speakup drivers whose init and exit paths does only module registrations. So, here remove some boilerplate code by using module_spk_synth. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23drivers/staging/speakup/: avoid world-writable sysfs files.Rusty Russell1-8/+8
In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Christopher Brannon <chris@the-brannons.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-01staging: fix up speakup kobject modeRusty Russell1-12/+12
It uses the unnecessary S_IFREG bit which broke when my stricter-checking-for-mode patch went in. Since we're fixing it anyway, the extra level of indirection is confusing for readers (ROOT_W == rw-r--r-- for example). Also, many of these are other-writable. Is that really intended? I'll-queue-this-patch-up-in-a-bit-by: Greg KH <greg@kroah.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-10-19Staging: speakup: removing jiffies comparison in speakup_apollo.cAshvini Varatharaj1-1/+1
Fix checkpatch warning: WARNING: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: speakup: apollo: remove custom locking macrosWilliam Hubbs1-10/+10
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: speakup: Prefix externally-visible symbolsSamuel Thibault1-4/+4
This prefixes all externally-visible symbols of speakup with "spk_". Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2010-10-15staging: speakup: speakup_apollo.c: style fixesChristopher Brannon1-10/+12
* Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07Staging: add speakup to the staging directoryWilliam Hubbs1-0/+225
Speakup is a kernel based screen review package for the linux operating system. It allows blind users to interact with applications on the linux console by means of synthetic speech. The authors and maintainers of this code include the following: Kirk Reiser, Andy Berdan, John Covici, Brian and David Borowski, Christopher Brannon, Samuel Thibault and William Hubbs. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>