m5stack / m5stack-linux-dtoverlays

Device Tree Overlays
Other
7 stars 4 forks source link

aw882xx build error #5

Closed tunefs closed 4 months ago

tunefs commented 1 year ago

I got the following error when I tried to make in modules/aw882xx/src.

saito@cm4stack:~/m5stack-linux-dtoverlays/modules/aw882xx/src $ make -j -C /lib/modules/$(uname -r)/build M=$(pwd) modules
make: Entering directory '/usr/src/linux-headers-6.1.21-v7l+'
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.o
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx_monitor.o
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx_init.o
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx_dsp.o
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx_device.o
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx_bin_parse.o
  CC [M]  /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx_spin.o
/home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.c: In function ‘aw882xx_i2c_remove’:
/home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.c:2325:3: error: implicit declaration of function ‘devm_gpio_free’; did you mean ‘devm_gpiod_get’? [-Werror=implicit-function-declaration]
 2325 |   devm_gpio_free(&i2c->dev, aw882xx->irq_gpio);
      |   ^~~~~~~~~~~~~~
      |   devm_gpiod_get
/home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.c: At top level:
/home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.c:2382:12: error: initialization of ‘void (*)(struct i2c_client *)’ from incompatible pointer type ‘int (*)(struct i2c_client *)’ [-Werror=incompatible-pointer-types]
 2382 |  .remove = aw882xx_i2c_remove,
      |            ^~~~~~~~~~~~~~~~~~
/home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.c:2382:12: note: (near initialization for ‘aw882xx_i2c_driver.remove’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src/aw882xx.o] Error 1
make: *** [Makefile:2012: /home/saito/m5stack-linux-dtoverlays/modules/aw882xx/src] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.21-v7l+'
dianjixz commented 4 months ago

The aw882xx code is not compatible with the kernel version 6.0.0 or above of Linux. Please try changing the kernel version.