Hi, my attempt to compile using the Haven openwfd driver method leads to errors. Why is this happening?
make[1]: Entering directory '/usr/src/linux-headers-6.11.0-edge-rockchip64'
CC [M] /root/linux_openvfd/driver/openvfd_drv.o
/root/linux_openvfd/driver/openvfd_drv.c:44:7: warning: "CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND" is not defined, evaluates to 0 [-Wundef]
44 | #elif CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c: In function ‘register_openvfd_driver’:
/root/linux_openvfd/driver/openvfd_drv.c:400:75: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
400 | pr_dbg("%s: Succeeded to add openvfd module \n", __func__);
| ^
/root/linux_openvfd/driver/openvfd_drv.c: At top level:
/root/linux_openvfd/driver/openvfd_drv.c:622:19: warning: no previous prototype for ‘gpiochip_find’ [-Wmissing-prototypes]
622 | struct gpio_chip *gpiochip_find(void *data,
| ^~~~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c: In function ‘gpiochip_find’:
/root/linux_openvfd/driver/openvfd_drv.c:629:35: error: passing argument 2 of ‘gpio_device_find’ from incompatible pointer type [-Werror=incompatible-pointer-types]
629 | gdev = gpio_device_find(data, match);
| ^~~~~
| |
| int (*)(struct gpio_chip *, void *)
In file included from ./include/linux/of_gpio.h:14,
from /root/linux_openvfd/driver/openvfd_drv.c:36:
./include/linux/gpio/driver.h:641:39: note: expected ‘int (*)(struct gpio_chip *, const void *)’ but argument is of type ‘int (*)(struct gpio_chip *, void *)’
641 | int (*match)(struct gpio_chip *gc,
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
642 | const void *data));
| ~~~~~~~~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c: At top level:
/root/linux_openvfd/driver/openvfd_drv.c:669:5: warning: no previous prototype for ‘evaluate_pin’ [-Wmissing-prototypes]
669 | int evaluate_pin(const char *name, const unsigned int *vfd_arg, struct vfd_pin *pin, unsigned char enable_skip_evaluation)
| ^~~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c:752:6: warning: no previous prototype for ‘get_pin_from_dt’ [-Wmissing-prototypes]
752 | void get_pin_from_dt(const char *name, const struct platform_device *pdev, struct vfd_pin *pin)
| ^~~~~~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c:763:5: warning: no previous prototype for ‘request_pin’ [-Wmissing-prototypes]
763 | int request_pin(const char *name, struct vfd_pin *pin, unsigned char enable_skip)
| ^~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c:1034:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
1034 | .remove = openvfd_driver_remove,
| ^~~~~~~~~~~~~~~~~~~~~
/root/linux_openvfd/driver/openvfd_drv.c:1034:19: note: (near initialization for ‘openvfd_driver.<anonymous>.remove’)
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:244: /root/linux_openvfd/driver/openvfd_drv.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.11.0-edge-rockchip64/Makefile:1926: /root/linux_openvfd/driver] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.11.0-edge-rockchip64'
make: *** [Makefile:5: modules] Error 2