Menu

#184 i2c header error building on linux 7.1.9

none
Invalid
nobody
None
Low
Defect
2026-08-30
2026-08-30
No

Building on arch linux with kernel 7.1.9 throws an error due to I2C_FUNC_I2C (i2c.c) not being defined. including <linux i2c.h=""> in addition to the already included <linux i2c-dev.h=""> solves the issue. </linux></linux>

Discussion

  • George Crane

    George Crane - 2026-08-30

    bad formatting above, "linux/i2c.h" and "linux/i2c-dev" respectively

     
  • Tormod Volden

    Tormod Volden - 2026-08-30

    Thanks for the heads-up but we have always included both of them.

    git show v0.4:i2c.c | grep -A1 -B1 include.*linux
    #else
    #include <linux/i2c.h>
    #include <linux/i2c-dev.h>
    #endif
    

    Where are your sources from?

     
  • George Crane

    George Crane - 2026-08-30

    This is so weird. I had this repo included as a submodule, and after removing it and re-adding it i2c.c now matches what you've shown above. I have no clue what I did wrong the first time but everything is correct now...

     
  • Tormod Volden

    Tormod Volden - 2026-08-30
    • status: New --> Invalid
     

Anonymous
Anonymous

Add attachments
Cancel