WP76XX SDK 18.1.0 Missing linux/i2c-dev-user.h

There are a few different issues in play here.

For some reason, the upstream i2c-tools package overwrites the include/linux/i2c-dev.h with its own version which adds some header only functions for smbus. I’m not sure why they didn’t just create a separate header called i2c-dev-smbus.h or something, but they didn’t.

Yocto (or openembedded?) does something sort of non-standard in that they don’t overwrite the default i2c-dev.h file provided by the Linux kernel. Instead they rename the one from i2c-tools to i2c-dev-user.h. If you look at poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb in the yocto folder for WP76, you will see these lines:

install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
rm -f ${D}${includedir}/linux/i2c-dev.h

In December 2017, a commit was made to meta-swi which removed the i2c-tools package from the list of package dependencies for the mdm9x28 image. So as a result, you no longer have i2c-dev-user.h

1 Like