新手上路
- 积分
- 45
- 金钱
- 45
- 注册时间
- 2019-5-11
- 在线时间
- 7 小时
|
3金钱
- [root@imx6ull]:/opt$:insmod ft5x06.ko
- [ 98.169707] gpio gpiochip0: (209c000.gpio): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
- [ 98.179737] gpio-mxc 209c000.gpio: unable to lock HW IRQ 9 for IRQ
- [ 98.185968] genirq: Failed to request resources for edt-ft5206 (irq 75) on irqchip gpio-mxc
- [ 98.197837] edt_ft5x06 1-0038: Unable to request touchscreen IRQ.
- [ 98.204316] edt_ft5x06: probe of 1-0038 failed with error -22
复制代码 这里是加载ko文件时报的错,ko来自用的教程源码01、例程源码/02、Linux驱动例程/23_multitouch编译出来的。请问这里该怎么修改。
版本5.4.70-00114-g4f2631b022d8-dirty armv7l
这是我的设备树:
- edt-ft5x06@38 {
- compatible = "edt,edt-ft5206", "edt,edt-ft5x06";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_tsc
- &pinctrl_tsc_reset>;
- reg = <0x38>;
- interrupt-parent = <&gpio1>;
- interrupts = <9 0>;
- reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
- irq-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
- status = "okay";
- };
复制代码
在恩智浦相关网站上看到有类似问题,说要重新申请一下io,我看教程源码里面确实这样做了。
- /* 1,申请中断GPIO */
- if (gpio_is_valid(dev->irq_pin)) {
- ret = devm_gpio_request_one(&client->dev, dev->irq_pin,
- GPIOF_IN, "edt-ft5x06 irq");
- if (ret) {
- dev_err(&client->dev,
- "Failed to request GPIO %d, error %d\n",
- dev->irq_pin, ret);
- return ret;
- }
- }
- /* 2,申请中断,client->irq就是IO中断, */
- ret = devm_request_threaded_irq(&client->dev, client->irq, NULL,
- ft5x06_handler, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
- client->name, &ft5x06);
- if (ret) {
- dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
- return ret;
- }
复制代码
|
|