int mxt_config_settings(struct mxt_data *mxt)
{
	pr_info("[TSP] mxt_config_settings");


	if (mxt_userdata_config(mxt) < 0)		/* T38 */
		return -1;

	if (mxt_power_config(mxt) < 0)             /* T7 */
		return -1;

	if (mxt_acquisition_config(mxt) < 0)      /* T8 */
		return -1;

	if (mxt_multitouch_config(mxt) < 0)       /* T9 */
		return -1;

	/*--------------------------------------------------------------------*/
	if (mxt_keyarray_config(mxt) < 0)         /* T15 */
		return -1;

	if (mxt_comc_config(mxt) < 0)             /* T18 */
		return -1;

	if (mxt_gpio_pwm_config(mxt) < 0)         /* T19 */
		return -1;

	if (mxt_proximity_config(mxt) < 0)        /* T23 */
		return -1;

	if (mxt_selftest_config(mxt) < 0)              /* T25 */
		return -1;

	if (mxt_gripsuppression_config < 0)            /* T40 */
		return -1;
	/*-------------------------------------------------------------------*/

	if (mxt_touch_suppression_t42_config(mxt) < 0) /* T42 */
		return -1;

	if (mxt_cte_t46_config(mxt) < 0)               /* T46 */
		return -1;

	if (mxt_stylus_t47_config(mxt) < 0)            /* T47 */
		return -1;

	if (mxt_noisesuppression_t48_config(mxt) < 0)  /* T48 */
		return -1;
	return 0;
}
예제 #2
0
int mxt_config_settings(struct mxt_data *mxt)
	{
		
		int retryCount = 0;
		
			printk(KERN_DEBUG "[TSP] %s\n", __func__);
		
			
		retry_1:
			if (mxt_power_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_power_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_power_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_1;
					
				}
		
			
		retryCount = 0; 
		retry_2:
			if (mxt_acquisition_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_acquisition_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_acquisition_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_2;
					
				}
		
		
		retryCount = 0;
		retry_3:
			if (mxt_multitouch_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_multitouch_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_multitouch_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_3;
					
				}
			
		
		retryCount = 0;
			retry_4:
			if (mxt_noise_suppression_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_noise_suppression_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_noise_suppression_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_4;
					
				}
		
		retryCount = 0;
			retry_5:
			if (mxt_cte_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_cte_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_cte_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_5;
					
				}
		
		retryCount = 0;
			retry_6:
			if (mxt_gripsuppression_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_gripsuppression_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_gripsuppression_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_6;
					
				}
		
		retryCount = 0;
			retry_7:
			if (mxt_palmsuppression_config(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_palmsuppression_config FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_palmsuppression_config ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_7;
					
				}
			
		
		retryCount = 0;
			retry_8:
			if (mxt_other_configs(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] mxt_other_configs FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] mxt_other_configs ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_8;
					
				}
		
		
			/* backup to nv memory */
		//	backup_to_nv(mxt);
		
		////////
		
			
		retryCount = 0; 
			retry_9:
		
			if (backup_to_nv(mxt) < 0)
				{
				printk(KERN_DEBUG "[TSP] backup_to_nv FAILED\n");
				retryCount++;
				if(retryCount > 3 )
					{
					printk(KERN_DEBUG "[TSP] backup_to_nv ALL RETRY FAILED\n");
				 return -1;
					}
				else
					goto retry_9;
					
				}
		
		
		////////////
			/* forces a reset of the chipset */
			reset_chip(mxt, RESET_TO_NORMAL);
			msleep(250); /*mxt1386 need 250ms*/
		
			return 0;
		}