xref: /openbmc/linux/kernel/printk/braille.h (revision b2441318)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2bbeddf52SJoe Perches #ifndef _PRINTK_BRAILLE_H
3bbeddf52SJoe Perches #define _PRINTK_BRAILLE_H
4bbeddf52SJoe Perches 
5bbeddf52SJoe Perches #ifdef CONFIG_A11Y_BRAILLE_CONSOLE
6bbeddf52SJoe Perches 
7bbeddf52SJoe Perches static inline void
braille_set_options(struct console_cmdline * c,char * brl_options)8bbeddf52SJoe Perches braille_set_options(struct console_cmdline *c, char *brl_options)
9bbeddf52SJoe Perches {
10bbeddf52SJoe Perches 	c->brl_options = brl_options;
11bbeddf52SJoe Perches }
12bbeddf52SJoe Perches 
132ed2b862SSamuel Thibault /*
142ed2b862SSamuel Thibault  * Setup console according to braille options.
152ed2b862SSamuel Thibault  * Return -EINVAL on syntax error, 0 on success (or no braille option was
162ed2b862SSamuel Thibault  * actually given).
172ed2b862SSamuel Thibault  * Modifies str to point to the serial options
182ed2b862SSamuel Thibault  * Sets brl_options to the parsed braille options.
192ed2b862SSamuel Thibault  */
202ed2b862SSamuel Thibault int
21bbeddf52SJoe Perches _braille_console_setup(char **str, char **brl_options);
22bbeddf52SJoe Perches 
23bbeddf52SJoe Perches int
24bbeddf52SJoe Perches _braille_register_console(struct console *console, struct console_cmdline *c);
25bbeddf52SJoe Perches 
26bbeddf52SJoe Perches int
27bbeddf52SJoe Perches _braille_unregister_console(struct console *console);
28bbeddf52SJoe Perches 
29bbeddf52SJoe Perches #else
30bbeddf52SJoe Perches 
31bbeddf52SJoe Perches static inline void
braille_set_options(struct console_cmdline * c,char * brl_options)32bbeddf52SJoe Perches braille_set_options(struct console_cmdline *c, char *brl_options)
33bbeddf52SJoe Perches {
34bbeddf52SJoe Perches }
35bbeddf52SJoe Perches 
362ed2b862SSamuel Thibault static inline int
_braille_console_setup(char ** str,char ** brl_options)37bbeddf52SJoe Perches _braille_console_setup(char **str, char **brl_options)
38bbeddf52SJoe Perches {
392ed2b862SSamuel Thibault 	return 0;
40bbeddf52SJoe Perches }
41bbeddf52SJoe Perches 
42bbeddf52SJoe Perches static inline int
_braille_register_console(struct console * console,struct console_cmdline * c)43bbeddf52SJoe Perches _braille_register_console(struct console *console, struct console_cmdline *c)
44bbeddf52SJoe Perches {
45bbeddf52SJoe Perches 	return 0;
46bbeddf52SJoe Perches }
47bbeddf52SJoe Perches 
48bbeddf52SJoe Perches static inline int
_braille_unregister_console(struct console * console)49bbeddf52SJoe Perches _braille_unregister_console(struct console *console)
50bbeddf52SJoe Perches {
51bbeddf52SJoe Perches 	return 0;
52bbeddf52SJoe Perches }
53bbeddf52SJoe Perches 
54bbeddf52SJoe Perches #endif
55bbeddf52SJoe Perches 
56bbeddf52SJoe Perches #endif
57