您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ALSPS_LOG函数代码示例

51自学网 2021-06-01 19:34:54
  C++
这篇教程C++ ALSPS_LOG函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ALSPS_LOG函数的典型用法代码示例。如果您正苦于以下问题:C++ ALSPS_LOG函数的具体用法?C++ ALSPS_LOG怎么用?C++ ALSPS_LOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ALSPS_LOG函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ps_store_delay

static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr,                                  const char *buf, size_t count){    int delay=0;    int m_delay=0;    struct alsps_context *cxt = NULL;    mutex_lock(&alsps_context_obj->alsps_op_mutex);    cxt = alsps_context_obj;    if(NULL == cxt->ps_ctl.set_delay)    {        ALSPS_LOG("ps_ctl set_delay NULL/n");        mutex_unlock(&alsps_context_obj->alsps_op_mutex);         return count;    }    if (1 != sscanf(buf, "%d", &delay)) {        ALSPS_ERR("invalid format!!/n");        mutex_unlock(&alsps_context_obj->alsps_op_mutex);        return count;    }    if(false == cxt->ps_ctl.is_report_input_direct)    {        m_delay = (int)delay/1000/1000;        atomic_set(&alsps_context_obj->delay_ps, m_delay);    }    cxt->ps_ctl.set_delay(delay);    ALSPS_LOG(" ps_delay %d ns/n",delay);    mutex_unlock(&alsps_context_obj->alsps_op_mutex);    return count;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:33,


示例2: ps_store_active

static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr,                                  const char *buf, size_t count){    struct alsps_context *cxt = NULL;    //int err =0;    ALSPS_LOG("ps_store_active buf=%s/n",buf);    mutex_lock(&alsps_context_obj->alsps_op_mutex);    cxt = alsps_context_obj;    if (!strncmp(buf, "1", 1))    {          ps_enable_data(1);        }    else if (!strncmp(buf, "0", 1))    {       ps_enable_data(0);        }    else    {      ALSPS_ERR(" ps_store_active error !!/n");    }    mutex_unlock(&alsps_context_obj->alsps_op_mutex);    ALSPS_LOG(" ps_store_active done/n");    return count;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:25,


示例3: alsps_real_driver_init

static int alsps_real_driver_init(void){    int i =0;    int err=0;    ALSPS_LOG(" alsps_real_driver_init +/n");    for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++)    {      ALSPS_LOG("alsps_real_driver_init i=%d/n",i);      if(0 != alsps_init_list[i])      {        ALSPS_LOG(" alsps try to init driver %s/n", alsps_init_list[i]->name);        err = alsps_init_list[i]->init();        if(0 == err)        {           ALSPS_LOG(" alsps real driver %s probe ok/n", alsps_init_list[i]->name);           break;        }      }    }    if(i == MAX_CHOOSE_ALSPS_NUM)    {       ALSPS_LOG(" alsps_real_driver_init fail/n");       err=-1;    }    return err;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:27,


示例4: ps_store_batch

static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr,                                  const char *buf, size_t count){    struct alsps_context *cxt = NULL;    //int err =0;    ALSPS_LOG("ps_store_batch buf=%s/n",buf);    mutex_lock(&alsps_context_obj->alsps_op_mutex);    cxt = alsps_context_obj;    if(cxt->ps_ctl.is_support_batch){        if (!strncmp(buf, "1", 1))        {                cxt->is_ps_batch_enable = true;        }        else if (!strncmp(buf, "0", 1))        {            cxt->is_ps_batch_enable = false;            cxt->is_get_valid_ps_data_after_enable = false;        }        else        {            ALSPS_ERR(" ps_store_batch error !!/n");        }    }else{        ALSPS_LOG(" ps_store_batch not supported/n");    }    mutex_unlock(&alsps_context_obj->alsps_op_mutex);    ALSPS_LOG(" ps_store_batch done: %d/n", cxt->is_ps_batch_enable);    return count;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:30,


示例5: ps_show_delay

static ssize_t ps_show_delay(struct device* dev,                                 struct device_attribute *attr, char *buf){    int len = 0;    ALSPS_LOG("ps_show_delay func called");    ALSPS_LOG(" not support now/n");    return len;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:8,


示例6: ps_show_active

/*----------------------------------------------------------------------------*/static ssize_t ps_show_active(struct device* dev,                                 struct device_attribute *attr, char *buf){    struct alsps_context *cxt = NULL;    int div = 0;    cxt = alsps_context_obj;    div=cxt->ps_data.vender_div;    ALSPS_LOG("ps_show_active func called");    ALSPS_LOG("ps vender_div value: %d/n", div);    return snprintf(buf, PAGE_SIZE, "%d/n", div);}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:12,


示例7: alsps_probe

static int alsps_probe(struct platform_device *pdev){    int err;    ALSPS_LOG("alsps_probe func called");    ALSPS_LOG("+++++++++++++alsps_probe!!/n");    alsps_context_obj = alsps_context_alloc_object();    if (!alsps_context_obj)    {        err = -ENOMEM;        ALSPS_ERR("unable to allocate devobj!/n");        goto exit_alloc_data_failed;    }    //init real alspseleration driver    err = alsps_real_driver_init();    if(err)    {        ALSPS_ERR("alsps real driver init fail/n");        goto real_driver_init_fail;    }    //init input dev    err = alsps_input_init(alsps_context_obj);    if(err)    {        ALSPS_ERR("unable to register alsps input device!/n");        goto exit_alloc_input_dev_failed;    }        atomic_set(&(alsps_context_obj->early_suspend), 0);    alsps_context_obj->early_drv.level    = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1,    alsps_context_obj->early_drv.suspend  = alsps_early_suspend,    alsps_context_obj->early_drv.resume   = alsps_late_resume,    register_early_suspend(&alsps_context_obj->early_drv);    ALSPS_LOG("----alsps_probe OK !!/n");    return 0;    real_driver_init_fail:    exit_alloc_input_dev_failed:    kfree(alsps_context_obj);    exit_alloc_data_failed:    ALSPS_LOG("----alsps_probe fail !!!/n");    return err;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:52,


示例8: ps_enable_data

static int ps_enable_data(int enable){    struct alsps_context *cxt = NULL;    //int err =0;    cxt = alsps_context_obj;    ALSPS_LOG("ps_enable_data func called");    if(NULL  == cxt->ps_ctl.open_report_data)    {      ALSPS_ERR("no ps control path/n");      return -1;    }        if(1 == enable)        {           ALSPS_LOG("PS enable data/n");           cxt->is_ps_active_data =true;               cxt->is_ps_first_data_after_enable = true;           cxt->ps_ctl.open_report_data(1);           if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false)           {                  if(false == cxt->ps_ctl.is_report_input_direct)                  {                      mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ));                      cxt->is_ps_polling_run = true;                      cxt->is_get_valid_ps_data_after_enable = false;                  }           }        }    if(0 == enable)    {           ALSPS_LOG("PS disable /n");           cxt->is_ps_active_data =false;           cxt->ps_ctl.open_report_data(0);           if(true == cxt->is_ps_polling_run)           {                  if(false == cxt->ps_ctl.is_report_input_direct )                  {                      cxt->is_ps_polling_run = false;                      smp_mb();                      del_timer_sync(&cxt->timer_ps);                      smp_mb();                      cancel_work_sync(&cxt->report_ps);                cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE;                  }           }    }    ps_real_enable(enable);    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:49,


示例9: ps_register_data_path

int ps_register_data_path(struct ps_data_path *data){    struct alsps_context *cxt = NULL;//    int err =0;    cxt = alsps_context_obj;    cxt->ps_data.get_data = data->get_data;    cxt->ps_data.vender_div = data->vender_div;    ALSPS_LOG("alsps register data path vender_div: %d/n", cxt->ps_data.vender_div);    if(NULL == cxt->ps_data.get_data)    {        ALSPS_LOG("alsps register data path fail /n");         return -1;    }    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:15,


示例10: alsps_input_init

static int alsps_input_init(struct alsps_context *cxt){    struct input_dev *dev;    int err = 0;    ALSPS_LOG("alsps_input_init func called");    dev = input_allocate_device();    if (NULL == dev)        return -ENOMEM;    dev->name = ALSPS_INPUTDEV_NAME;    set_bit(EV_REL, dev->evbit);    set_bit(EV_SYN, dev->evbit);    input_set_capability(dev, EV_REL, EVENT_TYPE_PS_VALUE);    input_set_capability(dev, EV_REL, EVENT_TYPE_PS_STATUS);    input_set_capability(dev, EV_REL, EVENT_TYPE_ALS_VALUE);    input_set_capability(dev, EV_REL, EVENT_TYPE_ALS_STATUS);    input_set_drvdata(dev, cxt);    err = input_register_device(dev);    if (err < 0) {        input_free_device(dev);        return err;    }    cxt->idev= dev;    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:31,


示例11: alsps_driver_add

  int alsps_driver_add(struct alsps_init_info* obj){    int err=0;    int i =0;    ALSPS_FUN();    for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ )    {        if((i == 0) && (NULL == alsps_init_list[0])){            ALSPS_LOG("register alsps driver for the first time/n");            if(platform_driver_register(&als_ps_driver))            {                ALSPS_ERR("failed to register alsps driver already exist/n");            }        }        if(NULL == alsps_init_list[i])        {          obj->platform_diver_addr = &als_ps_driver;          alsps_init_list[i] = obj;          break;        }    }    if(NULL==alsps_init_list[i])    {       ALSPS_ERR("ALSPS driver add err /n");       err=-1;    }    return err;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:32,


示例12: ps_store_batch

static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr,                                  const char *buf, size_t count){	struct alsps_context *cxt = NULL;	//int err =0;	ALSPS_LOG("ps_store_batch buf=%s/n",buf);	mutex_lock(&alsps_context_obj->alsps_op_mutex);	cxt = alsps_context_obj;	if(cxt->ps_ctl.is_support_batch){	    	if (!strncmp(buf, "1", 1)) 		{	    		cxt->is_ps_batch_enable = true;                if(true == cxt->is_ps_polling_run)                {                    cxt->is_ps_polling_run = false;                    del_timer_sync(&cxt->timer_ps);                    cancel_work_sync(&cxt->report_ps);                    cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE;                    cxt->drv_data.ps_data.values[1] = ALSPS_INVALID_VALUE;                    cxt->drv_data.ps_data.values[2] = ALSPS_INVALID_VALUE;                }	    	} 		else if (!strncmp(buf, "0", 1))		{			cxt->is_ps_batch_enable = false;                if(false == cxt->is_ps_polling_run)                {                    if(false == cxt->ps_ctl.is_report_input_direct)                    {                        mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ));                        cxt->is_ps_polling_run = true;                        cxt->is_get_valid_ps_data_after_enable = false;                    }                }	    	}		else		{			ALSPS_ERR(" ps_store_batch error !!/n");		}	}else{		ALSPS_LOG(" ps_store_batch not supported/n");	}	mutex_unlock(&alsps_context_obj->alsps_op_mutex);	ALSPS_LOG(" ps_store_batch done: %d/n", cxt->is_ps_batch_enable);    return count;}
开发者ID:iuncuim,项目名称:A476_V1B_5.1_kernel,代码行数:47,


示例13: ps_show_devnum

static ssize_t ps_show_devnum(struct device* dev,                                 struct device_attribute *attr, char *buf){    const char *devname =NULL;    devname = dev_name(&alsps_context_obj->idev->dev);    ALSPS_LOG("ps_show_devnum");    return snprintf(buf, PAGE_SIZE, "%s/n", devname+5);}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:8,


示例14: ps_data_report

int ps_data_report(struct input_dev *dev, int value,int status){    ALSPS_LOG("ps_data_report func called");    //ALSPS_LOG("+ps_data_report! %d, %d/n",value,status);    input_report_rel(dev, EVENT_TYPE_PS_VALUE, (value+1));    input_report_rel(dev, EVENT_TYPE_PS_STATUS, status);    input_sync(dev);    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:9,


示例15: als_poll

static void als_poll(unsigned long data){    struct alsps_context *obj = (struct alsps_context *)data;    ALSPS_LOG("als_poll func called");    if((obj != NULL) && (obj->is_als_polling_run))    {        schedule_work(&obj->report_als);    }}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:9,


示例16: als_real_enable

static int als_real_enable(int enable){  int err =0;  struct alsps_context *cxt = NULL;  cxt = alsps_context_obj;  if(1==enable)  {          if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata)     {        err = cxt->als_ctl.enable_nodata(1);        if(err)        {            err = cxt->als_ctl.enable_nodata(1);		   if(err)		   {		   		err = cxt->als_ctl.enable_nodata(1);				if(err)					ALSPS_ERR("alsps enable(%d) err 3 timers = %d/n", enable, err);		   }        }		ALSPS_LOG("alsps real enable  /n" );     }	   }  if(0 == enable)  {     if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata)     {     	ALSPS_LOG("AAL status is %d/n", aal_use);     	if(aal_use == 0){	        err = cxt->als_ctl.enable_nodata(0);	        if(err)	        { 	          ALSPS_ERR("alsps enable(%d) err = %d/n", enable, err);	        }     	}		ALSPS_LOG("alsps real disable  /n" );     }	   }  return err;}
开发者ID:iuncuim,项目名称:A476_V1B_5.1_kernel,代码行数:44,


示例17: ps_poll

static void ps_poll(unsigned long data){    struct alsps_context *obj = (struct alsps_context *)data;    ALSPS_LOG("ps_poll func called");    if(obj != NULL)    {        //if(obj->ps_ctl.is_polling_mode)        schedule_work(&obj->report_ps);    }}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:10,


示例18: ps_store_flush

static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr,                                  const char *buf, size_t count){    ALSPS_LOG("ps_store_flush func called");    //mutex_lock(&alsps_context_obj->alsps_op_mutex);    //struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev);    //do read FIFO data function and report data immediately    //mutex_unlock(&alsps_context_obj->alsps_op_mutex);    return count;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:10,


示例19: ps_real_enable

static int ps_real_enable(int enable){  int err =0;  struct alsps_context *cxt = NULL;  cxt = alsps_context_obj;    ALSPS_LOG("ps_real_enable func called");  if(1==enable)  {     if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata)     {        err = cxt->ps_ctl.enable_nodata(1);        if(err)        {           err = cxt->ps_ctl.enable_nodata(1);           if(err)           {                   err = cxt->ps_ctl.enable_nodata(1);                if(err)                    ALSPS_ERR("ps enable(%d) err 3 timers = %d/n", enable, err);           }        }        ALSPS_LOG("ps real enable  /n" );     }  }  if(0==enable)  {     if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata)     {        err = cxt->ps_ctl.enable_nodata(0);        if(err)        {          ALSPS_ERR("ps enable(%d) err = %d/n", enable, err);        }        ALSPS_LOG("ps real disable  /n" );     }  }  return err;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:42,


示例20: als_register_control_path

int als_register_control_path(struct als_control_path *ctl){    struct alsps_context *cxt = NULL;    //int err =0;    cxt = alsps_context_obj;    cxt->als_ctl.set_delay = ctl->set_delay;    cxt->als_ctl.open_report_data= ctl->open_report_data;    cxt->als_ctl.enable_nodata = ctl->enable_nodata;    cxt->als_ctl.is_support_batch = ctl->is_support_batch;    cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct;    ALSPS_LOG("als_register_control_path func called");    if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data        || NULL==cxt->als_ctl.enable_nodata)    {        ALSPS_LOG("alsps register control path fail /n");         return -1;    }    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:21,


示例21: ps_register_control_path

int ps_register_control_path(struct ps_control_path *ctl){    struct alsps_context *cxt = NULL;    int err =0;    cxt = alsps_context_obj;    cxt->ps_ctl.set_delay = ctl->set_delay;    cxt->ps_ctl.open_report_data= ctl->open_report_data;    cxt->ps_ctl.enable_nodata = ctl->enable_nodata;    cxt->ps_ctl.is_support_batch = ctl->is_support_batch;    cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct;    ALSPS_LOG("ps_register_control_path func called");    if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data        || NULL==cxt->ps_ctl.enable_nodata)    {        ALSPS_LOG("ps register control path fail /n");         return -1;    }    //add misc dev for sensor hal control cmd    err = alsps_misc_init(alsps_context_obj);    if(err)    {       ALSPS_ERR("unable to register alsps misc device!!/n");       return -2;    }    err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj,            &alsps_attribute_group);    if (err < 0)    {       ALSPS_ERR("unable to create alsps attribute file/n");       return -3;    }    kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD);    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:39,


示例22: alsps_misc_init

static int alsps_misc_init(struct alsps_context *cxt){    int err=0;    cxt->mdev.minor = MISC_DYNAMIC_MINOR;    cxt->mdev.name  = ALSPS_MISC_DEV_NAME;    ALSPS_LOG("alsps_misc_init func called");    if((err = misc_register(&cxt->mdev)))    {        ALSPS_ERR("unable to register alsps misc device!!/n");    }    return err;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:13,


示例23: kzalloc

static struct alsps_context *alsps_context_alloc_object(void){    struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL);        ALSPS_LOG("alsps_context_alloc_object++++/n");    ALSPS_LOG("alsps_context func called");    if(!obj)    {        ALSPS_ERR("Alloc alsps object error!/n");        return NULL;    }    atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms    atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms    atomic_set(&obj->wake, 0);    INIT_WORK(&obj->report_als, als_work_func);    INIT_WORK(&obj->report_ps, ps_work_func);    init_timer(&obj->timer_als);    init_timer(&obj->timer_ps);    obj->timer_als.expires    = jiffies + atomic_read(&obj->delay_als)/(1000/HZ);    obj->timer_als.function    = als_poll;    obj->timer_als.data    = (unsigned long)obj;    obj->timer_ps.expires    = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ);    obj->timer_ps.function    = ps_poll;    obj->timer_ps.data    = (unsigned long)obj;    obj->is_als_first_data_after_enable = false;    obj->is_als_polling_run = false;    obj->is_ps_first_data_after_enable = false;    obj->is_ps_polling_run = false;    mutex_init(&obj->alsps_op_mutex);    obj->is_als_batch_enable = false;//for batch mode init    obj->is_ps_batch_enable = false;//for batch mode init    ALSPS_LOG("alsps_context_alloc_object----/n");    return obj;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:37,


示例24: alsps_remove

static int alsps_remove(struct platform_device *pdev){    int err=0;    ALSPS_LOG("alsps_remove func called");    ALSPS_FUN(f);    input_unregister_device(alsps_context_obj->idev);    sysfs_remove_group(&alsps_context_obj->idev->dev.kobj,                &alsps_attribute_group);    if((err = misc_deregister(&alsps_context_obj->mdev)))    {        ALSPS_ERR("misc_deregister fail: %d/n", err);    }    kfree(alsps_context_obj);    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:17,


示例25: ps_report_interrupt_data

int ps_report_interrupt_data(int value){    struct alsps_context *cxt = NULL;    //int err =0;    cxt = alsps_context_obj;    ALSPS_LOG("ps_report_interrupt_data");    if (cxt->is_get_valid_ps_data_after_enable == false)    {        if(ALSPS_INVALID_VALUE != value)        {            cxt->is_get_valid_ps_data_after_enable = true;            smp_mb();            del_timer_sync(&cxt->timer_ps);            smp_mb();            cancel_work_sync(&cxt->report_ps);        }    }    ps_data_report(cxt->idev,value,3);    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:21,


示例26: als_ps_probe

static int als_ps_probe(struct platform_device *pdev){    ALSPS_LOG("als_ps_probe/n");    return 0;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:5,


示例27: als_work_func

static void als_work_func(struct work_struct *work){    struct alsps_context *cxt = NULL;    //int out_size;    //hwm_sensor_data sensor_data;    int value=0,status=0;    int64_t  nt;    struct timespec time;    int err;    cxt  = alsps_context_obj;    if(NULL == cxt->als_data.get_data)    {        ALSPS_ERR("alsps driver not register data path/n");        return;    }    time.tv_sec = time.tv_nsec = 0;    time = get_monotonic_coarse();    nt = time.tv_sec*1000000000LL+time.tv_nsec;        //add wake lock to make sure data can be read before system suspend    err = cxt->als_data.get_data(&value,&status);    if(err)    {        ALSPS_ERR("get alsps data fails!!/n" );        goto als_loop;    }    else    {        {            cxt->drv_data.als_data.values[0] = value;            cxt->drv_data.als_data.status = status;            cxt->drv_data.als_data.time = nt;        }     }    if(true ==  cxt->is_als_first_data_after_enable)    {        cxt->is_als_first_data_after_enable = false;        //filter -1 value        if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] )        {                ALSPS_LOG(" read invalid data /n");               goto als_loop;        }    }    //report data to input device    //printk("new alsps work run..../n");    //ALSPS_LOG("als data[%d]  /n" ,cxt->drv_data.als_data.values[0]);    als_data_report(cxt->idev,        cxt->drv_data.als_data.values[0],        cxt->drv_data.als_data.status);    als_loop:    if(true == cxt->is_als_polling_run)    {        {          mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ));        }    }}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:70,


示例28: ps_show_flush

static ssize_t ps_show_flush(struct device* dev,                                 struct device_attribute *attr, char *buf){    ALSPS_LOG("ps_show_flush func called");    return snprintf(buf, PAGE_SIZE, "%d/n", 0);}
开发者ID:Swapnil133609,项目名称:Zeus_sprout,代码行数:6,


示例29: alsps_probe

static int alsps_probe(struct platform_device *pdev) {	int err;	ALSPS_LOG("+++++++++++++alsps_probe!!/n");	alsps_context_obj = alsps_context_alloc_object();	if (!alsps_context_obj)	{		err = -ENOMEM;		ALSPS_ERR("unable to allocate devobj!/n");		goto exit_alloc_data_failed;	}	//init real alspseleration driver    err = alsps_real_driver_init();	if(err)	{		ALSPS_ERR("alsps real driver init fail/n");		goto real_driver_init_fail;	}	//init alsps common factory mode misc device	err = alsps_factory_device_init();	if(err)	{		ALSPS_ERR("alsps factory device already registed/n");	}	//init input dev	err = alsps_input_init(alsps_context_obj);	if(err)	{		ALSPS_ERR("unable to register alsps input device!/n");		goto exit_alloc_input_dev_failed;	}#if defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_EARLYSUSPEND)    atomic_set(&(alsps_context_obj->early_suspend), 0);	alsps_context_obj->early_drv.level    = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1,	alsps_context_obj->early_drv.suspend  = alsps_early_suspend,	alsps_context_obj->early_drv.resume   = alsps_late_resume,    	register_early_suspend(&alsps_context_obj->early_drv);#endif  	ALSPS_LOG("----alsps_probe OK !!/n");	return 0;	//exit_hwmsen_create_attr_failed:	//exit_misc_register_failed:    	//exit_err_sysfs:			real_driver_init_fail:	exit_alloc_input_dev_failed:    	kfree(alsps_context_obj);	alsps_context_obj = NULL;	exit_alloc_data_failed:		ALSPS_LOG("----alsps_probe fail !!!/n");	return err;}
开发者ID:iuncuim,项目名称:A476_V1B_5.1_kernel,代码行数:64,


示例30: alsps_late_resume

/*----------------------------------------------------------------------------*/static void alsps_late_resume(struct early_suspend *h){   atomic_set(&(alsps_context_obj->early_suspend), 0);   ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d /n",atomic_read(&(alsps_context_obj->early_suspend)));   return ;}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:7,



注:本文中的ALSPS_LOG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ALTERA_AVALON_JTAG_UART_INIT函数代码示例
C++ ALOGV函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。