1.查找驱动

触模屏驱动fts.c
kernel/msm-4.4/drivers/input/touchscreen/st/fts.c
ST FingerTips
msm8998:/ # getevent
add device 7: /dev/input/event4
name: “fts”
X_AXIS_MAX: 1440
Y_AXIS_MAX: 2560
I2C接口:gpio_87/88 ts_i2c_sda/scl
中断:GPIO_125 TP_INT_N
复位:GPIO_89 TP_RST_N

static struct of_device_id fts_of_match_table[] = {{.compatible = "st,fts",},{},
};
在kernel/msm-4.4/arch/arm/boot/dts/qcom/msm8998-qrd-skuk-hdk.dtsi里&i2c_5 {status = "okay";st_fts@49 {compatible = "st,fts";reg = <0x49>;interrupt-parent = <&tlmm>;interrupts = <125 0x2008>;vdd-supply = <&pm8998_l6>;avdd-supply = <&pm8998_l28>;pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";pinctrl-0 = <&ts_active>;pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;st,irq-gpio = <&tlmm 125 0x2008>;st,reset-gpio = <&tlmm 89 0x00>;st,regulator_dvdd = "vdd";st,regulator_avdd = "avdd";};
};

2.驱动解析

static int fts_probe(struct i2c_client *client,const struct i2c_device_id *idp)
{...struct device_node *dp = client->dev.of_node;...if (dp) {...parse_dt(&client->dev, info->bdata);}...info->fwu_workqueue = create_singlethread_workqueue("fts-fwu-queue");//创建workqueue,创建内核线程
//msm8998:/ # ps | grep fts-fwu-queue
root      565   2     0      0     rescuer_th 0000000000 S fts-fwu-queue}static int parse_dt(struct device *dev, struct fts_i2c_platform_data *bdata)
{
...struct device_node *np = dev->of_node;bdata->irq_gpio = of_get_named_gpio_flags(np,"st,irq-gpio", 0, NULL);if (of_property_read_bool(np, "st, reset-gpio")) {bdata->reset_gpio = of_get_named_gpio_flags(np,"st, reset-gpio", 0, NULL);logError(0, "%s reset_gpio =%d\n", tag, bdata->reset_gpio);} else {bdata->reset_gpio = GPIO_NOT_DEFINED;}}

of_get_named_gpio_flags(np,”st,irq-gpio”, 0, NULL);
of_get_named_gpio_flags(np,”st, reset-gpio”, 0, NULL);
从dts中获取gpio
int of_get_named_gpio_flags(struct device_node *np,
const char *list_name, int index, enum of_gpio_flags *flags)

request_irq(info->client->irq, fts_interrupt_handler,IRQF_TRIGGER_LOW, info->client->name,info))
static irqreturn_t fts_interrupt_handler(int irq, void *handle)
{struct fts_ts_info *info = handle;disable_irq_nosync(info->client->irq);queue_work(info->event_wq, &info->work);//把耗时的操作放在工作队列中断底半部return IRQ_HANDLED;
}INIT_WORK(&info->work, fts_event_handler);static void fts_event_handler(struct work_struct *work)
{input_sync(info->input_dev);//)同步用于告诉input core子系统报告结束
}

fts touchscreen相关推荐

  1. I.MX6 Goodix GT9xx touchscreen driver porting

    /************************************************************************* I.MX6 Goodix GT9xx touchs ...

  2. SQLite中使用全文搜索FTS

    SQLite中使用全文搜索FTS SQLite支持全文搜索.通过全文搜索功能,可以方便用户快速进行查找.在iOS中,GRDB.FMDB等SQLite框架均支持FTS技术,如FTS3.FTS4等.各个框 ...

  3. linux内核关闭触摸屏校准,linux内核usb触摸屏驱动bug调试- selected device is not a touchscreen I understand...

    近期给客户调试一块数控板,今天客户带过来一个屏,并且有一个usb的触摸屏芯片接在屏上.屏很快就弄好正常显示. 触摸屏在内核下找到usb 触摸屏驱动,内核启动后这个usb转的触摸屏也正常找到,注册为ev ...

  4. BNU OJ 第26303 题 Touchscreen Keyboard

    BNU OJ第26303题Touchscreen Keyboard(题目链接)的解题报告. 原题如下: Touchscreen Keyboard Problem Description Nowaday ...

  5. MySQL—FTS实现原理介绍PPT

    这个PPT是有一天我要给同事讲解MySQL的FTS的实现原理花了一个小时做的. 转载于:https://www.cnblogs.com/ohmhong/p/6870249.html

  6. Now, using the touch-screen smartphone in your hand

    Now, using the touch-screen smartphone in your hand, do you often miss the past when mobile phones w ...

  7. Greenplum--Triggering FTS prob故障检测原理

    目录 前言 一.FTS架构 二.FTS实现原理 三.Segment检测及故障切换 四.参数配置 最近在恢复gp集群时,看到有[INFO]:-Triggering FTS probe.这是在手动恢复时触 ...

  8. Greenplum数据库源码学习——FTS简介

    简介 FTS(Fault Tolerance Service)是greenplum提供的对于子节点的故障检测与恢复的服务.FTS是一个隶属于master的子进程,通过定期轮询每个primary的状态来 ...

  9. greenplum 源码解析 FTS辅助进程工作主流程

    1 简介   FTS(Fault Tolerance Service)是greenplum提供的对于子节点的故障检测与恢复的服务.其隶属于master的一个子进程,通过定期轮询每个primary的状态 ...

最新文章

  1. unity, 内存profile,ImageEffects Temp和Unity GI SystemTex RGBM
  2. SWOOLE httpserver
  3. Swiper使用心得
  4. burp的intruder报错Payload set 1: Invalid number settings
  5. php 递归栏目名叠加,thinkPHP实现递归循环栏目并按照树形结构无限极输出的方法,thinkphp递归...
  6. GridSearchCV 参数
  7. 新浪微博:已经吃下去的,又全都吐出来了!
  8. iOS原生实现二维码拉近放大
  9. heartbeat双机热备配置(适用centos6\rhel6)
  10. 给Eclipse中hibernate.cfg.xml配置文件加提示
  11. 微博开放平台api使用
  12. 尚硅谷IDEA常用快捷键-宋红康
  13. 【面试官说实现一个顺序表,但听到要求后我沉默了】
  14. tomcat介绍-通俗易懂篇
  15. python翻页爬取豆瓣影评,翻页爬取豆瓣电影名称和评分
  16. 线性代数笔记29——正定矩阵和最小值
  17. SwiftUI OCR功能大全之 基于 SwiftUI 构建文档扫描仪
  18. SQL的删除语句delete(删除表中的数据)
  19. 计算机硬盘管理 3t,为什么劝你3T硬盘也别分区?我来治好你的强迫症
  20. cf #818 Div.2(A~C)

热门文章

  1. Anaconda创建新环境及在pycharm中的设置
  2. 01-邂逅Vuejs
  3. CMake教程之构建Qt平台
  4. php 字符串m5加密解密_PHP加密解密字符串汇总
  5. Android:三种Adapter的使用方法
  6. 最新版本交易猫钓鱼源码完整版
  7. MySQL连续三条_求教一条Mysql,查询大于等于3条连续的重复记录,急急急!!!!...
  8. 计算机在机电一体化应用,关于计算机技术在机电一体化专业中的应用探讨
  9. 阿里“无影” | 未来每个人在云上都会有自己的主机
  10. 第七讲:5.物联网开关——自动化控制任务光照控制台灯实验例程