int lis_dsm_excep_init(struct lis3dh_acc_data  *acc)
{
	int i = 0,ret = 0;

	ret = register_lis3dh_dsm_operations(acc);
	if(ret < 0)
		goto err_unregister_dsm;

	lis_init_exception_timer(acc);

	for (i = 0; i < ARRAY_SIZE(dbg_attributes); i++) {
		ret = device_create_file(&acc->client->dev, dbg_attributes + i);
		if (ret)
			goto error_device_create;
	}

	acc->dsm_buf = kzalloc(DSM_SENSOR_BUF_COM,GFP_KERNEL);
	if(!acc->dsm_buf){
		pr_err("[lis3dh_err]failed to alloc space for dsm_buf");
		ret = -ENOMEM;
	}
	return ret;

error_device_create:
	for (; i >= 0; i--)
		device_remove_file(&acc->client->dev, dbg_attributes + i);

	pr_err("[lis3dh_err]%s:Unable to create interface\n", __func__);
err_unregister_dsm:
	dsm_unregister_client(lis3dh_gs_dclient,&dsm_gs_lis_i2c);

	return ret;

}
void lis_dsm_excep_exit(struct lis3dh_acc_data  *acc)
{
	int i = 0;

	kfree(acc->dsm_buf);
	acc->dsm_buf = NULL;

	for (i = 0; i < ARRAY_SIZE(dbg_attributes); i++) {
		device_remove_file(&acc->client->dev, dbg_attributes + i);
	}

	dsm_unregister_client(lis3dh_gs_dclient,&dsm_gs_lis_i2c);

	lis_exit_excep_timer(acc);

	pr_info("[lis3dh_info]unregister lis3dh dsm_client.\n");
}
/*****************************************************************
Parameters    :  client
                 i2c_id
Return        :    
Description   :  call cyttsp5_probe in cyttsp5_core.c
*****************************************************************/
static int cyttsp5_i2c_probe(struct i2c_client *client,
	const struct i2c_device_id *i2c_id)
{
	struct device *dev = &client->dev;
#ifdef CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT
	const struct of_device_id *match = NULL;
#endif
	int rc = 0;

	if(already_has_tp_driver_running()) {
		tp_log_warning("%s:  Another tp driver is running!\n",__func__);
		return 0;
	}

	tp_log_warning("%s %d:Probe start\n", __func__, __LINE__);
	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
		tp_log_err("%s %d:I2C functionality not Supported.\n", __func__, __LINE__);
		return -EIO;
	}

/* if support device tree, get pdata from device tree */
#ifdef CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT
	match = of_match_device(of_match_ptr(cyttsp5_i2c_of_match), dev);
	if (match) {
		rc = cyttsp5_devtree_create_and_get_pdata(dev);
		if (rc < 0) {
			tp_log_err("%s %d:device tree create and get pdata fail, rc = %d.\n", 
						__func__, __LINE__, rc);
			return rc;
		}
	} else {
		tp_log_err("%s %d:No device mathced.\n", __func__, __LINE__);
		return -ENODEV;
	}
#endif

#ifdef CONFIG_HUAWEI_DSM
	tp_cyp_dclient = dsm_register_client(&dsm_cyp_tp);
	if (!tp_cyp_dclient)
		tp_log_err("%s: dsm register client failed\n", __func__);
#endif/*CONFIG_HUAWEI_DSM*/

	rc = cyttsp5_probe(&cyttsp5_i2c_bus_ops, &client->dev, client->irq,
			  CY_I2C_DATA_SIZE);

#ifdef CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT
	if (rc && match) {
		cyttsp5_devtree_clean_pdata(dev);
#ifdef CONFIG_HUAWEI_DSM
		if (tp_cyp_dclient) {
			dsm_unregister_client(tp_cyp_dclient, &dsm_cyp_tp);
			tp_cyp_dclient = NULL;
		}
#endif/*CONFIG_HUAWEI_DSM*/
		tp_log_err("%s %d:cyttsp5 probe fail.\n", __func__, __LINE__);
		return rc;
	}
#endif

	set_tp_driver_running();
	tp_log_info("%s %d:cyttsp5 probe success.\n", __func__, __LINE__);

	return rc;
}
static void __exit bluetooth_dsm_exit(void)
{
    dsm_unregister_client(bt_dclient,&dsm_bt);
}