当前位置: 首页>>代码示例>>C++>>正文


C++ GTP_INFO函数代码示例

本文整理汇总了C++中GTP_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ GTP_INFO函数的具体用法?C++ GTP_INFO怎么用?C++ GTP_INFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GTP_INFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: gt1x_init_node

s32 gt1x_init_node(void)
{
#if GTP_GESTURE_WAKEUP
	struct proc_dir_entry *proc_entry = NULL;
	mutex_init(&gesture_data_mutex);
	memset(gestures_flag, 0, sizeof(gestures_flag));
	memset((u8 *) & gesture_data, 0, sizeof(st_gesture_data));

	proc_entry = proc_create(GESTURE_NODE, 0666, NULL, &gt1x_fops);
	if (proc_entry == NULL) {
		GTP_ERROR("Couldn't create proc entry[GESTURE_NODE]!");
		return -1;
	} else {
		GTP_INFO("Create proc entry[GESTURE_NODE] success!");
	}
#endif

#if GTP_HOTKNOT
	if (misc_register(&hotknot_misc_device)) {
		GTP_ERROR("Couldn't create [HOTKNOT_NODE] device!");
		return -1;
	} else {
		GTP_INFO("Create [HOTKNOT_NODE] device success!");
	}
#endif
	return 0;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:27,代码来源:gt1x_extents.c

示例2: tpd_enable_ps

static s32 tpd_enable_ps(s32 enable)
{
    u8  state;
    s32 ret = -1;
   // u8 buffer[3] = {0x80,0x42};
    	mutex_lock(&i2c_access);
    if (enable)
    {
//        buffer[2] = 1;
        state = 1;
        tpd_proximity_flag = 1;
        GTP_INFO("TPD proximity function to be on.");
    }
    else
    {
//        buffer[2] = 0;
        state = 0;
        //tpd_proximity_detect = 1;
        tpd_proximity_flag = 0;
        GTP_INFO("TPD proximity function to be off.");
    }

    ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1);
    //ret = gtp_i2c_write(i2c_client_point, buffer, sizeof(buffer));
    	mutex_unlock(&i2c_access);
    if (ret < 0)
    {
        GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable");
        //GTP_ERROR("TPD %s proximity cmd failed.", buffer[2] ? "enable" : "disable");
        return ret;
    }
    GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable");
    //GTP_INFO("TPD proximity function %s success.", buffer[2] ? "enable" : "disable");
    return 0;
}
开发者ID:rictec,项目名称:mtk-android3.18-yaris,代码行数:35,代码来源:gt9xx_driver.c

示例3: gtp_send_cfg

/*******************************************************
Function:
    Send config.
Input:
    client: i2c device.
Output:
    result of i2c write operation.
        1: succeed, otherwise: failed
*********************************************************/
s32 gtp_send_cfg(struct i2c_client *client)
{
    s32 ret = 2;

#if GTP_DRIVER_SEND_CFG
    s32 retry = 0;
    struct goodix_ts_data *ts = i2c_get_clientdata(client);

    if (ts->fixed_cfg)
    {
        GTP_INFO("Ic fixed config, no config sent!");
        return 2;
    }
    GTP_INFO("driver send config");
    for (retry = 0; retry < 5; retry++)
    {
        ret = gtp_i2c_write(client, config , GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH);
        if (ret > 0)
        {
            break;
        }
    }
#endif

    return ret;
}
开发者ID:saydulk,项目名称:rk3188-kernel,代码行数:35,代码来源:gt9xx.c

示例4: tpd_enable_ps

static s32 tpd_enable_ps(s32 enable)
{
    u8  state;
    s32 ret = -1;

    if (enable)
    {
        state = 1;
        tpd_proximity_flag = 1;
        GTP_INFO("TPD proximity function to be on.");
    }
    else
    {
        state = 0;
        tpd_proximity_flag = 0;
        GTP_INFO("TPD proximity function to be off.");
    }

    ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1);

    if (ret < 0)
    {
        GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable");
        return ret;
    }

    GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable");
    return 0;
}
开发者ID:Lesozav25,项目名称:mtk_6572,代码行数:29,代码来源:gt9xx_driver.c

示例5: init_wr_node

s32 init_wr_node(struct i2c_client *client)
{
    s32 i;

    gt_client = i2c_client_point;
    GTP_INFO("client %d.%d", (int)gt_client, (int)client);

    memset(&cmd_head, 0, sizeof(cmd_head));
    cmd_head.data = NULL;

    i = 5;

    while ((!cmd_head.data) && i)
    {
        cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL);

        if (NULL != cmd_head.data)
        {
            break;
        }

        i--;
    }

    if (i)
    {
        DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH;
        GTP_INFO("Applied memory size:%d.", DATA_LENGTH);
    }
    else
    {
        GTP_ERROR("Apply for memory failed.");
        return FAIL;
    }

    cmd_head.addr_len = 2;
    cmd_head.retry = 5;

    register_i2c_func();

    goodix_proc_entry = create_proc_entry(GOODIX_ENTRY_NAME, 0664, NULL);

    if (goodix_proc_entry == NULL)
    {
        GTP_ERROR("Couldn't create proc entry!");
        return FAIL;
    }
    else
    {
        GTP_INFO("Create proc entry success!");
        goodix_proc_entry->write_proc = goodix_tool_write;
        goodix_proc_entry->read_proc = goodix_tool_read;
    }

    return SUCCESS;
}
开发者ID:mradermaxlol,项目名称:HWY600-kernel,代码行数:56,代码来源:goodix_tool.c

示例6: init_wr_node

s32 init_wr_node(struct i2c_client *client)
{
	s32 i;

	gt_client = i2c_client_point;

	memset(&cmd_head, 0, sizeof(cmd_head));
	cmd_head.data = NULL;

	i = 5;

	while ((!cmd_head.data) && i) {
		cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL);

		if (NULL != cmd_head.data) {
			break;
		}

		i--;
	}

	if (i) {
		DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH;
		GTP_INFO("Applied memory size:%d.", DATA_LENGTH);
	} else {
		GTP_ERROR("Apply for memory failed.");
		return FAIL;
	}

	cmd_head.addr_len = 2;
	cmd_head.retry = 5;

	register_i2c_func();

	tool_set_proc_name(procname);
#if 0				/* fix 3.10 */
	goodix_proc_entry = create_proc_entry(gtp_tool_entry, 0664, NULL);

	if (goodix_proc_entry == NULL) {
		GTP_ERROR("Couldn't create proc entry!");
		return FAIL;
	} else {
		GTP_INFO("Create proc entry success!");
		goodix_proc_entry->write_proc = goodix_tool_write;
		goodix_proc_entry->read_proc = goodix_tool_read;
	}
#else
	if (proc_create(procname, 0660, NULL, &gt_tool_fops) == NULL) {
		GTP_ERROR("create_proc_entry %s failed", procname);
		return -1;
	}
#endif
	return SUCCESS;
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:54,代码来源:goodix_tool.c

示例7: register_i2c_func

static void register_i2c_func(void)
{
	if (strncmp(IC_TYPE, "GTxxx", 5)) {
		tool_i2c_read = tool_i2c_read_with_extra;
		tool_i2c_write = tool_i2c_write_with_extra;
		GTP_INFO("I2C function: register with pre and end cmd!");
	} else {
		tool_i2c_read = tool_i2c_read_no_extra;
		tool_i2c_write = tool_i2c_write_no_extra;
		GTP_INFO("I2C function: register without pre and end cmd!");
	}
}
开发者ID:C457,项目名称:android_kernel_samsung_t110,代码行数:12,代码来源:goodix_tool.c

示例8: hotknot_load_authentication_subsystem

static s32 hotknot_load_authentication_subsystem(void)
{
	s32 ret = 0;
	u8 buffer[5] = { 0 };

	ret = gt1x_hold_ss51_dsp_no_reset();
	if (ret < 0) {
		GTP_ERROR("Hold ss51 fail!");
		return ERROR;
	}

	if (gt1x_chip_type == CHIP_TYPE_GT1X) {
		GTP_INFO("hotknot load jump code.");
		ret = gt1x_load_patch(gt1x_patch_jump_fw, 4096, 0, 1024 * 8);
		if (ret < 0) {
			GTP_ERROR("Load jump code fail!");
			return ret;
		}
		GTP_INFO("hotknot load auth code.");
		ret = gt1x_load_patch(hotknot_auth_fw, 4096, 4096, 1024 * 8);
		if (ret < 0) {
			GTP_ERROR("Load auth system fail!");
			return ret;
		}
	} else {
		GTP_INFO("hotknot load auth code.");
		ret = gt1x_load_patch(hotknot_auth_fw, 4096, 0, 1024 * 6);
		if (ret < 0) {
			GTP_ERROR("load auth system fail!");
			return ret;
		}
	}

	ret = gt1x_startup_patch();
	if (ret < 0) {
		GTP_ERROR("Startup auth system fail!");
		return ret;
	}
	ret = gt1x_i2c_read(GTP_REG_VERSION, buffer, 4);
	if (ret < 0) {
		GTP_ERROR("i2c read error!");
		return ERROR_IIC;
	}
	buffer[4] = 0;
	GTP_INFO("Current System version: %s", buffer);
	return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:47,代码来源:gt1x_extents.c

示例9: gt1x_init_tool_node

int gt1x_init_tool_node(void)
{
    memset(&cmd_head, 0, sizeof(cmd_head));
    cmd_head.wr = 1;	//if the first operation is read, will return fail.
    cmd_head.data = kzalloc(DATA_LENGTH_UINT, GFP_KERNEL);
    if (NULL == cmd_head.data) {
        GTP_ERROR("Apply for memory failed.");
        return -1;
    }
    GTP_INFO("Applied memory size:%d.", DATA_LENGTH_UINT);
    DATA_LENGTH = DATA_LENGTH_UINT - GTP_ADDR_LENGTH;

    set_tool_node_name(procname);

    gt1x_tool_proc_entry = proc_create(procname, 0666, NULL, &gt1x_tool_fops);
    if (gt1x_tool_proc_entry == NULL) {
        GTP_ERROR("Couldn't create proc entry!");
        return -1;
    } else {
        GTP_INFO("Create proc entry success!");
    }
    return 0;
}
开发者ID:Niisp,项目名称:MT6795.kernel,代码行数:23,代码来源:gt1x_tools.c

示例10: init_wr_node

int init_wr_node(struct i2c_client *client)
{
	int i;

	gt_client = client;
	memset(&cmd_head, 0, sizeof(cmd_head));
	cmd_head.data = NULL;

	i = 5;
	while ((!cmd_head.data) && i) {
		cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL);
		if (NULL != cmd_head.data)
			break;
		i--;
	}
	if (i) {
		DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH;
		GTP_INFO("Applied memory size:%d.", DATA_LENGTH);
	} else {
		GTP_ERROR("Apply for memory failed.");
		return -1;
	}

	cmd_head.addr_len = 2;
	cmd_head.retry = 5;

	register_i2c_func();

	tool_set_proc_name(procname);
	fops.read = NULL;
	fops.write = NULL;
	goodix_proc_entry =
		proc_create_data(procname, 0666, NULL, &fops, NULL);
	if (goodix_proc_entry == NULL) {
		GTP_ERROR("Couldn't create proc entry!");
		return -1;
	}
	/* else {
	   GTP_INFO("Create proc entry success!");
	   goodix_proc_entry->write_proc = goodix_tool_write;
	   goodix_proc_entry->read_proc = goodix_tool_read;
	   }
	 */

	return 0;
}
开发者ID:Druboo666,项目名称:android_kernel_asus_moorefield,代码行数:46,代码来源:goodix_tool.c

示例11: register_i2c_func

static void register_i2c_func(void)
{
/* if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) */
/* || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) */
/* || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) */
/* || !strncmp(IC_TYPE, "GT813", 5)) */
	if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6)
	    && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5)
	    && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5)
	    && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) {
		tool_i2c_read = tool_i2c_read_with_extra;
		tool_i2c_write = tool_i2c_write_with_extra;
		GTP_DEBUG("I2C function: with pre and end cmd!");
	} else {
		tool_i2c_read = tool_i2c_read_no_extra;
		tool_i2c_write = tool_i2c_write_no_extra;
		GTP_INFO("I2C function: without pre and end cmd!");
	}
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:19,代码来源:goodix_tool.c

示例12: show_tpd_vendor_name

static ssize_t show_tpd_vendor_name(struct device *dev,struct device_attribute *attr, char *buf)
{
	u8 rd_vendor_buf[16];
        s32 ret = -1;
        rd_vendor_buf[0] = GTP_REG_SENSOR_ID >> 8;
        rd_vendor_buf[1] = GTP_REG_SENSOR_ID & 0xff;
        ret = gtp_i2c_read(i2c_client_point, rd_vendor_buf, 3);

        if (ret < 0)
        {
            GTP_ERROR("gt9xx Read SENSOR ID failed");
            rd_vendor_buf[GTP_ADDR_LENGTH] = 3;
            return sprintf(buf, "%s", tpd_manufacturer_name[rd_vendor_buf[GTP_ADDR_LENGTH]]);
        }

        GTP_INFO("gt9xx vendor ID:%d", rd_vendor_buf[GTP_ADDR_LENGTH]);
        rd_vendor_buf[GTP_ADDR_LENGTH] &= 0x03;
    	
    	return sprintf(buf, "%s", tpd_manufacturer_name[rd_vendor_buf[GTP_ADDR_LENGTH]]);
}
开发者ID:Lesozav25,项目名称:mtk_6572,代码行数:20,代码来源:gt9xx_driver.c

示例13: show_read_reg

static ssize_t show_read_reg(struct device *dev,struct device_attribute *attr, char *buf)
{
	int ret, cnt, i;
	
	u8 i2c_buf[GTP_ADDR_LENGTH+100] = {g_attr_read_reg>>8, g_attr_read_reg& 0xff};

	if (g_attr_read_reg == 0xFFFF || g_attr_read_nbytes == 0)
	{
		return sprintf(buf, "0x%x,%d??\n"ATTR_READ_REAG_HINT, g_attr_read_reg, g_attr_read_nbytes);
	}

	ret = gtp_i2c_read(i2c_client_point, i2c_buf, g_attr_read_nbytes+GTP_ADDR_LENGTH);
	if (ret < 0) 
	{
		return sprintf(buf, "read failed\n"ATTR_READ_REAG_HINT);
	}

	cnt = sprintf(buf, "BASE:0x%x, bytes=%d\n", (i2c_buf[0]<<8 | i2c_buf[1]), g_attr_read_nbytes);
	for (i = 0; i< g_attr_read_nbytes; i++)
	{
		cnt += sprintf(buf+cnt, "0x%02x,", i2c_buf[GTP_ADDR_LENGTH+i]);
		if ((i+1)%10 == 0)	cnt += sprintf(buf+cnt, "\n");
	}
	cnt += sprintf(buf+cnt, "\n");

	g_attr_read_reg = 0xFFFF;
	g_attr_read_nbytes = 0;

	return cnt;
}

static ssize_t store_read_reg(struct device *dev,struct device_attribute *attr, const char *buf, size_t size)
{
	char *p;
	
	g_attr_read_reg = (u16)simple_strtol(buf, &p, 16);
	g_attr_read_nbytes = simple_strtol(p+1, NULL, 10);

	GTP_INFO("0x%x, %d", g_attr_read_reg, g_attr_read_nbytes);
	return size;
}
开发者ID:Lesozav25,项目名称:mtk_6572,代码行数:41,代码来源:gt9xx_driver.c

示例14: unregister_i2c_func

static void unregister_i2c_func(void)
{
    tool_i2c_read = NULL;
    tool_i2c_write = NULL;
    GTP_INFO("I2C function: unregister i2c transfer function!");
}
开发者ID:mradermaxlol,项目名称:HWY600-kernel,代码行数:6,代码来源:goodix_tool.c

示例15: init_wr_node

s32 init_wr_node(struct i2c_client *client)
{
    s32 i;

    gt_client = i2c_client_point;

    memset(&cmd_head, 0, sizeof(cmd_head));
    cmd_head.data = NULL;

    i = 5;

    while ((!cmd_head.data) && i)
    {
        cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL);

        if (NULL != cmd_head.data)
        {
            break;
        }

        i--;
    }

    if (i)
    {
        DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH;
        GTP_INFO("Applied memory size:%d.", DATA_LENGTH);
    }
    else
    {
        GTP_ERROR("Apply for memory failed.");
        return FAIL;
    }

    cmd_head.addr_len = 2;
    cmd_head.retry = 5;

	memset(&cmd_head2, 0, sizeof(cmd_head2));
    cmd_head2.data = NULL;

    i = 5;

    while ((!cmd_head2.data) && i)
    {
        cmd_head2.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL);

        if (NULL != cmd_head2.data)
        {
            break;
        }

        i--;
    }

    if (i)
    {
        DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH;
        GTP_INFO("Applied memory size:%d.", DATA_LENGTH);
    }
    else
    {
        GTP_ERROR("Apply for memory failed.");
        return FAIL;
    }

    cmd_head2.addr_len = 2;
    cmd_head2.retry = 5;
	
    register_i2c_func();

    tool_set_proc_name(procname);
    goodix_proc_entry = proc_create(procname, 0660, 	NULL, &tool_ops);

    if (misc_register(&hotknot_misc_device))
    {
        printk("mtk_tpd: hotknot_device register failed\n");
        return FAIL;
    }
   
    if (goodix_proc_entry == NULL)
    {
        GTP_ERROR("Couldn't create proc entry!");
        return FAIL;
    }
    else
    {
        GTP_INFO("Create proc entry success!");
    }

    return SUCCESS;
}
开发者ID:rock12,项目名称:ALPS.L1.MP6.V2.19_CENON6580_WE_1_L_KERNEL,代码行数:91,代码来源:goodix_tool.c


注:本文中的GTP_INFO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。