mirror of
https://github.com/team-infusion-developers/android_device_samsung_msm8976-common.git
synced 2024-10-31 19:37:46 +00:00
msm8976-common: Fix button lights
This commit is contained in:
parent
6431319376
commit
74fbea78d2
2 changed files with 11 additions and 1 deletions
|
@ -104,11 +104,12 @@ set_light_buttons(struct light_device_t* dev,
|
|||
struct light_state_t const* state)
|
||||
{
|
||||
int err = 0;
|
||||
int on = (state->color & 0xFF);
|
||||
if(!dev) {
|
||||
return -1;
|
||||
}
|
||||
pthread_mutex_lock(&g_lock);
|
||||
err = write_int(BUTTON_FILE, state->color & 0xFF);
|
||||
err = write_int(BUTTON_FILE, on == 255 ? 1 : 0);
|
||||
pthread_mutex_unlock(&g_lock);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -261,6 +261,15 @@ on boot
|
|||
chown system media_rw /sys/class/graphics/fb0/csc_cfg
|
||||
chmod 0660 /sys/class/graphics/fb0/csc_cfg
|
||||
|
||||
# Permissions for Input Device
|
||||
chown system radio /sys/class/sec/tsp/cmd
|
||||
chown system system /sys/class/sec/tsp/input/enabled
|
||||
chmod 0660 /sys/class/sec/tsp/input/enabled
|
||||
chown system system /sys/class/sec/sec_touchkey/input/enabled
|
||||
chmod 0660 /sys/class/sec/sec_touchkey/input/enabled
|
||||
chown system system /sys/class/sec/sec_touchkey/brightness
|
||||
chmod 0660 /sys/class/sec/sec_touchkey/brightness
|
||||
|
||||
# Permissions for SENSOR
|
||||
# Fingerprint_sensor
|
||||
chown system radio /sys/class/fingerprint/fingerprint/type_check
|
||||
|
|
Loading…
Reference in a new issue