共 20 篇文章
显示摘要每页显示  条
#ifdef CONFIG_HAS_EARLYSUSPENDftk_ts->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;ftk_ts->early_suspend.suspend = stm_ts_early_suspend;ftk_ts->early_suspend.resume =stm_ts_late_resume;#ifdef CONFIG_HAS_EARLYSUSPENDstatic void stm_ts_early_suspend(struct early_suspend *h){struct ftk_ts *ts;#ifnd...
10: void devm_pwm_put(struct device *dev, struct pwm_device *pwm);npwm,该pwm chip可以支持的pwm channel(也可以称作pwm device由struct pwm_device表示)个数,kernel会根据该number,分配相应个数的struct pwm_device结构,保存在pwms指针中。struct pwm_device是pwm device的操作句柄,consumer的API调用,会中转到provider的pwm ops...
它的原型是:struct i2c_client * i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info);这个函数将会使用info提供的信息建立一个i2c_client并与第一个参数指向的i2c_adapter绑定。获取i2c_adapter指针的函数是:struct i2c_adapter* i2c_get_adapter(int id);struct i2c_client * i2c_new_probed_device(struct i2c...
--> 运行queue:queue_delayed_work(test_workqueue, test_delayed_work, delay_time); // 定义在:kernel/workqueue.c, 其中delay_time是延迟多少时间来运行queue。3) int schedule_delayed_work(struct work_struct *work, unsigned long delay) ---> queue_delayed_work --> queue_work.附:queue_work()和schedule_work(&vib...
内核的 工作队列 使用方法,struct work_struct.工作队列的使用又分两种情况,一种是利用系统共享的工作队列来添加自己的工作,这种情况处理函数不能消耗太多时间,这样会影响共享队列中其他任务的处理;另外一种是创建自己的工作队列并添加工作。//创建一个名为my_queue的工作队列并把工作队列的入口地址赋给声明的指针。//作用与schedule_work(...
/* Each adapter gets 2 lines from the table */ if (config_type) rc = msm_gpios_enable(&qup_i2c_gpios_hw[adap_id*2], 2);else rc = msm_gpios_enable(&qup_i2c_gpios_io[adap_id*2], 2);if (foo <0 || foo >1) { printk("input foo error. foo=%d.\n",foo);} sda = GPIO_PIN...
设置GPIO的方向,如果是输出同时设置电平:/* set as input or output, returning 0 or negative errno */int gpio_direction_input(unsigned gpio);int gpio_direction_output(unsigned gpio, int value);/* GPIO OUTPUT, might sleep */void gpio_set_value_cansleep(unsigned gpio, int value);将GPIO映射为IRQ中断:/* map GPIO numbers to...
320 480:意思是你开机动画在屏幕先以多少的解析度显示超过手机的分辨率,你的画面就显示不全了30:这个数字是代表每秒播放的帧数,假如part0文件夹里有30张图片,播放时间就是30/30=1秒播放完毕p 1 0 part0p 1(只播放一次) 0(空指令)part0 */代表part0文件夹內的图片只按名称顺序播放一次p 0 0 part1p 0(重复播放)0 (空指令)part1 */...
static struct attribute *dev_attrs[] = { &dev_attr_polling.attr, NULL, };static struct device_attribute dev_attr_proximity_enable =__ATTR(enable, S_IRUGO | S_IWUGO, proximity_enable_show, proximity_enable_store);eg: static struct attribute *proximity_sysfs_attrs[] = {&dev_attr_proximity_enabl...
struct i2c_driver { int (*probe)(struct i2c_client *, const struct i2c_device_id *);//动态获取总线号 adapter->nr = id; return i2c_register_adapter(adapter); //注册adapter}int i2c_add_numbered_adapter(struct i2c_adapter *adap){ int id; int status; if (adap->nr == -1) /* -1 means dynamically assign bus id */ retur...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部