Skip to content

Commit 05dd9f6

Browse files
committed
soc: qcom: Add in-kernel sensors registry implementation.
Initial "Sensors Registry" daemon implementation of [1] as kernel module. Qualcomm Sensor Registry (SNS_REG) is a QMI service used by the Snapdragon Sensor Core (SSC) on Qualcomm SoCs such as MSM8996 to get platform-specific sensor data. It is served by the application processor. This service provides SSC with the data it needs to function, which is basically contents of binary sensor registry file stored as firmware in qcom/sensors/sns.reg. On Android devices this file is usually available on "persist" partition on path: /persist/sensors/sns.reg. This is yet another QMI service to provide firmware files for the remote processors, like rmtfs, tqftpserv, pd_mapper and ath10k WLAN firmware service. The structure of this driver, usage of auxiliary device and reference counting is inspired by similar in this regard qcom_pd_mapper driver. [1] https://gitlab.com/msm8996-mainline/sns-reg Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
1 parent 2af1646 commit 05dd9f6

File tree

3 files changed

+630
-0
lines changed

3 files changed

+630
-0
lines changed

drivers/soc/qcom/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,25 @@ config QCOM_RPMH
171171
of hardware components aggregate requests for these resources and
172172
help apply the aggregated state on the resource.
173173

174+
config QCOM_SNS_REG
175+
tristate "Qualcomm Sensors Registry service"
176+
select QCOM_QMI_HELPERS
177+
select AUXILIARY_BUS
178+
depends on NET && QRTR && (ARCH_QCOM || COMPILE_TEST)
179+
default QCOM_RPROC_COMMON
180+
help
181+
Qualcomm Sensor Registry is a QMI service used by the Snapdragon
182+
Sensor Core (SSC) on Qualcomm SoCs such as MSM8996 to get platform
183+
specific sensor data. It is served by the application processor, and
184+
SSC requests data from it in the form of groups of keys. This server
185+
emulates the proprietary sensor daemon used in Android and provides
186+
SSC with the data it needs to function.
187+
This sensor registry server reads a sensor registry firmware file from
188+
qcom/sensors/sns.reg to obtain data requested by SSC. On Android
189+
devices this file is usually available on "persist" partition on path:
190+
/persist/sensors/sns.reg. This service can be used to enable sensor
191+
readings on wide range of SoCs: from MSM8226 to SDM660.
192+
174193
config QCOM_SMEM
175194
tristate "Qualcomm Shared Memory Manager (SMEM)"
176195
depends on ARCH_QCOM || COMPILE_TEST

drivers/soc/qcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ obj-$(CONFIG_QCOM_RPMH) += qcom_rpmh.o
2323
qcom_rpmh-y += rpmh-rsc.o
2424
qcom_rpmh-y += rpmh.o
2525
obj-$(CONFIG_QCOM_SMD_RPM) += rpm-proc.o smd-rpm.o
26+
obj-$(CONFIG_QCOM_SNS_REG) += qcom_sns_reg.o
2627
obj-$(CONFIG_QCOM_SMEM) += smem.o
2728
obj-$(CONFIG_QCOM_SMEM_STATE) += smem_state.o
2829
CFLAGS_smp2p.o := -I$(src)

0 commit comments

Comments
 (0)