Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Joe Perches | bbeddf5 | 2013-07-31 13:53:45 -0700 | [diff] [blame] | 2 | #ifndef _PRINTK_BRAILLE_H |
| 3 | #define _PRINTK_BRAILLE_H |
| 4 | |
| 5 | #ifdef CONFIG_A11Y_BRAILLE_CONSOLE |
| 6 | |
| 7 | static inline void |
| 8 | braille_set_options(struct console_cmdline *c, char *brl_options) |
| 9 | { |
| 10 | c->brl_options = brl_options; |
| 11 | } |
| 12 | |
Samuel Thibault | 2ed2b86 | 2017-03-26 22:47:36 +0200 | [diff] [blame] | 13 | /* |
| 14 | * Setup console according to braille options. |
| 15 | * Return -EINVAL on syntax error, 0 on success (or no braille option was |
| 16 | * actually given). |
| 17 | * Modifies str to point to the serial options |
| 18 | * Sets brl_options to the parsed braille options. |
| 19 | */ |
| 20 | int |
Joe Perches | bbeddf5 | 2013-07-31 13:53:45 -0700 | [diff] [blame] | 21 | _braille_console_setup(char **str, char **brl_options); |
| 22 | |
| 23 | int |
| 24 | _braille_register_console(struct console *console, struct console_cmdline *c); |
| 25 | |
| 26 | int |
| 27 | _braille_unregister_console(struct console *console); |
| 28 | |
| 29 | #else |
| 30 | |
| 31 | static inline void |
| 32 | braille_set_options(struct console_cmdline *c, char *brl_options) |
| 33 | { |
| 34 | } |
| 35 | |
Samuel Thibault | 2ed2b86 | 2017-03-26 22:47:36 +0200 | [diff] [blame] | 36 | static inline int |
Joe Perches | bbeddf5 | 2013-07-31 13:53:45 -0700 | [diff] [blame] | 37 | _braille_console_setup(char **str, char **brl_options) |
| 38 | { |
Samuel Thibault | 2ed2b86 | 2017-03-26 22:47:36 +0200 | [diff] [blame] | 39 | return 0; |
Joe Perches | bbeddf5 | 2013-07-31 13:53:45 -0700 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | static inline int |
| 43 | _braille_register_console(struct console *console, struct console_cmdline *c) |
| 44 | { |
| 45 | return 0; |
| 46 | } |
| 47 | |
| 48 | static inline int |
| 49 | _braille_unregister_console(struct console *console) |
| 50 | { |
| 51 | return 0; |
| 52 | } |
| 53 | |
| 54 | #endif |
| 55 | |
| 56 | #endif |