2 * Definitions for ADB (Apple Desktop Bus) support.
7 #include <uapi/linux/adb.h>
11 unsigned char data
[32];
13 unsigned char reply
[32];
15 unsigned char reply_expected
;
17 unsigned char complete
;
18 void (*done
)(struct adb_request
*);
20 struct adb_request
*next
;
28 /* Structure which encapsulates a low-level ADB driver */
34 int (*send_request
)(struct adb_request
*req
, int sync
);
35 int (*autopoll
)(int devs
);
37 int (*reset_bus
)(void);
40 /* Values for adb_request flags */
41 #define ADBREQ_REPLY 1 /* expect reply */
42 #define ADBREQ_SYNC 2 /* poll until done */
43 #define ADBREQ_NOSEND 4 /* build the request, but don't send it */
45 /* Messages sent thru the client_list notifier. You should NOT stop
46 the operation, at least not with this version */
48 ADB_MSG_POWERDOWN
, /* Currently called before sleep only */
49 ADB_MSG_PRE_RESET
, /* Called before resetting the bus */
50 ADB_MSG_POST_RESET
/* Called after resetting the bus (re-do init & register) */
52 extern struct blocking_notifier_head adb_client_list
;
54 int adb_request(struct adb_request
*req
, void (*done
)(struct adb_request
*),
55 int flags
, int nbytes
, ...);
56 int adb_register(int default_id
,int handler_id
,struct adb_ids
*ids
,
57 void (*handler
)(unsigned char *, int, int));
58 int adb_unregister(int index
);
60 void adb_input(unsigned char *, int, int);
61 int adb_reset_bus(void);
63 int adb_try_handler_change(int address
, int new_id
);
64 int adb_get_infos(int address
, int *original_address
, int *handler_id
);