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

**URL:** <https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185>\
**Category:** Uncategorized\
**Created:** [March 31, 2018, 8:29am UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185 "2018-03-31T08:29:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [March 31, 2018, 8:29am UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/1 "2018-03-31T08:29:39Z")

</div>

the file is missing in  
legato.sdk.18.1.0.wp76xx-native-x86\_64-201803051402

copied the one from  
legato.sdk.16.10.4.wp85-wp75-native-x86\_64-201712131538

i2c-dev.h and i2c-dev-user.h

Not sure if this is deliberate or oversight

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 3, 2018, 2:27am UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/2 "2018-04-03T02:27:14Z")

</div>

Hi,

I find i2c-dev.h inside the WP76 toolchain legato.toolchain.2.2.2.SWI9X07Y\_02140400-wp76xx-native-x86-201803051138.

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [April 3, 2018, 5:40am UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/3 "2018-04-03T05:40:39Z")

</div>

There 2 files i2c-dev.h and i2c-dev-user.h both are available when compiling the toolchain but not in the devstudio package WP85XX does include them the -user.h file includes the SMB interface

> ls ciis4-legato-yocto/yocto-wp76/build\_bin/tmp/sysroots/swi-mdm9x28/usr/include/linux/i2c-dev\*

> ciis4-legato-yocto/yocto-wp76/build\_bin/tmp/sysroots/swi-mdm9x28/usr/include/linux/i2c-dev-user.h  
> ciis4-legato-yocto/yocto-wp76/build\_bin/tmp/sysroots/swi-mdm9x28/usr/include/linux/i2c-dev.h

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 3, 2018, 6:16am UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/4 "2018-04-03T06:16:03Z")

</div>

I guess maybe you can directly use the one in the toolchain.

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/dfrey/32/563_2.png) [@dfrey](https://forum.legato.io/u/dfrey)\
**Post date:** [April 3, 2018, 3:57pm UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/5 "2018-04-03T15:57:25Z")

</div>

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:

```auto
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`

---

<div class="post-metadata">

**Author:** ![deadpoolcode](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/deadpoolcode/32/382_2.png) [@deadpoolcode](https://forum.legato.io/u/deadpoolcode)\
**Post date:** [April 17, 2018, 2:37pm UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/6 "2018-04-17T14:37:18Z")

</div>

if so, where it should be added ?

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [April 18, 2018, 8:03am UTC](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/7 "2018-04-18T08:03:06Z")

</div>

the easiest and laziest way is just add it to your code and include it …
