Commit 18a257cb authored by Zhang Lixu's avatar Zhang Lixu Committed by Carles Cufi
Browse files

sensing: add hinge angle sensor

Add hinge angle virtual sensor for sensing subsystem, hinge angle sensor
takes both base accel and lid accel as reporter.

Signed-off-by: default avatarZhang Lixu <lixu.zhang@intel.com>
parent f2bbfc86
Loading
Loading
Loading
Loading
+10 −0
Changes for dts/bindings/sensor/zephyr,sensing-hinge-angle.yaml: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Copyright (c) 2023, Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#

description: Sensing subsystem hinge angle sensor bindings.

compatible: "zephyr,sensing-hinge-angle"

# Common sensor subsystem sensor properties.
include: ["zephyr,sensing-sensor.yaml"]
+1 −0
Changes for subsys/sensing/CMakeLists.txt: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,3 +11,4 @@ zephyr_library_sources(
)

add_subdirectory_ifdef(CONFIG_SENSING_SENSOR_PHY_3D_SENSOR sensor/phy_3d_sensor)
add_subdirectory_ifdef(CONFIG_SENSING_SENSOR_HINGE_ANGLE sensor/hinge_angle)
+1 −0
Changes for subsys/sensing/Kconfig: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -86,5 +86,6 @@ config SENSING_DISPATCH_THREAD_PRIORITY
	    Typical values are 8

source "subsys/sensing/sensor/phy_3d_sensor/Kconfig"
source "subsys/sensing/sensor/hinge_angle/Kconfig"

endif # SENSING
+3 −0
Changes for subsys/sensing/sensor/hinge_angle/CMakeLists.txt: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

zephyr_library_sources(hinge_angle.c)
+9 −0
Changes for subsys/sensing/sensor/hinge_angle/Kconfig: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Copyright (c) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

config SENSING_SENSOR_HINGE_ANGLE
	bool "Sensing hinge angle sensor"
	default y
	depends on DT_HAS_ZEPHYR_SENSING_HINGE_ANGLE_ENABLED
	help
	  Enable sensing hinge angle sensor.
Loading