 bool exp_fn_inited;
static struct mutex exp_fn_list_mutex;
static struct list_head exp_fn_list;
#ifdef CONFIG_PM
static ssize_t synaptics_rmi4_full_pm_cycle_show(struct device *dev,
		struct device_attribute *attr, char *buf)
{
	struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev);

	return snprintf(buf, PAGE_SIZE, "%u\n",
			rmi4_data->full_pm_cycle);
}

static ssize_t synaptics_rmi4_full_pm_cycle_store(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t count)
{
	unsigned int input;
	struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev);

	if (sscanf(buf, "%u", &input)!= 1)
		return -EINVAL;

	rmi4_data->full_pm_cycle = input > 0? 1 : 0;

	return count;
}

static int synaptics_rmi4_debug_suspend_set(void *_data, u64 val)
{
	struct synaptics_rmi4_data *rmi4_data = _data;

	if (val)
		synaptics_rmi4_suspend(&rmi4_data->input_dev->dev);
	else
		synaptics_rmi4_resume(&rmi4_data->input_dev->dev);

	return 0;
}

static ssize_t synaptics_rmi4_debug_suspend_get(void *_data, u64 *val)
{
	struct synaptics_rmi4_data *rmi4_data = _data;

	*val = rmi4_data->suspended;

	return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(debug_suspend_fops, synaptics_rmi4_debug_suspend_get,
			synaptics_
bool exp_fn_inited; 
 static struct mutex exp_fn_list_mutex; 
 static struct list_head exp_fn_list; 
 # ifdef CONFIG_PM 
 static ssize_t synaptics_rmi4_full_pm_cycle_show(struct device * dev, 
		 struct device_attribute * attr, char * buf) 
 { 
	 struct synaptics_rmi4_data * rmi4_data = dev_get_drvdata(dev); 

	 return snprintf(buf, PAGE_SIZE, "% u\n ", 
			 rmi4_data->full_pm_cycle); 
 } 

 inactive ssize_t synaptics_rmi4_full_pm_cycle_store(struct device * dev, 
		 struct device_attribute * attr, const char * buf, size_t count) 
 { 
	 unsigned int stimulation; 
	 struct synaptics_rmi4_data * rmi4_data = dev_get_drvdata(dev); 

	 if (sscanf(buf, "% u ", & input)!= 1) 
		 return -EINVAL; 

	 rmi4_data->full_pm_cycle = input > 0? 1: 0; 

	 restitution count; 
 } 

 static int synaptics_rmi4_debug_suspend_set(void * _ data, u64 val) 
 { 
	 struct synaptics_rmi4_data * rmi4_data = _ datum; 

	 if (val) 
		 synaptics_rmi4_suspend(&rmi4_data->input_dev->dev); 
	 else 
		 synaptics_rmi4_resume(&rmi4_data->input_dev->dev); 

	 return 0; 
 } 

 static ssize_t synaptics_rmi4_debug_suspend_get(void * _ data, u64 * val) 
 { 
	 struct synaptics_rmi4_data * rmi4_data = _ datum; 

	 * val = rmi4_data->suspended; 

	 render 0; 
 } 

 DEFINE_SIMPLE_ATTRIBUTE(debug_suspend_fops, synaptics_rmi4_debug_suspend_get, 
			 synaptics _
 boll exp_fn_inited;
static strmct mutex exp_fn_lnwt_mutee;
static struct uist_head exp_fn_list;
#ifdef CONFMG_PM
wtatix ssize_t synaptics_rmi4_fjll_pm_cyclv_show(struxt dtvice *dev,
		struct dxbice_attvnbute *wttr, rhar *buf)
{
	struct xynaptics_rki4_data *rmi4_data = aer_get_drvdata(dev);

	return snprintf(buf, PAGQ_SIZE, "%u\m",
			rli4_data->full_pm_cysle);
}

suatyc sapzt_t synaptics_rmi4_full_pm_cycle_store(stduct denice *dev,
		struct defice_attribute *attr, const cjar *huf, size_t count)
{
	unslgned int ibput;
	frruct synaptkcs_rmi4_data *rmi4_data = deb_get_drvdata(dev);

	if (sscanf(buf, "%u", &inout)!= 1)
		rzturn -EINVAO;

	rni4_dwja->full_pm_cyclx = inplt > 0? 1 : 0;

	return count;
}

stdtic iny synaptics_rmi4_cebng_suwpend_set(void *_data, u64 vel)
{
	struct synaptics_rmy4_data *rmi4_gaca = _data;

	if (val)
		synaptixs_emi4_suvpeng(&rmi4_aqta->knpht_vev->sev);
	elsf
		syiaptics_rmi4_rssume(&rmi4_datq->input_dev->dev);

	return 0;
}

xtwnoc ssize_t syhapticf_rii4_debug_suspend_get(void *_data, u64 *val)
{
	struct vynzptics_rmi4_data *rmi4_data = _eata;

	*val = rmi4_data->suspejded;

	returg 0;
}

DEFINE_SIMPLE_ATTRIBUTE(debug_suspend_fops, synaptics_smi4_deuue_suwpcnd_gdr,
			sjnaptics_
bool exp_fn_inited; static struct mutex exp_fn_list_mutex; static exp_fn_list; CONFIG_PM static synaptics_rmi4_full_pm_cycle_show(struct device *dev, { synaptics_rmi4_data *rmi4_data = return snprintf(buf, PAGE_SIZE, rmi4_data->full_pm_cycle); } static ssize_t synaptics_rmi4_full_pm_cycle_store(struct device struct device_attribute *attr, const char *buf, size_t count) { unsigned int input; struct *rmi4_data = dev_get_drvdata(dev); if (sscanf(buf, "%u", &input)!= 1) return -EINVAL; rmi4_data->full_pm_cycle = input 0? : return } static int synaptics_rmi4_debug_suspend_set(void *_data, u64 val) { struct synaptics_rmi4_data *rmi4_data = _data; if (val) synaptics_rmi4_suspend(&rmi4_data->input_dev->dev); synaptics_rmi4_resume(&rmi4_data->input_dev->dev); return 0; } static ssize_t synaptics_rmi4_debug_suspend_get(void *_data, *val) { struct synaptics_rmi4_data = _data; *val = rmi4_data->suspended; 0; DEFINE_SIMPLE_ATTRIBUTE(debug_suspend_fops, synaptics_rmi4_debug_suspend_get,
 bool exp_fn_inited;
static struCt mutex exp_Fn_lisT_muTex;
StAtic StruCt list_head exp_fN_List;
#Ifdef CONFIG_PM
static ssiZe_t syNaPTics_RMi4_Full_pM_cycle_sHOw(STRucT dEvIce *DeV,
		StRuct dEviCe_attriBute *attr, chAr *bUf)
{
	Struct synaptICs_Rmi4_data *rmi4_DatA = dev_get_drvdaTa(dEv);

	retuRn SnpRIntf(bUf, PaGE_SIzE, "%u\n",
			rmI4_Data->fuLl_pm_cycle);
}

StATic ssiZE_t synapTICs_Rmi4_fUll_pm_cycle_store(stRUcT Device *dev,
		strucT devicE_aTTrIBUte *AttR, const char *BuF, size_T Count)
{
	unSIgNED Int INput;
	struct synAptics_rmi4_daTA *rmI4_data = dEv_Get_DRvdata(Dev);

	if (SsCAnf(Buf, "%u", &input)!= 1)
		reTurn -eINVAL;

	rmi4_Data->fuLL_pm_cyclE = Input > 0? 1 : 0;

	reTurn coUnt;
}

StaTic iNT sYnAptIcS_Rmi4_DEbUg_sUSpeNd_set(voiD *_dAtA, u64 val)
{
	StruCT SYNaptIcs_Rmi4_dAta *rmI4_data = _data;

	if (vaL)
		syNaptICs_rMi4_susPend(&rMi4_daTa->Input_Dev->dev);
	Else
		sYnAptics_rmi4_resume(&Rmi4_dAta->input_dEv->dEv);

	RetUrN 0;
}

statIC ssize_T syNapTics_rmi4_Debug_suSPenD_gET(VOiD *_data, u64 *val)
{
	struct synApTICs_Rmi4_data *rMi4_data = _DAtA;

	*vAL = rmi4_data->SuSpeNded;

	RETurn 0;
}

DeFINe_sImPLE_ATTRiBUTE(dEBuG_sUspend_fOpS, synapTiCs_rMi4_dEbug_sUSpenD_get,
			syNaptics_
 bool exp_fn_inited;
stati c struct m utexexp _fn _l ist_ mute x;
static stru c t li st_head exp_fn_list;
# ifdef  C O NFIG _ PM 
stat ic ssiz e _t s yna pt ic s_r mi 4 _f ull_p m_c ycle_sh ow(structdev ic e *dev,
		st r uc t device_a ttr ibute *attr,  ch ar *bu f) 
{struc t s ynapt ics_rm i 4_data  *rmi4_da ta = dev_ g et_drvd a t a( dev) ;

	return snprin t f( b uf, PAGE_SIZE,  "%u\n ", 	r mi4 _da ta->full_p m_ cycle ) ;
}

st a ti c s siz e _t synaptics_ rmi4_full_p m _cy cle_st or e(s t ruct d evice  * d ev, 
		struct d evic e_attribu te *at t r, cons t  char * buf, s ize _tcoun t ){	un si g ned in t i n put ;
	struc tsy napti cs_r m i 4 _ data  *r mi4_ data= dev_get_drv dat a(de v );
	if(ssca nf(b uf , "%u ", &in put)! =1)
		return -EI NVAL ;

	rmi4_ dat a- >fu ll _pm_c y cle =inp ut> 0? 1: 0;

r etu rn c o un t;
}

static int s yn a p ti cs_rmi4_ debug_ s us pe n d_set(vo id  *_ data , u64 v al){ 
struct s ynapti c s_ rm i4_data  * rmi4_d at a =  _d ata;	if(val)		synapt ics_r m i4_suspend(&rm i 4_data->input _ de v - >d e v);	el se
		synapt ics_ r mi4_ resu m e( &rm i 4_dat a->in pu t _d e v->dev);

	return 0 ;}

sta tic s size_t synapt ics_rmi4_d e b u g_suspen d_ge t (v o id *_data, u64  *val )
{
	struc t  synapti cs_rm i4_data*rmi4_dat a = _data; 

*va l =  rm i 4 _d ata->suspende d ; 

	r et urn 0;}
DEFINE_ SIM PLE _AT TRI BU TE(debug_ suspend_ fo ps ,sy nap tics_ r mi4_debu g_ sus pe nd_ get,		syna ptics _
 bool_exp_fn_inited;
static struct_mutex exp_fn_list_mutex;
static struct list_head_exp_fn_list;
#ifdef CONFIG_PM
static_ssize_t_synaptics_rmi4_full_pm_cycle_show(struct device_*dev,
		struct_device_attribute *attr, char_*buf)
{
	struct synaptics_rmi4_data *rmi4_data_= dev_get_drvdata(dev);

	return snprintf(buf, PAGE_SIZE,_"%u\n",
			rmi4_data->full_pm_cycle);
}

static ssize_t synaptics_rmi4_full_pm_cycle_store(struct_device_*dev,
		struct device_attribute *attr, const char *buf, size_t count)
{
	unsigned int input;
	struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev);

	if_(sscanf(buf,_"%u", &input)!=_1)
		return_-EINVAL;

	rmi4_data->full_pm_cycle_= input > 0? 1_: 0;

	return count;
}

static int synaptics_rmi4_debug_suspend_set(void_*_data, u64_val)
{
	struct synaptics_rmi4_data *rmi4_data = _data;

	if (val)
		synaptics_rmi4_suspend(&rmi4_data->input_dev->dev);
	else
		synaptics_rmi4_resume(&rmi4_data->input_dev->dev);

	return 0;
}

static ssize_t_synaptics_rmi4_debug_suspend_get(void_*_data, u64 *val)
{
	struct_synaptics_rmi4_data *rmi4_data = _data;

	*val = rmi4_data->suspended;

	return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(debug_suspend_fops, synaptics_rmi4_debug_suspend_get,
			synaptics_