static int act8846_suspend(struct i2c_client *i2c, pm_message_t mesg) { /****add by nition at 20130527 s********************/ #if 0 int ret,k=10; u16 val = 0;//add by nition struct act8846 *act8846 = g_act8846; // ret = act8846_set_bits(act8846, 0xe4,(0x1<<7),(0x0<<7)); val=0xf; ret = act8846_i2c_write(act8846->i2c, 0xe4, 1, val); printk("act8846_i2c_write ret =%d ***********sleep\n",ret); while(ret<0){ ret = act8846_i2c_write(act8846->i2c, 0xe4, 1, val); if(ret>0)break; k--; if(k<0){ printk("act8846_i2c_write error -----sleep nition\n"); break;} } act8846_i2c_read(act8846->i2c, 0xe4, 1, &val); printk("act8846_suspend 0xe4 = %d******************nition\n",val); #endif /****add by nition at 20130527 e********************/ act8846_device_suspend(); return 0; }
static int act8846_suspend(struct device *dev) { act8846_device_suspend(); return 0; }
static int act8846_suspend(struct i2c_client *i2c, pm_message_t mesg) { act8846_device_suspend(); return 0; }