Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
device_xiaomi_onclite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid-Devices
device_xiaomi_onclite
Commits
f9ed2384
Commit
f9ed2384
authored
6 years ago
by
TheScarastic
Committed by
Dhina17
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
onclite: Switch to more generic dt2w node
Signed-off-by:
Dhina17
<
dhinalogu@gmail.com
>
parent
5f3d6a22
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
BoardConfig.mk
+1
-0
1 addition, 0 deletions
BoardConfig.mk
power/Android.mk
+1
-0
1 addition, 0 deletions
power/Android.mk
power/power-common.h
+3
-0
3 additions, 0 deletions
power/power-common.h
power/power.c
+10
-3
10 additions, 3 deletions
power/power.c
with
15 additions
and
3 deletions
BoardConfig.mk
+
1
−
0
View file @
f9ed2384
...
...
@@ -191,6 +191,7 @@ BOARD_ROOT_EXTRA_SYMLINKS := \
TARGET_PER_MGR_ENABLED
:=
true
# Power
TARGET_TAP_TO_WAKE_NODE
:=
"/dev/input/event2"
TARGET_USES_INTERACTION_BOOST
:=
true
# Qualcomm
...
...
This diff is collapsed.
Click to expand it.
power/Android.mk
+
1
−
0
View file @
f9ed2384
...
...
@@ -12,6 +12,7 @@ LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SHARED_LIBRARIES
:=
liblog libcutils libdl libxml2
LOCAL_HEADER_LIBRARIES
+=
libutils_headers
LOCAL_HEADER_LIBRARIES
+=
libhardware_headers
LOCAL_HEADER_LIBRARIES
+=
generated_kernel_headers
LOCAL_SRC_FILES
:=
power-8953.c power.c metadata-parser.c utils.c list.c hint-data.c powerhintparser.c
LOCAL_C_INCLUDES
:=
external/libxml2/include
\
external/icu/icu4c/source/common
...
...
This diff is collapsed.
Click to expand it.
power/power-common.h
+
3
−
0
View file @
f9ed2384
...
...
@@ -42,6 +42,9 @@
#define HINT_HANDLED (0)
#define HINT_NONE (-1)
#define INPUT_EVENT_WAKUP_MODE_OFF 4
#define INPUT_EVENT_WAKUP_MODE_ON 5
enum
CPU_GOV_CHECK
{
CPU0
=
0
,
CPU1
=
1
,
...
...
This diff is collapsed.
Click to expand it.
power/power.c
+
10
−
3
View file @
f9ed2384
...
...
@@ -42,6 +42,7 @@
#include
<utils/Log.h>
#include
<hardware/hardware.h>
#include
<hardware/power.h>
#include
<linux/input.h>
#include
"utils.h"
#include
"hint-data.h"
...
...
@@ -145,9 +146,15 @@ void set_interactive(struct power_module *module, int on)
void
set_feature
(
struct
power_module
*
module
,
feature_t
feature
,
int
state
)
{
switch
(
feature
)
{
#ifdef TAP_TO_WAKE_NODE
case
POWER_FEATURE_DOUBLE_TAP_TO_WAKE
:
sysfs_write
(
TAP_TO_WAKE_NODE
,
state
?
"1"
:
"0"
);
break
;
case
POWER_FEATURE_DOUBLE_TAP_TO_WAKE
:
{
int
fd
=
open
(
TAP_TO_WAKE_NODE
,
O_RDWR
);
struct
input_event
ev
;
ev
.
type
=
EV_SYN
;
ev
.
code
=
SYN_CONFIG
;
ev
.
value
=
state
?
INPUT_EVENT_WAKUP_MODE_ON
:
INPUT_EVENT_WAKUP_MODE_OFF
;
write
(
fd
,
&
ev
,
sizeof
(
ev
));
close
(
fd
);
}
break
;
#endif
default:
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment