Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Definitions for ADB (Apple Desktop Bus) support.
0004  */
0005 #ifndef _UAPI__ADB_H
0006 #define _UAPI__ADB_H
0007 
0008 /* ADB commands */
0009 #define ADB_BUSRESET        0
0010 #define ADB_FLUSH(id)       (0x01 | ((id) << 4))
0011 #define ADB_WRITEREG(id, reg)   (0x08 | (reg) | ((id) << 4))
0012 #define ADB_READREG(id, reg)    (0x0C | (reg) | ((id) << 4))
0013 
0014 /* ADB default device IDs (upper 4 bits of ADB command byte) */
0015 #define ADB_DONGLE  1   /* "software execution control" devices */
0016 #define ADB_KEYBOARD    2
0017 #define ADB_MOUSE   3
0018 #define ADB_TABLET  4
0019 #define ADB_MODEM   5
0020 #define ADB_MISC    7   /* maybe a monitor */
0021 
0022 #define ADB_RET_OK  0
0023 #define ADB_RET_TIMEOUT 3
0024 
0025 /* The kind of ADB request. The controller may emulate some
0026    or all of those CUDA/PMU packet kinds */
0027 #define ADB_PACKET  0
0028 #define CUDA_PACKET 1
0029 #define ERROR_PACKET    2
0030 #define TIMER_PACKET    3
0031 #define POWER_PACKET    4
0032 #define MACIIC_PACKET   5
0033 #define PMU_PACKET  6
0034 #define ADB_QUERY   7
0035 
0036 /* ADB queries */
0037 
0038 /* ADB_QUERY_GETDEVINFO
0039  * Query ADB slot for device presence
0040  * data[2] = id, rep[0] = orig addr, rep[1] = handler_id
0041  */
0042 #define ADB_QUERY_GETDEVINFO    1
0043 
0044 
0045 #endif /* _UAPI__ADB_H */