Encountering Issues with MAX30001 Sensor Driver in Zephyr

I attempted to use https://github.com/Protocentral/protocentral_max30001_zephyr_driver to build my project. However, I am still encountering some issues.

1.In the overlay file, I used the following:

Only spi nodes accepted in /soc/spi@4002f000/.
/soc/spi@4002f000/max30001@0/

max30001: max30001@0 {
    compatible = "maxim,max30001";
    reg = <0>;
    spi-max-frequency = <DT_FREQ_M(1)>;
    int-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
    label = "MAX30001";
    rtor-enabled;
    ecg-enabled;
    bioz-enabled;
    ecg-gain = <3>;
    ecg-invert;
};

2.In the prj.conf file, I included the following configurations:

CONFIG_SENSOR=y
CONFIG_SENSOR_MAX30001=y
CONFIG_GPIO=y
CONFIG_SPI=y

CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
3.My main file is as follows:

#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/sensor.h>

void main(void)
{
        const struct device *sensor = device_get_binding(DT_LABEL(DT_INST(0, maxim_max30001)));

        if (!device_is_ready(sensor))
        {
                printk("Device not ready.\n");
        }
        else
        {
                printk("Device is ready.\n");
        }

        if (!sensor)
        {
                printk("No device found.\n");
                return;
        }

        printk("Device found: %s\n", sensor->name);

        /* Additional code to read data from the sensor */
}

But I keep getting "Device not ready."

Related