~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/adb.h

Version: ~ [ linux-5.18 ] ~ [ linux-5.17.9 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.41 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.117 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.195 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.244 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.280 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.315 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Definitions for ADB (Apple Desktop Bus) support.
  3  */
  4 #ifndef __ADB_H
  5 #define __ADB_H
  6 
  7 #include <uapi/linux/adb.h>
  8 
  9 
 10 struct adb_request {
 11         unsigned char data[32];
 12         int nbytes;
 13         unsigned char reply[32];
 14         int reply_len;
 15         unsigned char reply_expected;
 16         unsigned char sent;
 17         unsigned char complete;
 18         void (*done)(struct adb_request *);
 19         void *arg;
 20         struct adb_request *next;
 21 };
 22 
 23 struct adb_ids {
 24         int nids;
 25         unsigned char id[16];
 26 };
 27 
 28 /* Structure which encapsulates a low-level ADB driver */
 29 
 30 struct adb_driver {
 31         char name[16];
 32         int (*probe)(void);
 33         int (*init)(void);
 34         int (*send_request)(struct adb_request *req, int sync);
 35         int (*autopoll)(int devs);
 36         void (*poll)(void);
 37         int (*reset_bus)(void);
 38 };
 39 
 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 */
 44 
 45 /* Messages sent thru the client_list notifier. You should NOT stop
 46    the operation, at least not with this version */
 47 enum adb_message {
 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) */
 51 };
 52 extern struct blocking_notifier_head adb_client_list;
 53 
 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);
 59 void adb_poll(void);
 60 void adb_input(unsigned char *, int, int);
 61 int adb_reset_bus(void);
 62 
 63 int adb_try_handler_change(int address, int new_id);
 64 int adb_get_infos(int address, int *original_address, int *handler_id);
 65 
 66 #endif /* __ADB_H */
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp