The linux-gpib kernel modules fail to build on Linux kernel 6.12+ due to GPIO API changes.
The GPIOF_DIR_IN flag has been removed from the kernel's GPIO subsystem.
Error encountered:
/drivers/gpib/gpio/gpib_bitbang.c:968:68: error: 'GPIOF_DIR_IN' undeclared
Environment:
- Kernel version: 6.12.41+deb13-amd64
- linux-gpib version: SVN trunk (revision 2106)
- Distribution: Debian
I fixed it:
Index: linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c
===================================================================
--- linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c (revision 2106)
+++ linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c (working copy)
@@ -965,7 +965,8 @@
int j;
int last = sn7516x ? GPIB_PINS + SN7516X_PINS : GPIB_PINS ;
for ( j=0 ; j<last ; j++ ) {
- if (gpio_request_one (gpios_vector[j]+gpio_offset, GPIOF_DIR_IN, NULL)) break;
+ if (gpio_request(gpios_vector[j]+gpio_offset, NULL)) break;
+ gpio_direction_input(gpios_vector[j]+gpio_offset);
all_descriptors[j] = gpio_to_desc (gpios_vector[j]+gpio_offset);
}
if ( j != last) { / error - undo what already done /
This is fixed in the git repo, albeit using another approach.
Wasn't fixed in SVN trunk (revision 2106), but you can close it, if it is now fixed.