To compile this driver as a module, choose M here: the
module will be called goodix.
+config TOUCHSCREEN_GT9XX
+ tristate "Goodix gt9xx support for rockchip platform"
+ depends on I2C && ARCH_ROCKCHIP
+ help
+ Say Y here if you have a touchscreen interface using the gt9xx
+ on Rockchip platform, and your board-specific initialization
+ code includes that in its table of IIC devices.
+ If unsure, say N.
+
config TOUCHSCREEN_ILI210X
tristate "Ilitek ILI210X based touchscreen"
depends on I2C
msgs[0].addr = client->addr;
msgs[0].len = GTP_ADDR_LENGTH;
msgs[0].buf = &buf[0];
+#ifdef CONFIG_I2C_ROCKCHIP_COMPAT
msgs[0].scl_rate=200 * 1000;
//msgs[0].scl_rate = 300 * 1000; // for Rockchip, etc.
-
+#endif
msgs[1].flags = I2C_M_RD;
msgs[1].addr = client->addr;
msgs[1].len = len - GTP_ADDR_LENGTH;
msgs[1].buf = &buf[GTP_ADDR_LENGTH];
+#ifdef CONFIG_I2C_ROCKCHIP_COMPAT
msgs[1].scl_rate=200 * 1000;
- //msgs[1].scl_rate = 300 * 1000;
+ //msgs[1].scl_rate = 300 * 1000; // for Rockchip, etc.
+#endif
while(retries < 5)
{
msg.addr = client->addr;
msg.len = len;
msg.buf = buf;
+#ifdef CONFIG_I2C_ROCKCHIP_COMPAT
msg.scl_rate=200 * 1000;
//msg.scl_rate = 300 * 1000; // for Rockchip, etc
-
+#endif
while(retries < 5)
{
ret = i2c_transfer(client->adapter, &msg, 1);
{
s32 ret = 0;
- GTP_DEBUG("write count %d\n", count);
-
if (count > GTP_CONFIG_MAX_LENGTH)
{
GTP_ERROR("size not match [%d:%zu]\n", GTP_CONFIG_MAX_LENGTH, count);
// delay 48 + 10ms to ensure reliability
msleep(58);
regulator_tp = regulator_get(NULL,"vcc_tp");
- if(regulator_tp ==NULL)
+ if(IS_ERR(regulator_tp))
{
printk("!!!!%s:%d:get regulator_tp failed\n",__func__,__LINE__);
return 0;
GTP_INFO("System resume.");
regulator_tp = regulator_get(NULL, "vcc_tp");
- if(regulator_tp ==NULL)
+ if(IS_ERR(regulator_tp))
{
printk("!!!!%s:%d:get regulator_tp failed\n",__func__,__LINE__);
return 0;
struct device_node *np = client->dev.of_node;
enum of_gpio_flags rst_flags, pwr_flags;
u32 val;
- printk("___%s() start____ \n", __func__);
+ printk("%s() start\n", __func__);
GTP_DEBUG_FUNC();
//do NOT remove these logs
GTP_INFO("GTP Driver Version: %s", GTP_DRIVER_VERSION);
- GTP_INFO("GTP Driver Built@%s, %s", __TIME__, __DATE__);
GTP_INFO("GTP I2C Address: 0x%02x", client->addr);
i2c_connect_client = client;