Skip to content

Commit 855a555

Browse files
authored
TMF882x driver linux source v3.56
1 parent 040aae5 commit 855a555

38 files changed

Lines changed: 16175 additions & 2 deletions

Doxyfile

Lines changed: 2494 additions & 0 deletions
Large diffs are not rendered by default.

Kbuild

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
EXTRA_CFLAGS := -I$(src)/include
2+
ccflags-y += -Wno-declaration-after-statement
3+
ccflags-$(CONFIG_TMF882X_QCOM_AP) += -DCONFIG_TMF882X_QCOM_AP
4+
obj-$(CONFIG_SENSORS_TMF882X) += tmf882x.o
5+
tmf882x-y += tmf882x_driver.o tmf882x_clock_correction.o tmf882x_mode.o tmf882x_mode_app.o tmf882x_mode_bl.o tmf882x_interface.o intel_hex_interpreter.o

Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
config SENSORS_TMF882X
2+
tristate "AMS-TAOS TMF882X TOF"
3+
depends on I2C
4+
default n
5+
help
6+
If you say yes here you get support for the ams-taos tmf882x,
7+
ToF distance sensors.
8+
9+
This driver can also be built as a module. If so, the module
10+
will be called tmf882x.
11+
12+
config TMF882X_QCOM_AP
13+
bool "AMS-TAOS TMF882X TOF QUALCOMM KERNEL"
14+
depends on SENSORS_TMF882X
15+
default n
16+
help
17+
If you say yes here you get support for the ams-taos tmf882x,
18+
ToF distance sensors with Qualcomm linux kernel additions.
19+

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ifneq ($(KERNELRELEASE),)
2+
#kbuild part of Makefile
3+
include Kbuild
4+
else
5+
#normal Makefile
6+
all:
7+
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) M=$$PWD modules
8+
9+
modules:
10+
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) M=$$PWD $@
11+
12+
sign:
13+
$(SIGN_SCRIPT) sha512 $(LINUX_SRC)/signing_key.priv $(LINUX_SRC)/signing_key.x509 $(DEVICE_NAME).ko
14+
15+
clean:
16+
$(MAKE) -C $(LINUX_SRC) M=$$PWD clean
17+
18+
endif

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
# tmf8820_21_28_driver_linux
2-
TMF8820/TMF8821/TMF8828 Linux driver
1+
# Time-of-Flight (ToF) Linux Reference Driver
2+
3+
The driver was developed on tested with the [ams OSRAM TMF882X_EVM_DB_DEMO Evaluation kit](https://ams-osram.com/products/boards-kits-accessories/kits/ams-tmf882x-evm-db-demo-evaluation-kit). This EVM includes a [Rasperry PI Zero](https://www.raspberrypi.com/products/raspberry-pi-zero-w/) where the Linux driver is operating.
4+
5+
1. Description
6+
7+
Contains the release files for adding tmf882x support to the linux kernel
8+
9+
/arch/arm/boot/dts
10+
Contains the device tree overlay for the TMF882X proto-
11+
typed on the Raspberry Pi zero. The rpi.env script is a convenience
12+
script for setting up build environment variables to point to a remote
13+
linux kernel source tree. This prototyped version uses GPIO_20 for INT
14+
and GPIO_16 for the "Chip-Enable" line
15+
16+
-tof8820-overlay.dts
17+
-normal configuration, CE gpio and INT gpio
18+
-change the "poll_period" attribute to use polling instead of interrupts
19+
20+
21+
2. Compiling
22+
23+
Driver - Compiling
24+
25+
1. Download Linux Kernel source:
26+
27+
2. Compile Linux Kernel
28+
29+
3. Compile ToF Device Tree
30+
31+
4. Compile ToF driver:
32+
```
33+
make CONFIG_SENSORS_TMF882X=m
34+
```
35+
36+
6. Compile ToF driver for Qualcomm linux kernel:
37+
```
38+
make CONFIG_SENSORS_TMF882X=m CONFIG_TMF882X_QCOM_AP=y
39+
```
40+
41+
3. Documentation
42+
43+
TMF882X Driver UAPI Guide can be generated with the 'pandoc' and 'LaTeX' packages by running:
44+
```
45+
pandoc doc\TMF882X_Driver_UAPI_Guide.md -o TMF882X_Driver_UAPI_Guide.pdf
46+
```
47+
48+
TMF882X Driver doxygen documentation can be generated by running
49+
('DOT' package is required for call-graphs):
50+
```
51+
doxygen
52+
```
53+

0 commit comments

Comments
 (0)