2 * Definitions for ADB (Apple Desktop Bus) support.
9 #define ADB_FLUSH(id) (1 + ((id) << 4))
10 #define ADB_WRITEREG(id, reg) (8 + (reg) + ((id) << 4))
11 #define ADB_READREG(id, reg) (0xc + (reg) + ((id) << 4))
13 /* ADB default device IDs (upper 4 bits of ADB command byte) */
14 #define ADB_DONGLE 1 /* "software execution control" devices */
15 #define ADB_KEYBOARD 2
19 #define ADB_MISC 7 /* maybe a monitor */
22 #define ADB_RET_TIMEOUT 3
27 unsigned char data
[32];
29 unsigned char reply
[32];
31 unsigned char reply_expected
;
33 unsigned char complete
;
34 void (*done
)(struct adb_request
*);
36 struct adb_request
*next
;
45 ADB_NONE
, ADB_VIACUDA
, ADB_VIAPMU
, ADB_MACIO
48 extern int (*adb_send_request
)(struct adb_request
*req
, int sync
);
49 extern int (*adb_autopoll
)(int devs
);
50 extern int (*adb_reset_bus
)(void);
52 /* Values for adb_request flags */
53 #define ADBREQ_REPLY 1 /* expect reply */
54 #define ADBREQ_SYNC 2 /* poll until done */
57 int adb_request(struct adb_request
*req
, void (*done
)(struct adb_request
*),
58 int flags
, int nbytes
, ...);
59 int adb_register(int default_id
,int handler_id
,struct adb_ids
*ids
,
60 void (*handler
)(unsigned char *, int, struct pt_regs
*, int));
61 void adb_input(unsigned char *, int, struct pt_regs
*, int);
63 #endif /* __KERNEL__ */
65 #endif /* __PPC_ADB_H */