分类: 嵌入式
2014-09-23 17:40:14
drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
make[3]: *** [drivers/input/touchscreen/eeti_ts.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
方法:
更改的地方总共包括三个文件
arch/arm/mach-pxa/raumfeld.c | 1 +
drivers/input/touchscreen/eeti_ts.c | 8 +++++---
include/linux/input/eeti_ts.h | 1 +
1、raumfeld.c
static struct eeti_ts_platform_data eeti_ts_pdata = {
.irq_active_high = 1,
.gpio = GPIO_TOUCH_IRQ,//添加
};
2、/drivers/input/touchscreen/eeti_ts.c
struct eeti_ts_priv {
struct input_dev *input;
struct work_struct work;
struct mutex mutex;
int irq, irq_active_high;//删除
int irq, gpio, irq_active_high;//添加
};
static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)
{
return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high;//删除
return gpio_get_value(priv->gpio) == priv->irq_active_high;//添加
}
static int __devinit eeti_ts_probe(struct i2c_client *client,
pdata = client->dev.platform_data;
下面两句
==========================================
if (pdata)
priv->irq_active_high = pdata->irq_active_high;
============================================
替换为
==========================================
if (pdata) {
priv->gpio = pdata->gpio;
priv->irq_active_high = pdata->irq_active_high;
}
===============================================
3、/include/linux/input/eeti_ts.h