ARM64: dts: rockchip: enable tsadc node for rk3366-tb
[firefly-linux-kernel-4.4.55.git] / include / linux / mfd / rt5025-misc.h
1 /*
2  *  include/linux/mfd/rt5025/rt5025-misc.h
3  *  Include header file for Richtek RT5025 PMIC Misc
4  *
5  *  Copyright (C) 2013 Richtek Technology Corp.
6  *  cy_huang <cy_huang@richtek.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  */
13
14 #ifndef __LINUX_RT5025_MISC_H
15 #define __LINUX_RT5025_MISC_H
16
17 enum {
18         MISCEVENT_GPIO0_IE = 1,
19         MISCEVENT_GPIO1_IE,
20         MISCEVENT_GPIO2_IE,
21         MISCEVENT_RESETB,
22         MISCEVENT_PWRONF,
23         MISCEVENT_PWRONR,
24         MISCEVENT_KPSHDN,
25         MISCEVENT_SYSLV,
26         MISCEVENT_DCDC4LVHV,
27         MISCEVENT_PWRONLP_IRQ,
28         MISCEVENT_PWRONSP_IRQ,
29         MISCEVENT_DCDC3LV,
30         MISCEVENT_DCDC2LV,
31         MISCEVENT_DCDC1LV,
32         MISCEVENT_OT,
33         MISCEVENT_MAX,
34 };
35
36 #define RT5025_SHDNCTRL_MASK    0x80
37 #define RT5025_VSYSOFF_MASK     0xE0
38 #define RT5025_VSYSOFF_SHFT     5
39 #define RT5025_SHDNLPRESS_MASK  0x0C
40 #define RT5025_SHDNLPRESS_SHFT  2
41 #define RT5025_STARTLPRESS_MASK 0xC0
42 #define RT5025_STARTLPRESS_SHFT 6
43 #define RT5025_VSYSLVSHDN_MASK  0x80
44 #define RT5025_VSYSLVSHDN_SHFT  7
45 #define RT5025_CABLEIN_MASK     0x03
46
47 extern int rt5025_cable_exist(void);
48
49 #endif /* #ifndef __LINUX_RT5025_MISC_H */