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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/*
* @file hdm.h
* @brief Header file for HDM driver
* Copyright (c) 2019, Samsung Electronics Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __HDM_H__
#define __HDM_H__
#include <linux/types.h>
#ifndef __ASSEMBLY__
#if 0
#define BBD_CTRL_GPS_ON1 "GPSD:CORE_ON"
#define BBD_CTRL_GPS_OFF1 "GPSD:CORE_OFF"
#endif
#define HDM_CMD_LEN ((size_t)8)
#define HDM_POLICY_BIT 0xFFFF
#define HDM_KERNEL_PRE 0x10000
#define HDM_KERNEL_POST 0x20000
#define HDM_CMD_MAX (HDM_KERNEL_PRE + HDM_KERNEL_POST)
enum {
HDM_ALLOW = 0,
HDM_DENY,
};
enum {
HDM_DEVICE_CAMERA = 0,
HDM_DEVICE_MMC,
HDM_DEVICE_USB,
HDM_DEVICE_WIFI,
HDM_DEVICE_BLUETOOTH,
HDM_DEVICE_MAX,
};
enum {
APP_HDM_EVENT_INIT = 0,
APP_HDM_EVENT_BLOCK_ALL,
APP_HDM_EVENT_CTRL_DEVICE,
APP_HDM_EVENT_CAMERA,
APP_HDM_EVENT_MMC,
APP_HDM_EVENT_USB,
APP_HDM_EVENT_WIFI,
APP_HDM_EVENT_BLUETOOTH,
APP_HDM_EVENT_MAX
};
typedef int (*hdm_device_control_handler_t)(int cmd);
typedef struct {
hdm_device_control_handler_t fn;
} hdm_device_ctrl_t;
extern struct net_device *hdm_net;
extern int hdm_prot[HDM_DEVICE_MAX];
extern int hdm_command(int cmd_id);
extern const struct file_operations hdm_fops;
#endif //__ASSEMBLY__
#endif //__HDM_H__
|