summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRashed Abdel-Tawab <rashed@linux.com>2015-03-10 13:09:56 -0400
committerRashed Abdel-Tawab <rashed@linux.com>2015-05-31 16:31:01 -0400
commit7deb2004bf3cfc57fbe07031195f6e231586b5ce (patch)
treefbe863727660b91c4cb83e7a0cd05dd6ba1ab376
parent8160c59a6fccf15e06e4e8338653361c17ddbb7b (diff)
vs980: Add variant specific sensor configuration
Change-Id: Ie794492dc0c94052a3f92c0b1a405366f45d76d9
-rw-r--r--configs/sensor_def_vs980.conf159
-rw-r--r--device.mk4
2 files changed, 163 insertions, 0 deletions
diff --git a/configs/sensor_def_vs980.conf b/configs/sensor_def_vs980.conf
new file mode 100644
index 0000000..998d483
--- /dev/null
+++ b/configs/sensor_def_vs980.conf
@@ -0,0 +1,159 @@
+#
+# File: sensor_def_g2_vzw.conf
+#
+# Tihs file contains default sensor registry values for LGE development
+# Model platforms.
+#
+# Copyright (c) 2012-2013 by LGE, Incorporated.
+# LGE Proprietary
+
+
+# File format:
+#
+# Lines starting with "#" are comments and ignored.
+#
+# File metadata uses this format:
+# :key value1 value2
+#
+# The following keys are defined:
+# - "version" : value1 is non-zero positive version number of the file. This
+# number will be stored in the sensors registry. It should be equal to the
+# largest version of any item. It will be saved in the sensors registry for
+# later use when initializing values. See the item format below.
+# This value should only be specified once in the file.
+#
+# - "hardware" : The value1 will be compared to the "Hardware" string from
+# /proc/cpuinfo.
+# Items will only be used as default values in the registry if the hardware
+# string value is a substring of the /proc/cpuinfo string.
+# This metadata key can be used more than once, so that one file can support
+# more than one type of hardware.
+# The value may be NULL, indicating common item values for all hardware.
+#
+# - "platform" : Similar to the "hardware" key, but this string will need to
+# match the text of either /sys/devices/soc0/hw_platform or
+# /sys/devices/soc0/platform_subtype.
+#
+# - "property" : value1 is the Android system property key, and value2 is
+# the desired property value. If the system property value matches the
+# desired property value, then the following items will be applied.
+# This metadata key can be used more than once, in which case the new
+# property value overrides the old.
+# value1 and 2 may be NULL, indicating common item values for all properties.
+# ex)
+# H/W Board's revision - property ro.revision <value>
+# Target product - property ro.product.name <value>
+#
+# Registry items are in lines with the following format:
+# <itemID> <value> <version>
+# Where:
+# itemID is the numeric item ID defined in sns_reg_api_v02.h
+#
+# "value" is the numeric value of the item.
+#
+# "version" is a non-zero version of the item value.
+# The version field will be compared against the previous saved
+# value in the sensors registry. If this value is greater than the
+# saved value, the default will be applied. Otherwise, the default
+# will be skipped.
+#
+# Registry item values will only be applied if the hardware, platform, and
+# property values match for the current hardware configuration.
+#
+# The numeric fields are parsed with the strtoull function, base 0.
+#
+
+:version 0x00000002
+
+########################################################################
+### g2_vzw
+########################################################################
+:property
+
+## Orientation of sensors
+#----------------------------------
+# accelerometer x/y/z of AXIS
+#----------------------------------
+# ID VALUE VERSION
+700 -2 0x00000003
+701 -1 0x00000003
+702 -3 0x00000003
+# gyroscope x/y/z of AXIS
+800 -2 0x00000003
+801 -1 0x00000003
+802 -3 0x00000003
+# magnetic x/y/z of AXIS
+900 -1 0x00000003
+901 2 0x00000003
+902 -3 0x00000003
+
+## Proximity & ambient sensor
+#----------------------------------
+# ID VALUE VERSION
+107 0 0x00000003 # version_num
+108 0 0x00000003 # id
+109 7 0x00000003 # als_change_pcnt
+110 151 0x00000003 # als_ga
+111 195 0x00000003 # als_coe_b
+112 44 0x00000003 # als_coe_c
+113 79 0x00000003 # als_coe_d
+114 8 0x00000003 # prx_ppcount
+#115 0x40 0x00000003 # prx_control # wonjae.choi@lge.com will be update @calibration only for VZW
+116 100 0x00000003 # prx_cal_hysteresis
+117 720 0x00000003 # prx_cal_threshold
+118 300 0x00000003 # prx_cal_threshold_offset
+119 800 0x00000003 # threshold_near
+120 700 0x00000003 # threshold_far
+121 0x04 0x00000003 # prx_gain
+122 0x22 0x00000003 # prx_als_pers
+123 0 0x00000003 # reserved param
+124 0 0x00000003 # reserved param
+125 0 0x00000003 # reserved param
+126 0 0x00000003 # reserved param
+127 0 0x00000003 # reserved param
+128 0 0x00000003 # reserved param
+129 0 0x00000003 # reserved param
+130 0 0x00000003 # reserved param
+131 0 0x00000003 # reserved param
+132 0 0x00000003 # reserved param
+133 0 0x00000003 # reserved param
+134 0 0x00000003 # reserved param
+135 0 0x00000003 # reserved param
+
+
+:property ro.revision 3
+# HW_REV_B
+## Orientation of sensors
+#----------------------------------
+# accelerometer x/y/z of AXIS
+#----------------------------------
+# ID VALUE VERSION
+700 -1 0x00000003
+701 2 0x00000003
+702 -3 0x00000003
+# gyroscope x/y/z of AXIS
+800 -1 0x00000003
+801 2 0x00000003
+802 -3 0x00000003
+# magnetic x/y/z of AXIS
+900 -1 0x00000003
+901 2 0x00000003
+902 -3 0x00000003
+
+:property ro.revision 4
+# HW_REV_C
+## Orientation of sensors
+#----------------------------------
+# accelerometer x/y/z of AXIS
+# ID VALUE VERSION
+700 -1 0x00000003
+701 2 0x00000003
+702 -3 0x00000003
+# gyroscope x/y/z of AXIS
+800 -1 0x00000003
+801 2 0x00000003
+802 -3 0x00000003
+# magnetic x/y/z of AXIS
+900 -1 0x00000003
+901 2 0x00000003
+902 -3 0x00000003
diff --git a/device.mk b/device.mk
index 3be08d3..b8e0723 100644
--- a/device.mk
+++ b/device.mk
@@ -37,3 +37,7 @@ PRODUCT_COPY_FILES += \
# GPS
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps.conf:system/etc/gps.conf
+
+# Sensors
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/sensor_def_vs980.conf:system/etc/sensor_def_variable.conf