I am trying to get the MAX30102 heart sensor to run and have recompiled the kernel with the necessary module. I have loaded the follwing modules to be sure
i2c_dev
i2c-bmc2708
i2c-bmc2835
industrialio
max30102
I can verify this with lsmod
Module Size Used by
max30102 16384 0
kfifo_buf 16384 1 max30102
regmap_i2c 16384 1 max30102
industrialio 73728 2 max30102,kfifo_buf
i2c_dev 20480 0
I have now found this device tree documentation and have tried adding
dtparam=interrupts=4,compatible=maxim,max30102,reg=0x57
to my /boot/config.txt
as they are mentioned under the section "required" in the documentation. I just need to pass my interrupt pin which is connected to GPIO 4. But when I look under
$ for file in /sys/bus/i2c/devices/i2c-1/of_node/*; do ( echo $file; cat $file; echo "\n" ) ; done
/sys/bus/i2c/devices/i2c-1/of_node/#address-cells
/sys/bus/i2c/devices/i2c-1/of_node/clock-frequency
��
/sys/bus/i2c/devices/i2c-1/of_node/clocks
/sys/bus/i2c/devices/i2c-1/of_node/compatible
brcm,bcm2711-i2cbrcm,bcm2835-i2c
/sys/bus/i2c/devices/i2c-1/of_node/interrupts
u
/sys/bus/i2c/devices/i2c-1/of_node/name
i2c
/sys/bus/i2c/devices/i2c-1/of_node/phandle
5
/sys/bus/i2c/devices/i2c-1/of_node/pinctrl-0
/sys/bus/i2c/devices/i2c-1/of_node/pinctrl-names
default
/sys/bus/i2c/devices/i2c-1/of_node/reg
~�@
/sys/bus/i2c/devices/i2c-1/of_node/#size-cells
/sys/bus/i2c/devices/i2c-1/of_node/status
okay
I still get the same values in the device tree. They are either empty or wrong.