nx: use intel iio/sysfs sensor hal
Set up in polling mode--trigger and event mode will need testing. Will also require testing for generalized calib profile for max range. Change-Id: I8e58cac0288ba8b53f3451c239c15c0a906db8d4
This commit is contained in:
1 parent
c12b495144
commit
2ef2da1d0f
6 files changed
+94
No files matched your search
@@ -59,6 +59,14 @@ LOCAL_ODM_MODULE := true
|
||||
LOCAL_SRC_FILES := power.nx.rc
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.sensors.nx.rc
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := init.sensors.nx.rc
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
LOCAL_MODULE_RELATIVE_PATH := init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := lkm_loader
|
||||
LOCAL_SRC_FILES := lkm_loader.sh
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import /vendor/etc/init/hw/init.tegra.rc
|
||||
import /vendor/etc/init/hw/init.t210.rc
|
||||
import /vendor/etc/init/hw/init.loki_foster_e_common.rc
|
||||
import /vendor/etc/init/hw/init.sensors.nx.rc
|
||||
import /vendor/etc/init/hw/init.${ro.boot.hardware.sku}.rc
|
||||
|
||||
on init
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# Copyright (C) 2023 The LineageOS Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# NOTE: some stuff might look like a typo--it is likely not. cutils properties can only
|
||||
# handle <32 chars per property so they get cut. Device names are cut to 7 and
|
||||
# props are cut to 31.
|
||||
|
||||
on init
|
||||
setprop ro.hardware.sensors iio
|
||||
|
||||
# Force polling mode for accel and gyro
|
||||
setprop ro.iio.accel.quirks no-trig,no-event
|
||||
setprop ro.iio.anglvel.quirks no-trig,no-event
|
||||
|
||||
# LSM6DS3H
|
||||
setprop ro.iio.anglvel.lsm6ds3.name "LSM6DS3H Gyroscope"
|
||||
setprop ro.iio.anglvel.lsm6ds3.vendor STMicroelectronics
|
||||
setprop ro.iio.anglvel.lsm6ds3.max_rang 35
|
||||
setprop ro.iio.accel.lsm6ds3.name "LSM6DS3H Accelerometer"
|
||||
setprop ro.iio.accel.lsm6ds3.vendor STMicroelectronics
|
||||
setprop ro.iio.accel.lsm6ds3.max_range 79
|
||||
|
||||
# LSM6DSE
|
||||
setprop ro.iio.anglvel.lsm6dse.name "LSM6DSE Gyroscope"
|
||||
setprop ro.iio.anglvel.lsm6dse.vendor STMicroelectronics
|
||||
setprop ro.iio.anglvel.lsm6dse.max_rang 35
|
||||
setprop ro.iio.accel.lsm6dse.name "LSM6DSE Accelerometer"
|
||||
setprop ro.iio.accel.lsm6dse.vendor STMicroelectronics
|
||||
setprop ro.iio.accel.lsm6dse.max_range 79
|
||||
|
||||
# LSM6DS0
|
||||
setprop ro.iio.anglvel.lsm6ds0.name "LSM6DS0 Gyroscope"
|
||||
setprop ro.iio.anglvel.lsm6ds0.vendor STMicroelectronics
|
||||
setprop ro.iio.anglvel.lsm6ds0.max_rang 35
|
||||
setprop ro.iio.accel.lsm6ds0.name "LSM6DSE Accelerometer"
|
||||
setprop ro.iio.accel.lsm6ds0.vendor STMicroelectronics
|
||||
setprop ro.iio.accel.lsm6ds0.max_range 79
|
||||
|
||||
# ICM40607
|
||||
setprop ro.iio.anglvel.icm4060.name "ICM40607 Gyroscope"
|
||||
setprop ro.iio.anglvel.icm4060.vendor Invensense
|
||||
setprop ro.iio.anglvel.icm4060.max_rang 18
|
||||
setprop ro.iio.accel.icm4060.name "ICM40607 Accelerometer"
|
||||
setprop ro.iio.accel.icm4060.vendor Invensense
|
||||
setprop ro.iio.accel.icm4060.max_range 11
|
||||
|
||||
# BH1730FVC
|
||||
setprop ro.iio.illuminance.bh1730.name "BH1730FVC Ambient Light Sensor"
|
||||
setprop ro.iio.illuminance.bh1730.vendor ROHM
|
||||
Reference in new issue
Block a user