Hi guys,
EETI sent me this non-device tree driver configuration,
Please build the egalax_i2c driver into the kernel.
EETI I2C controller slave address is 0x2A. Please register the I2C device like below code in the hardware setup. Check the actual I2C channel number and INT pin to set the correct GPIO pin number.
Below example channel number is 3 and GPIO is GPIO_PB6.
###################################################################
static struct i2c_board_info __initdata egalax_i2c_boardinfo[] = {
{
.type = "egalax_i2c",
.addr = 0x2A,
},
};
egalax_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_PB6);
i2c_register_board_info(3, egalax_i2c_boardinfo, ARRAY_SIZE(egalax_i2c_boardinfo));
if(gpio_request(GPIO_PB6, "Touch IRQ") < 0)
printk(KERN_ERR "Failed to request GPIO%d for Touch IRQ\n", GPIO_PB6);
else
gpio_direction_input(GPIO_PB6);
but im new to this world, and i dont know where to put it, i downloaded the lemaker build environment and i built the egalax_i2c driver. but i dont know where to put " static struct i2c_board_info __initdata egalax_i2c_boardinfo = { …" Thank you for your help