Skip to content

Commit

Permalink
star: Fix laser autofocus
Browse files Browse the repository at this point in the history
* Star uses stmvl53l5 sensor for laser autofocus
  • Loading branch information
markakash committed Jul 18, 2022
1 parent 017e4c0 commit 1b32c75
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rootdir/etc/init.target.rc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ on boot
chown system system /dev/xiaomi-touch
chmod 0660 /dev/xiaomi-touch

chmod 0666 /dev/stmvl53l5
chown system system /dev/stmvl53l5

write /dev/cpuset/audio-app/cpus 1-2

chown system /sys/devices/system/cpu/hyp_core_ctl/enable
Expand Down
3 changes: 3 additions & 0 deletions sepolicy/vendor/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# IR
/dev/ir_spi u:object_r:ir_spi_device:s0

# Laser autofocus
/dev/stmvl53l5 u:object_r:stmvl53l5_device:s0

# Mlipay
/(vendor|system/vendor)/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0

Expand Down
2 changes: 2 additions & 0 deletions sepolicy/vendor/hal_camera_default.te
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ add_hwservice(hal_camera_default, hal_camerapostproc_xiaomi_hwservice)
allow hal_camera_default system_server:binder { call };
allow hal_camera_default mnt_vendor_file:dir { search };

allow hal_camera_default stmvl53l5_device:chr_file { ioctl read write open };

vendor_public_prop(vendor_camera_sensor_prop)
2 changes: 2 additions & 0 deletions sepolicy/vendor/hal_sensors_default.te
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ allow hal_sensors_default audio_socket:sock_file rw_file_perms;
allow hal_sensors_default sound_device:chr_file rw_file_perms;
allow hal_sensors_default hal_audio_default:unix_stream_socket connectto;

allow hal_sensors_default stmvl53l5_device:chr_file { ioctl read write open };

allow hal_sensors_default iio_device:chr_file r_file_perms;
allow hal_sensors_default vendor_sysfs_iio:dir r_dir_perms;
allow hal_sensors_default vendor_sysfs_iio:file rw_file_perms;
1 change: 1 addition & 0 deletions sepolicy/vendor/stmvl53l5_device.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type stmvl53l5_device, dev_type;

0 comments on commit 1b32c75

Please sign in to comment.