White Papers
5
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_enforce_resources=lax"
GRUB_CMDLINE_LINUX=""
# ...
Figure 4
3. After the file is edited and saved, run the command “sudo update-grub” to update the GRUB configuration on the system.
4. Reboot to make the new kernel command effective.
5. After reboot, check that the error has been eliminated.
Note: Canonical’s Ubuntu release for the Embedded Box PCs has enabled the option in kernel by default. The user should not have
any problem in loading the i2c-i801 driver on the release. (This is not applicable on the general public release of the Ubuntu operating
system!).
OPEN THE INTERFACE OF I2C ADAPTER
The TI TCA9555 GPIO expander is not supported at the kernel level. This white paper details the alternative approach to access the
device on an I2C adapter from user space, through the device file (i.e. /dev).
Each registered adapter on the system will get a unique number. The Intel SMBUS controller (the adapter which masters the GPIO
expander) is enumerated as i2c-7 on the Embedded PC 3000. The slave address of GPIO expander is 0x20 on this bus.
To view the information of all registered adapters, run the command “i2cdetect -l”.
Refer to the following source code example for opening the interface and specifying the address of the slave device.
#include <linux/i2c-dev.h>
#include <linux/i2c.h>
#define I2C_ADAPTER "/dev/i2c-7"
#define TCA9555_ADDRESS 0x20
int fd;
...
fd = open(I2C_ADAPTER, O_RDWR);
if ( fd < 0 ) {
fprintf(stderr, "failed to open i2c adapter file \"%s\": %s\n",
I2C_ADAPTER, strerror(errno));
exit(-1);
}
if (ioctl(fd, I2C_SLAVE, TCA9555_ADDRESS) < 0) {
fprintf(stderr, "failed to change slave address\n",
TCA9555_ADDRESS, strerror(errno));
Eixt(-1);
}