Hi, all
I've an OMAPL138+Linux2.6.33.rc4, the keyboard constroller is 8418. I write a program, something like
m_nFd = open("/dev/mem", O_RDWR);
m_pBaseAddr = (i2c_regs_t *)mmap(0, sizeof(i2c_regs_t), PROT_READ | PROT_WRITE, MAP_SHARED, m_nFd, I2C0_REG_BASE );
I2C_init(m_pBaseAddr, I2C_CLK_400K);
sleep(1);
TCA8418_writeRegister(TCA8418_REG_CFG, 0x2d);
TCA8418_writeRegister(TCA8418_REG_KP_GPIO1, 0x3F);
TCA8418_writeRegister(TCA8418_REG_KP_GPIO2, 0x3F);
TCA8418_writeRegister(TCA8418_REG_KP_GPIO3, 0x00);
TCA8418_writeRegister(TCA8418_REG_GPIO_DIR1, 0xC0);
TCA8418_writeRegister(TCA8418_REG_GPIO_DIR2, 0xC0);
TCA8418_writeRegister(TCA8418_REG_GPIO_DIR3, 0x03);
The test program is always failed, while it stop in TCA8418_writeRegister function.
But I use this method to test the temperature which use i2c too is almost OK ( 80% success ).
in my /dev I can only see i2c-1, and it seem like TPS6507x, for the boot message said:
input: TPS6507x Touchscreen as /devices/platform/i2c-gpio.1/i2c-1/1-0048/input/i
nput0
i2c /dev entries driver