1
0
Fork 0
remarkable-linux/drivers/misc/rm-otgcontrol/otgcontrol_fsm.h

36 lines
1.3 KiB
C

#ifndef __OTGCONTROL_FSM_H__
#define __OTGCONTROL_FSM_H__
#include <linux/rm-otgcontrol.h>
int otgcontrol_init_fsm(struct rm_otgcontrol_data *otgc_data);
int otgcontrol_handleInput(struct rm_otgcontrol_data *otgc_data,
int signal,
void *param);
#define OTG_MODE__MANUAL_CONTROL 0
#define OTG_MODE__ONEWIRE_AUTH 1
#define OTG_MODE__USB_NO_AUTH 2
#define OTG1_STATE__MANUAL_CONTROL 0
#define OTG1_STATE__ONEWIRE_AUTH_NOT_CONNECTED 1
#define OTG1_STATE__ONEWIRE_AUTH_WAIT_HANDSHAKE_RESPONS 2
#define OTG1_STATE__ONEWIRE_AUTH_DEVICE_CONNECTED 3
#define OTG1_STATE__USB_NO_AUTH_WAITING_CHALLENGE_RESPONSE 4
#define OTG1_STATE__USB_NO_AUTH_NOT_CONNECTED 5
#define OTG1_STATE__USB_NO_AUTH_DEVICE_CONNECTED 6
#define OTG1_STATE__HOST_CONNECTED 7
#define OTG1_EVENT__CHARGER_CONNECTED 0
#define OTG1_EVENT__CHARGER_DISCONNECTED 1
#define OTG1_EVENT__DEVICE_CONNECTED 2
#define OTG1_EVENT__DEVICE_DISCONNECTED 3
#define OTG1_EVENT__CHALLENGE_REPLY_RECEIVED 4
#define OTG1_EVENT__TIMEOUT 5
#define OTG1_EVENT__MODE_CHANGE_REQUESTED 6
#define OTG1_EVENT__MODE_CHANGE_CHALLENGE_REPLY 7
#define OTG1_EVENT__OTG_CHARGERMODE_CHANGE_REQUESTED 8
#define OTG1_EVENT__OTG_DR_MODE_CHANGE_REQUESTED 9
#endif /* __OTGCONTROL_FSM_H__ */