/* This function is used to initialize touch sensor.  */
int tls_touchsensor_init_config(u32 sensorno, u8 scan_period, u8 window, u32 enable)
/* This function is used to initialize touch sensor.  */
int tls_touchsensor_init_config(u32 sensorno, u8 scan_period, u8 window, u32 enable)
{
	u32 regval = 0;
	regval = tls_reg_read32(HR_TC_CONFIG);
	if (scan_period >=0x3F)
	{
		regval &= ~(0x3F<<SCAN_PERID_SHIFT_BIT);
		regval |= (scan_period<<SCAN_PERID_SHIFT_BIT);
	}
	if (window)
	{
		regval &= ~(0x3F<<CAPDET_CNT_SHIFT_BIT);
		regval |= (window<<CAPDET_CNT_SHIFT_BIT);
	}
	if (sensorno && (sensorno <= 15))
	{
		regval |= (1<<(sensorno-1+TOUCH_SENSOR_SEL_SHIFT_BIT));
	}
	if (enable)
	{
		regval |= (1<<TOUCH_SENSOR_EN_BIT);
	}
	tls_reg_write32(HR_TC_CONFIG,regval);
	return 0;
}