Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
device_xiaomi_sm8350-common
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_sm8350-common
Commits
dca30450
Commit
dca30450
authored
4 years ago
by
Pig
Committed by
Demon000
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sm6250-common: light: Remove backlight support in case of hwcomposer
Change-Id: I3005c11f57797372b45e1c0f81caa4ddcac9cc36
parent
a24f8196
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
light/Light.cpp
+0
-8
0 additions, 8 deletions
light/Light.cpp
with
0 additions
and
8 deletions
light/Light.cpp
+
0
−
8
View file @
dca30450
...
...
@@ -22,14 +22,12 @@
#include
<fstream>
#define LCD_LED "/sys/class/backlight/panel0-backlight/"
#define NOTIFICATION_LED "/sys/class/leds/white/"
#define BREATH "breath"
#define BRIGHTNESS "brightness"
#define MAX_LED_BRIGHTNESS 255
#define MAX_LCD_BRIGHTNESS 4095
namespace
{
/*
...
...
@@ -83,11 +81,6 @@ static inline uint32_t getScaledBrightness(const LightState& state, uint32_t max
return
scaleBrightness
(
getBrightness
(
state
),
maxBrightness
);
}
static
void
handleBacklight
(
const
LightState
&
state
)
{
uint32_t
brightness
=
getScaledBrightness
(
state
,
MAX_LCD_BRIGHTNESS
);
set
(
LCD_LED
BRIGHTNESS
,
brightness
);
}
static
void
handleNotification
(
const
LightState
&
state
)
{
uint32_t
whiteBrightness
=
getScaledBrightness
(
state
,
MAX_LED_BRIGHTNESS
);
...
...
@@ -131,7 +124,6 @@ static std::vector<LightBackend> backends = {
{
Type
::
ATTENTION
,
handleNotification
},
{
Type
::
NOTIFICATIONS
,
handleNotification
},
{
Type
::
BATTERY
,
handleNotification
},
{
Type
::
BACKLIGHT
,
handleBacklight
},
};
static
LightStateHandler
findHandler
(
Type
type
)
{
...
...
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