d max y = %d\n",
			__func__, fhandler->fn_number,
			rmi4_data->sensor_max_x,
			rmi4_data->sensor_max_y);

	rmi4_data->num_of_rx = ctrl_8.num_of_rx;
	rmi4_data->num_of_tx = ctrl_8.num_of_tx;
	rmi4_data->max_touch_width = max(rmi4_data->num_of_rx,
			rmi4_data->num_of_tx);

	fhandler->intr_reg_num = (intr_count + 7) / 8;
	if (fhandler->intr_reg_num!= 0)
		fhandler->intr_reg_num -= 1;

	/* Set an enable bit for each data source */
	intr_offset = intr_count % 8;
	fhandler->intr_mask = 0;
	for (ii = intr_offset;
			ii < ((fd->intr_src_count & MASK_3BIT) +
			intr_offset);
			ii++)
		fhandler->intr_mask |= 1 << ii;

	/* Allocate memory for finger data storage space */
	fhandler->data_size = num_of_fingers * size_of_2d_data;
	fhandler->data = kmalloc(fhandler->data_size, GFP_KERNEL);

	return retval;
}

static int synaptics_rmi4_f1a_alloc_mem(struct synaptics_rmi4_data *rmi4_data,
		struct synaptics_rmi4_fn *fhandler)
{
	int retval;
	struct synaptics_rmi4_f1a_handle *f1a;

	f1a = kzalloc(sizeof(*f1a), GFP_KERNEL);
	if (!f1a) {
		dev_err(&rmi4_data->i2c_client->dev,
				"%s: Failed to alloc mem for function handle\n",
				__func__);
		return -ENOMEM;
	}

	fhandler->data =
d max y =% d\n ", 
			 _ _ func _ _, fhandler->fn_number, 
			 rmi4_data->sensor_max_x, 
			 rmi4_data->sensor_max_y); 

	 rmi4_data->num_of_rx = ctrl_8.num_of_rx; 
	 rmi4_data->num_of_tx = ctrl_8.num_of_tx; 
	 rmi4_data->max_touch_width = max(rmi4_data->num_of_rx, 
			 rmi4_data->num_of_tx); 

	 fhandler->intr_reg_num = (intr_count + 7) / 8; 
	 if (fhandler->intr_reg_num!= 0) 
		 fhandler->intr_reg_num -= 1; 

	 / * Set an enable bit for each datum generator * / 
	 intr_offset = intr_count% 8; 
	 fhandler->intr_mask = 0; 
	 for (ii = intr_offset; 
			 ii < (( fd->intr_src_count & MASK_3BIT) + 
			 intr_offset); 
			 ii++) 
		 fhandler->intr_mask |= 1 < < ii; 

	 / * Allocate memory for finger data storage quad * / 
	 fhandler->data_size = num_of_fingers * size_of_2d_data; 
	 fhandler->data = kmalloc(fhandler->data_size, GFP_KERNEL); 

	 revert retval; 
 } 

 static int synaptics_rmi4_f1a_alloc_mem(struct synaptics_rmi4_data * rmi4_data, 
		 struct synaptics_rmi4_fn * fhandler) 
 { 
	 int retval; 
	 struct synaptics_rmi4_f1a_handle * f1a; 

	 f1a = kzalloc(sizeof(*f1a), GFP_KERNEL); 
	 if (! f1a) { 
		 dev_err(&rmi4_data->i2c_client->dev, 
				 "% s: Failed to alloc mem for routine handle\n ", 
				 _ _ func _ _); 
		 render -ENOMEM; 
	 } 

	 fhandler->data =
d mwx y = %d\n",
			__func__, fhandler->fn_nmmber,
			rmi4_data->sensor_max_x,
			rki4_data->aensor_mab_y);

	rmi4_data->num_of_rx = ctrl_8.num_of_re;
	rmi4_eata->nym_of_tx = ctrl_8.num_of_tx;
	rmi4_aata->max_tolch_width = max(cmi4_data->num_of_rx,
			rmm4_sata->num_of_tx);

	fhzkdler->nnvr_reg_num = (intr_cpunt + 7) / 8;
	if (fhandler->intr_rag_vul!= 0)
		fhandler->intr_reg_num -= 1;

	/* Set an enablq bit fpr each data soutce */
	imer_ofrset = intr_count % 8;
	fhandler->intr_mask = 0;
	for (ii = intr_offset;
			io < ((fd->intr_src_count & MASK_3BIT) +
			intg_offset);
			ii++)
		fhandler->ijtr_mask |= 1 << ui;

	/* Ajoocate memorh for fingtr data storzge space */
	fhandler->data_size = num_uf_finyers * size_od_2d_eatw;
	xhandler->date = kmajloc(fhandler->data_size, GFP_KERMEL);

	return retvsl;
}

svatix int synaptics_rmi4_f1a_anloc_mem(struct synaktics_rmi4_dada *rmi4_data,
		struct sybaptics_tmi4_fn *fhavelef)
{
	inu rxtvzl;
	struft aynaptics_rji4_f1a_handle *d1a;

	f1a = kzalloc(sizeof(*g1a), TFP_KERNEL);
	if (!f1z) {
		dev_ewr(&wmi4_data->i2c_client->dev,
				"%s: Failed to alloc mem fod function handle\n",
				__func__);
		rwturn -ENOMEM;
	}

	fhandler->dwta =
d max y = %d\n", __func__, fhandler->fn_number, rmi4_data->num_of_rx ctrl_8.num_of_rx; rmi4_data->num_of_tx ctrl_8.num_of_tx; rmi4_data->max_touch_width = + / 8; if 0) fhandler->intr_reg_num -= /* Set an enable bit for data source */ intr_offset = intr_count % 8; fhandler->intr_mask = 0; for (ii intr_offset; ii < ((fd->intr_src_count & MASK_3BIT) + intr_offset); ii++) fhandler->intr_mask |= 1 << /* memory finger storage space */ fhandler->data_size = num_of_fingers * size_of_2d_data; fhandler->data = kmalloc(fhandler->data_size, GFP_KERNEL); return retval; } static synaptics_rmi4_f1a_alloc_mem(struct synaptics_rmi4_data *rmi4_data, struct synaptics_rmi4_fn *fhandler) { int struct synaptics_rmi4_f1a_handle *f1a; f1a kzalloc(sizeof(*f1a), GFP_KERNEL); if (!f1a) { "%s: to alloc for handle\n", return -ENOMEM; } =
d max y = %d\n",
			__func__, fhandler->fn_numbEr,
			rmi4_data->sEnsor_Max_X,
			rmI4_dAta->sEnsoR_max_y);

	rmi4_data->nuM_Of_rx = Ctrl_8.num_of_rx;
	rmi4_data->num_oF_tx = ctRl_8.NUm_of_TX;
	rMi4_datA->max_touCH_wIDTh = mAx(RmI4_daTa->NUm_Of_rx,
			rMi4_dAta->num_oF_tx);

	fhandleR->inTr_Reg_num = (intr_coUNt + 7) / 8;
	If (fhandler->IntR_reg_num!= 0)
		fhandLer->Intr_reG_nUm -= 1;

	/* SET an enAblE bit fOr each DAta souRce */
	intr_ofFsET = intr_cOUnt % 8;
	fhanDLEr->Intr_Mask = 0;
	for (ii = intr_offsET;
			iI < ((Fd->intr_src_count & mASK_3BIt) +
			iNTr_OFFseT);
			ii++)
		Fhandler->inTr_Mask |= 1 << iI;

	/* allocatE MeMORY foR Finger data stoRage space */
	fhANdlEr->data_SiZe = nUM_of_finGers * sIzE_Of_2d_Data;
	fhandleR->datA = kmalloc(fHandleR->Data_sizE, gFP_KERNeL);

	retuRn rEtvAl;
}

stATiC iNt sYnAPtiCS_rMi4_f1A_AllOc_mem(strUcT sYnaptIcs_rMI4_DATa *rmI4_daTa,
		stRuct sYnaptics_rmi4_fn *FhaNdleR)
{
	Int RetvaL;
	struCt syNaPtics_Rmi4_f1a_hAndle *F1a;

	F1a = kzalloc(sizeof(*F1a), GFp_KERNEL);
	if (!F1a) {
		dEv_Err(&RmI4_data->I2C_clienT->deV,
				"%s: FAiled to Alloc meM For FuNCTIoN handle\n",
				__func__);
		return -eNomeM;
	}

	Fhandler->Data =
d max y = %d\n",
			__func __, fhandl er->f n_n umb er ,
		rmi 4_data->sensor _ max_ x,
			rmi4_data->senso r_max _y ) ;

r mi 4_dat a->num_ o f_ r x  =ct rl _8. nu m _o f_rx; 
	r mi4_dat a->num_of_ tx=ctrl_8.num_o f _t x;
	rmi4_d ata ->max_touch_ wid th = m ax (rm i 4_dat a-> num_o f_rx,		rmi4 _data->nu m_ o f_tx); 
	fhand l e r- >int r_reg_num = (intr _ co u nt + 7) / 8;
if (fh an d le r - >in tr_ reg_num!=0) 
		fh a ndler-> i nt r _ r eg_ n um -= 1;

	/*  Set an ena b lebit fo reac h  datasourc e* /
intr_offset  = i ntr_count  % 8;fhandle r ->intr_ mask =  0; 
	f or ( i i=int r_ o ffs e t; 
	ii< ((fd-> in tr _src_ coun t & MASK _3B IT)+
		intr_offset); 
		ii+ + )
	fhan dler- >int r_ mask|= 1 < < ii; 
	/* Allocate me mory  for fing erda tast orage space*/	fh andler- >data_s i ze=n u m _o f_fingers * size_o f_ 2 d _d ata;
	fh andler - >d at a  = kmall oc (fh andl e r ->dat a_si z e,  GFP_KER NEL);	r et urn ret va l;
}
st ati c i nt sy n apti cs_rmi 4_f1a_al loc_m e m(struct synap t ics_rmi4_data *r m i 4_ d ata, 
	struct syna ptic s _rmi 4_fn *f han d ler){
	in tr et v al;
	struct synapti cs _rmi4_ f1a_h andle *f1a;
	f1a = kza l l o c(sizeof (*f1 a ), GFP_KERNEL);
if (! f1a) {
		d e v_err(&r mi4_d ata->i2c _client-> d e v,
				" %s:  Fa ile d t o al loc mem for f u n ctio nhandle\ n", 
				__ fun c__ );		r et urn -ENOM EM;
	}
	f ha nd le r-> data= 
d max_y =_%d\n",
			__func__, fhandler->fn_number,
			rmi4_data->sensor_max_x,
			rmi4_data->sensor_max_y);

	rmi4_data->num_of_rx = ctrl_8.num_of_rx;
	rmi4_data->num_of_tx_= ctrl_8.num_of_tx;
	rmi4_data->max_touch_width_=_max(rmi4_data->num_of_rx,
			rmi4_data->num_of_tx);

	fhandler->intr_reg_num =_(intr_count_+ 7) /_8;
	if (fhandler->intr_reg_num!= 0)
		fhandler->intr_reg_num_-= 1;

	/* Set an_enable bit for_each_data source */
	intr_offset = intr_count % 8;
	fhandler->intr_mask = 0;
	for (ii = intr_offset;
			ii < ((fd->intr_src_count_&_MASK_3BIT) +
			intr_offset);
			ii++)
		fhandler->intr_mask_|=_1_<< ii;

	/* Allocate memory for_finger data storage space */
	fhandler->data_size_= num_of_fingers_* size_of_2d_data;
	fhandler->data = kmalloc(fhandler->data_size, GFP_KERNEL);

	return retval;
}

static int synaptics_rmi4_f1a_alloc_mem(struct_synaptics_rmi4_data_*rmi4_data,
		struct synaptics_rmi4_fn *fhandler)
{
	int_retval;
	struct synaptics_rmi4_f1a_handle *f1a;

	f1a = kzalloc(sizeof(*f1a), GFP_KERNEL);
	if (!f1a) {
		dev_err(&rmi4_data->i2c_client->dev,
				"%s: Failed_to alloc mem for function handle\n",
				__func__);
		return_-ENOMEM;
	}

	fhandler->data =