root/drivers/input/serio/i8042-ppcio.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. i8042_read_data
  2. i8042_read_status
  3. i8042_write_data
  4. i8042_write_command
  5. i8042_platform_init
  6. i8042_platform_exit

   1 /* SPDX-License-Identifier: GPL-2.0-only */
   2 #ifndef _I8042_PPCIO_H
   3 #define _I8042_PPCIO_H
   4 
   5 
   6 #if defined(CONFIG_WALNUT)
   7 
   8 #define I8042_KBD_IRQ 25
   9 #define I8042_AUX_IRQ 26
  10 
  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"
  14 
  15 extern void *kb_cs;
  16 extern void *kb_data;
  17 
  18 #define I8042_COMMAND_REG (*(int *)kb_cs)
  19 #define I8042_DATA_REG (*(int *)kb_data)
  20 
  21 static inline int i8042_read_data(void)
  22 {
  23         return readb(kb_data);
  24 }
  25 
  26 static inline int i8042_read_status(void)
  27 {
  28         return readb(kb_cs);
  29 }
  30 
  31 static inline void i8042_write_data(int val)
  32 {
  33         writeb(val, kb_data);
  34 }
  35 
  36 static inline void i8042_write_command(int val)
  37 {
  38         writeb(val, kb_cs);
  39 }
  40 
  41 static inline int i8042_platform_init(void)
  42 {
  43         i8042_reset = I8042_RESET_ALWAYS;
  44         return 0;
  45 }
  46 
  47 static inline void i8042_platform_exit(void)
  48 {
  49 }
  50 
  51 #else
  52 
  53 #include "i8042-io.h"
  54 
  55 #endif
  56 
  57 #endif /* _I8042_PPCIO_H */

/* [<][>][^][v][top][bottom][index][help] */