Menu

#91 Linux kernel 6.12 bugfix

v1.0 (example)
open
nobody
None
5
2025-09-22
2025-09-20
Frank Buss
No

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 /

Discussion

  • DaveP

    DaveP - 2025-09-22

    This is fixed in the git repo, albeit using another approach.

     
    • Frank Buss

      Frank Buss - 2025-09-22

      Wasn't fixed in SVN trunk (revision 2106), but you can close it, if it is now fixed.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.