aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/serialio.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16staging: speakup: add send_xchar, tiocmset and input functionality for ttyOkash Khawaja1-1/+3
This patch adds further TTY-based functionality, specifically implementation of send_xchar and tiocmset methods, and input. send_xchar and tiocmset methods simply delegate to corresponding TTY operations. For input, it implements the receive_buf2 callback in tty_ldisc_ops of speakup's ldisc. If a synth defines read_buff_add method then receive_buf2 simply delegates to that and returns. For spk_ttyio_in, the data is passed from receive_buf2 thread to spk_ttyio_in thread through spk_ldisc_data structure. It has following members: - char buf: represents data received - struct semaphore sem: used to signal to spk_ttyio_in thread that data is available to be read without having to busy wait - bool buf_free: this is used in comination with mb() calls to syncronise the two threads over buf receive_buf2 only writes to buf if buf_free is true. The check for buf_free and writing to buf are separated by mb() to ensure that spk_ttyio_in has read buf before receive_buf2 writes to it. After writing, it ups the semaphore to signal to spk_ttyio_in that there is now data to read. spk_ttyio_in waits for data to read by downing the semaphore. Thus when signalled by receive_buf2 thread above, it reads from buf and sets buf_free to true. These two operations are separated by mb() to ensure that receive_buf2 thread finds buf_free to be true only after buf has been read. After that spk_ttyio_in calls tty_schedule_flip for subsequent data to come in through receive_buf2. 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>
2016-03-28staging: speakup: fix type mismatch warningsOkash Khawaja1-1/+2
Compiling speakup driver with sparse produces following warning: drivers/staging/speakup/serialio.c:22:9: warning: incorrect type in initializer (different base types) drivers/staging/speakup/serialio.c:22:9: expected unsigned int [unsigned] flags drivers/staging/speakup/serialio.c:22:9: got restricted upf_t This patch fixes it. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: speakup: Fix warning of line over 80 characters.Shirish Gajera1-1/+2
This patch fixes the checkpatch.pl warning: WARNING: line over 80 characters All line over 80 characters in driver/staging/speakup/* are fixed. Signed-off-by: Shirish Gajera <gshirishfree@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: speakup: Fixed warning <linux/serial.h> instead of <asm/serial.h>Melike Yurtoglu1-1/+1
This patch fixes warning: 'use <linux/serial.h> instead <asm/serial.h>' found by checkpatch Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11drivers: staging: speakup: serialio: only use platform specific SERIAL_PORT_DFNS.Chen Gang1-26/+0
If SERIAL_PORT_DFNS isn't present by platform, it need be defined to "nothing", like the 8250 serial driver does it. All related macros also need be removed: IRQF_SHARED is defined in "linux/interrupt.h", others will be defined when related architecture has SERIAL_PORT_DFNS. Or it will cause issue (for arc, with allmodconfig): CC [M] drivers/staging/speakup/serialio.o drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant SERIAL_PORT_DFNS ^ drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[0].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[1].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[2].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[3].baud_base') Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: diminish usage of struct serial_uart_configPaul Gortmaker1-2/+1
This structure might have made sense many years ago, but at this point it is only used in one specific driver, and referenced in stale comments elsewhere. Rather than change the sunsu.c driver, simply move the struct to be within the exclusive domain of that driver, so it won't get inadvertently picked up and used by other serial drivers going forward. The comments referencing the now driver specific struct are updated accordingly. Note that 8250.c has a struct that is similar in usage, with the name serial8250_config; but is 100% independent and untouched here. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: speakup, do not use serialPJiri Slaby1-1/+12
The structures there are going away. And speakup has enough troubles already. So define a structure similar to what 8250 does: old_serial_port. There define an array of speed, port base and so on needed for configuration. Then use this structure instead of serial_state defined in serialP.h. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@braille.uwo.ca> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2010-10-07Staging: add speakup to the staging directoryWilliam Hubbs1-0/+55
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>