blob: 534283b87e3596f5db97e7e2139c452dd2a09f9c (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*
* sec_battery_misc.h
* Samsung Mobile Battery Misc Driver
* Author: Yeongmi Ha <yeongmi86.ha@samsung.com>
* Copyright (C) 2018 Samsung Electronics
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __LINUX_SEC_BATTERY_MISC_H__
#define __LINUX_SEC_BATTERY_MISC_H__
// Samsung Wireless Authentication Message
enum swam_data_type {
TYPE_SHORT = 0,
TYPE_LONG,
};
enum swam_direction_type {
DIR_OUT = 0,
DIR_IN,
};
struct swam_data {
unsigned short pid; /* Product ID */
char type; /* swam_data_type */
char dir; /* swam_direction_type */
unsigned int size; /* data size */
void __user *pData; /* data pointer */
};
struct sec_bat_misc_dev {
struct swam_data u_data;
atomic_t open_excl;
atomic_t ioctl_excl;
int (*swam_write)(void *data, int size);
int (*swam_read)(void *data);
int (*swam_ready)(void);
void (*swam_close)(void);
};
#define sec_bat_misc_dev_t \
struct sec_bat_misc_dev
#endif
|