Merge tag 'ceph-for-4.13-rc8' of git://github.com/ceph/ceph-client
[linux/fpc-iii.git] / drivers / input / serio / i8042-ppcio.h
blob1aabea43329edf56f2067c73eafca4d140d3ac4b
1 #ifndef _I8042_PPCIO_H
2 #define _I8042_PPCIO_H
4 /*
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
8 */
10 #if defined(CONFIG_WALNUT)
12 #define I8042_KBD_IRQ 25
13 #define I8042_AUX_IRQ 26
15 #define I8042_KBD_PHYS_DESC "walnutps2/serio0"
16 #define I8042_AUX_PHYS_DESC "walnutps2/serio1"
17 #define I8042_MUX_PHYS_DESC "walnutps2/serio%d"
19 extern void *kb_cs;
20 extern void *kb_data;
22 #define I8042_COMMAND_REG (*(int *)kb_cs)
23 #define I8042_DATA_REG (*(int *)kb_data)
25 static inline int i8042_read_data(void)
27 return readb(kb_data);
30 static inline int i8042_read_status(void)
32 return readb(kb_cs);
35 static inline void i8042_write_data(int val)
37 writeb(val, kb_data);
40 static inline void i8042_write_command(int val)
42 writeb(val, kb_cs);
45 static inline int i8042_platform_init(void)
47 i8042_reset = I8042_RESET_ALWAYS;
48 return 0;
51 static inline void i8042_platform_exit(void)
55 #else
57 #include "i8042-io.h"
59 #endif
61 #endif /* _I8042_PPCIO_H */