summaryrefstree
path: root/kernel/drivers/muic/universal/muic_coagent.h
blob: 2e5123a8690d7cbfd462c2e30a290d3f0a07f12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _MUIC_COAGENT_
#define _MUIC_COAGENT_

/*
  * B[7:0] : cmd
  * B[15:8] : parameter
  *
  */

enum coagent_cmd {
	COA_INIT = 0,
	COA_GAMEPAD_STATUS,
};	

enum coagent_param {
	COA_STATUS_UNKNOWN = 0,	
	COA_STATUS_OK,
	COA_STATUS_NOK,
};	

#define COAGENT_CMD(n) (n & 0xf)
#define COAGENT_PARAM(n) ((n >> 4) & 0xf)

#define COAGENT_CMD_BITS 0
#define COAGENT_PARAM_BITS 4

extern int coagent_in(unsigned int *pbuf);
extern int coagent_out(unsigned int *pbuf);
extern bool coagent_alive(void);
extern void coagent_update_ctx(muic_data_t *pmuic);
#endif