title: Why are i2c_smbus function not available? (I2C – Embedded Linux)
body: <p>There are many references to using <strong>i2c_smbus_</strong> functions when developing embedded Linux software to communicate on the I2C bus. When <strong>i2c_smbus</strong> functions such as <strong>i2c_smbus_read_word_data</strong> are referenced in software project for ARM8 processor errors such as ‘<strong>i2c_smbus_read_word_data’ was not declared in this scope</strong> are generated at compile. </p>
  
  <p>Investigation of the following header files indicate the absence of most <strong>i2c_smbus</strong> function definition. </p>
  
  <ul>
  <li>/usr/arm-linux-gnueabi/include/linux/i2c.h</li>
  <li>/usr/arm-linux-gnueabi/include/linux/i2c-dev.h</li>
  </ul>
  
  <p>Also in that following reference <a href="http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/linux/i2c.h#L80" rel="noreferrer">i2c.h</a> file has all the i2c_smbus defined.</p>
  
  <p>How can this problem be resolved?</p>
  
  <p><strong>Research references</strong> </p>
  
  <ol>
  <li><a href="https://xgoat.com/wp/2007/11/11/using-i2c-from-userspace-in-linux/" rel="noreferrer">Using I2C from userspace in Linux</a></li>
  <li><a href="http://www.ctrlinux.com/blog/?p=38" rel="noreferrer">I2C Communication from Linux Userspace – Part II</a></li>
  <li><a href="https://www.kernel.org/doc/Documentation/i2c/dev-interface" rel="noreferrer">I2C dev interface</a> </li>
  </ol>