forked from msm8916-mainline/lk2nd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
lk2nd.h
75 lines (58 loc) · 1.68 KB
/
lk2nd.h
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
/* SPDX-License-Identifier: GPL-2.0-only */
#if !defined(__LK2ND_DEVICE_H) && WITH_LK2ND
#define __LK2ND_DEVICE_H
#include <dev_tree.h>
struct smb1360;
struct smb1360_battery;
struct lk2nd_panel {
const char *name;
const char *old_compatible;
const char *compatible;
int compatible_size;
const char *ts_compatible;
};
struct lk2nd_keymap {
uint32_t key;
uint32_t gpio;
enum {
KEY_GPIO = 0,
KEY_PM_GPIO = 1,
KEY_RESIN = 2,
KEY_PWR = 3,
} type;
uint8_t pull;
uint8_t active;
};
struct lk2nd_device {
void *fdt;
struct dt_entry dt_entry;
const char *model;
const char *cmdline;
const char *device;
const char *compatible;
const char *bootloader;
const char *serialno;
const char *carrier;
const char *radio;
const char *battery;
const struct smb1360 *smb1360;
const struct smb1360_battery *smb1360_battery;
struct lk2nd_panel panel;
struct lk2nd_keymap *keymap;
};
extern struct lk2nd_device lk2nd_dev;
void lk2nd_init(void);
int lk2nd_fdt_parse_early_uart(void);
void lk2nd_target_keystatus();
char *genlk1st2lk2ndcmdline(void);
bool lk2nd_cmdline_scan(const char *cmdline, const char *arg);
void lk2nd_samsung_muic_reset(const void *fdt, int offset);
void lk2nd_motorola_smem_write_unit_info(const void *fdt, int offset);
void lk2nd_smd_rpm_hack_opening(const void *fdt, int offset);
void lk2nd_update_device_tree(void *fdt, const char *cmdline, bool arm64);
void lk2nd_rproc_update_dev_tree(void *fdt);
struct smp_spin_table;
void smp_spin_table_setup(struct smp_spin_table *table, void *fdt, bool arm64, bool force);
int lkfdt_prop_strcmp(const void *fdt, int node, const char *prop, const char *cmp);
bool lkfdt_node_is_available(const void *fdt, int node);
#endif