您尚未登录。

楼主 # 2021-07-02 20:56:48

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

ft5426

请问ft5426驱动和ft5406兼容吗?
这设备树有没有毛病

			ft5426: ft5426@38 {
				compatible = "edt,edt-ft5406","edt,edt-ft5x06";
				reg = <0x38>;
				pinctrl-names = "default";
				//pinctrl-0 = <&pinctrl_tsc>;
				interrupt-parent = <&pio>;
				interrupts = < PF 5 IRQ_TYPE_EDGE_FALLING>;
				interrupt-gpios = <&pio PF 5 6 0xffffffff 0xffffffff 0>;
				reset-gpios = <&pio PF 6 1 0xffffffff 0xffffffff 1>;
				
				status = "okay";
			};

离线

楼主 #2 2021-07-03 09:00:59

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

edt-ft5x06.c编译进去了,设备树也添加了,但是竟然没反应。同一个i2c上挂在的其他设备都有log出来

[    3.301947] rtc-ds1307: probe of 3-0068 failed with error -5
[    3.312606] rtc-pcf8563 3-0051: rtc core: registered rtc-pcf8563 as rtc0

即便ft5426不存在,是不是也有下面这句log出来
probing for EDT FT5x06 I2C 或者 touchscreen probe failed 之类的
但是什么都没有,这是什么原因

最近编辑记录 cris8259 (2021-07-03 09:03:51)

离线

楼主 #4 2021-07-03 09:32:03

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

有参与编译,edt-ft5x06.ko文件都出来了

离线

楼主 #5 2021-07-03 17:35:03

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

直接编译进内核,不使用模块编译就可以了。但是新的问题来了,左右移动触摸的时候,鼠标指针上下移动。上下移动触摸的时候,鼠标指针左右移动。

                touchscreen-size-x = <1024>;
                touchscreen-size-y = <600>;
                touchscreen-inverted-x = <0>;
                touchscreen-inverted-y = <0>;
                touchscreen-swapped-x-y = <0>;
inverted-x , inverted-y , swapped-x-y 改成1 都没效果 。这是什么原因

离线

楼主 #6 2021-07-07 17:39:19

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

该评论内容与本帖子无关,鼓励各位坑友积极发言讨论与帖子有关的内容!

离线

  • 不通过:与技术无关

楼主 #8 2021-07-08 08:37:04

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

任何一个或者组合都没有效果

离线

楼主 #10 2021-07-08 17:29:06

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

void touchscreen_parse_properties(struct input_dev *input, bool multitouch)
{
	struct device *dev = input->dev.parent;
	unsigned int axis;
	unsigned int maximum, fuzz;
	bool data_present;

	input_alloc_absinfo(input);
	if (!input->absinfo)
		return;

	axis = multitouch ? ABS_MT_POSITION_X : ABS_X;
	data_present = touchscreen_get_prop_u32(dev, "touchscreen-size-x",
						input_abs_get_max(input,
								  axis) + 1,
						&maximum) |
		       touchscreen_get_prop_u32(dev, "touchscreen-fuzz-x",
						input_abs_get_fuzz(input, axis),
						&fuzz);
	if (data_present)
		touchscreen_set_params(input, axis, maximum - 1, fuzz);

	axis = multitouch ? ABS_MT_POSITION_Y : ABS_Y;
	data_present = touchscreen_get_prop_u32(dev, "touchscreen-size-y",
						input_abs_get_max(input,
								  axis) + 1,
						&maximum) |
		       touchscreen_get_prop_u32(dev, "touchscreen-fuzz-y",
						input_abs_get_fuzz(input, axis),
						&fuzz);
	if (data_present)
		touchscreen_set_params(input, axis, maximum - 1, fuzz);

	axis = multitouch ? ABS_MT_PRESSURE : ABS_PRESSURE;
	data_present = touchscreen_get_prop_u32(dev,
						"touchscreen-max-pressure",
						input_abs_get_max(input, axis),
						&maximum) |
		       touchscreen_get_prop_u32(dev,
						"touchscreen-fuzz-pressure",
						input_abs_get_fuzz(input, axis),
						&fuzz);
	if (data_present)
		touchscreen_set_params(input, axis, maximum, fuzz);
}
EXPORT_SYMBOL(touchscreen_parse_properties);

原来解析属性函数没有touchscreen-inverted-x 这些关键字

离线

楼主 #12 2021-07-09 08:38:32

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

版本4.9.170
但是我看你发的地址 https://elixir.bootlin.com/linux/v4.9/source/drivers/input/touchscreen/of_touchscreen.c 这里面4.9.170 是有touchscreen-inverted-x 这些参数的

离线

楼主 #14 2021-07-09 15:37:34

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

没有git跟踪,全志给的代码

离线

楼主 #15 2021-07-09 21:26:25

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

感谢@哇酷小二,搞定收工

离线

楼主 #17 2021-07-10 14:06:04

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: ft5426

按照你说的,驱动文件更新覆盖掉

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn