Example #1
0
static int mma7660_close(struct i2c_client *client)
{
    struct mma7660_data *mma7660 = (struct mma7660_data *)i2c_get_clientdata(client);
    
    mma7660->status = MMA7660_CLOSE;
    
    return mma7660_close_dev(client);
}
Example #2
0
static int mma7660_suspend(struct i2c_client *client, pm_message_t mesg)
{
	WPRINTK("Gsensor mma7760 enter 2 level  suspend\n");
	struct mma7660_data *mma7660  =  i2c_get_clientdata(client);
	hrtimer_cancel(&mma7660->timer);
	return mma7660_close_dev(client);
	
}
Example #3
0
static int mma7660_early_suspend(struct early_suspend *h)
{
	struct i2c_client *client = container_of(mma7660_device.parent, struct i2c_client, dev);
	WPRINTK("Gsensor mma7760 enter early suspend\n");
	struct mma7660_data *mma7660  =  i2c_get_clientdata(client);
	hrtimer_cancel(&mma7660->timer);
	return mma7660_close_dev(client);
}
Example #4
0
/*
*ϵͳʹ�õĹ�����������:
*	 FASTEST(0), GAME(20), UI(60), NORMAL(200)
*/
static int mma7660_reset_rate(struct i2c_client *client, char rate)
{
	int ret = 0;

	ret = mma7660_close_dev(client);
	ret = mma7660_start_dev(client, rate);
    
	return ret ;
}
Example #5
0
static int mma7660_reset_rate(struct i2c_client *client, char rate)
{
	int ret = 0;
	
	mmaprintk("\n----------------------------mma7660_reset_rate------------------------\n");
	
    ret = mma7660_close_dev(client);
    ret = mma7660_start_dev(client, rate);
    
	return ret ;
}
Example #6
0
static int mma7660_suspend(struct i2c_client *client, pm_message_t mesg)
{
	rk28printk("Gsensor mma7760 enter 2 level  suspend\n");
	return mma7660_close_dev(client);
}
Example #7
0
static void mma7660_suspend(struct early_suspend *h)
{
	struct i2c_client *client = container_of(mma7660_device.parent, struct i2c_client, dev);
	rk28printk("Gsensor mma7760 enter suspend\n");
	mma7660_close_dev(client);
}
Example #8
0
static int mma7660_suspend(android_early_suspend_t *h)
{
	struct i2c_client *client = container_of(mma7660_device.parent, struct i2c_client, dev);
	rk28printk("Gsensor mma7760 enter suspend\n");
	return mma7660_close_dev(client);
}