treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / input / serio / i8042-ppcio.h
blob391f94d9e47dacbc0c53d6357ed90aca5bfc915d
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef _I8042_PPCIO_H
3 #define _I8042_PPCIO_H
6 #if defined(CONFIG_WALNUT)
8 #define I8042_KBD_IRQ 25
9 #define I8042_AUX_IRQ 26
11 #define I8042_KBD_PHYS_DESC "walnutps2/serio0"
12 #define I8042_AUX_PHYS_DESC "walnutps2/serio1"
13 #define I8042_MUX_PHYS_DESC "walnutps2/serio%d"
15 extern void *kb_cs;
16 extern void *kb_data;
18 #define I8042_COMMAND_REG (*(int *)kb_cs)
19 #define I8042_DATA_REG (*(int *)kb_data)
21 static inline int i8042_read_data(void)
23 return readb(kb_data);
26 static inline int i8042_read_status(void)
28 return readb(kb_cs);
31 static inline void i8042_write_data(int val)
33 writeb(val, kb_data);
36 static inline void i8042_write_command(int val)
38 writeb(val, kb_cs);
41 static inline int i8042_platform_init(void)
43 i8042_reset = I8042_RESET_ALWAYS;
44 return 0;
47 static inline void i8042_platform_exit(void)
51 #else
53 #include "i8042-io.h"
55 #endif
57 #endif /* _I8042_PPCIO_H */