* Compile err with raumfeld_defconfig
@ 2012-05-15 7:25 jgq516 at gmail.com
2012-05-15 14:09 ` Daniel Mack
0 siblings, 1 reply; 4+ messages in thread
From: jgq516 at gmail.com @ 2012-05-15 7:25 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Does somebody notice this compile err with raumfeld_defconfig as follows?
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'
Regards,
Xiao
^ permalink raw reply [flat|nested] 4+ messages in thread
* Compile err with raumfeld_defconfig
2012-05-15 7:25 Compile err with raumfeld_defconfig jgq516 at gmail.com
@ 2012-05-15 14:09 ` Daniel Mack
2012-05-16 19:51 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Mack @ 2012-05-15 14:09 UTC (permalink / raw)
To: linux-arm-kernel
On 15.05.2012 09:25, jgq516 at gmail.com wrote:
> Hi,
>
> Does somebody notice this compile err with raumfeld_defconfig as follows?
>
> 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'
Yes, this is being worked on. Thanks for noticing, though :)
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Compile err with raumfeld_defconfig
2012-05-15 14:09 ` Daniel Mack
@ 2012-05-16 19:51 ` Arnd Bergmann
2012-05-17 7:49 ` Xiao Jiang
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2012-05-16 19:51 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 15 May 2012, Daniel Mack wrote:
> On 15.05.2012 09:25, jgq516 at gmail.com wrote:
> > Hi,
> >
> > Does somebody notice this compile err with raumfeld_defconfig as follows?
> >
> > 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'
>
> Yes, this is being worked on. Thanks for noticing, though :)
Does this work for you?
8<---
input/eeti_ts: pass gpio line in platform data
irq_to_gpio() was removed, so we have to pass the gpio number separately.
Without this patch, building raumfeld_defconfig results in:
/home/arnd/linux-arm/drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
/home/arnd/linux-arm/drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[4]: *** [drivers/input/touchscreen/eeti_ts.o] Error 1
make[3]: *** [drivers/input/touchscreen] Error 2
make[2]: *** [drivers/input] Error 2
make[1]: *** [drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [sub-make] Error 2
Generated by script, please check manually
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-pxa/raumfeld.c | 1 +
drivers/input/touchscreen/eeti_ts.c | 8 +++++---
include/linux/input/eeti_ts.h | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 5905ed1..9e1c4ea 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -953,6 +953,7 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
static struct eeti_ts_platform_data eeti_ts_pdata = {
.irq_active_high = 1,
+ .gpio = GPIO_TOUCH_IRQ,
};
static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 503c709..45dab18 100644
--- a/drivers/input/touchscreen/eeti_ts.c
+++ b/drivers/input/touchscreen/eeti_ts.c
@@ -48,7 +48,7 @@ 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;
};
#define EETI_TS_BITDEPTH (11)
@@ -62,7 +62,7 @@ struct eeti_ts_priv {
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 void eeti_ts_read(struct work_struct *work)
@@ -203,8 +203,10 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
pdata = client->dev.platform_data;
- if (pdata)
+ if (pdata) {
+ priv->gpio = pdata->gpio;
priv->irq_active_high = pdata->irq_active_high;
+ }
irq_flags = priv->irq_active_high ?
IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
index f875b31..3404504 100644
--- a/include/linux/input/eeti_ts.h
+++ b/include/linux/input/eeti_ts.h
@@ -3,6 +3,7 @@
struct eeti_ts_platform_data {
unsigned int irq_active_high;
+ unsigned int gpio;
};
#endif /* LINUX_INPUT_EETI_TS_H */
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Compile err with raumfeld_defconfig
2012-05-16 19:51 ` Arnd Bergmann
@ 2012-05-17 7:49 ` Xiao Jiang
0 siblings, 0 replies; 4+ messages in thread
From: Xiao Jiang @ 2012-05-17 7:49 UTC (permalink / raw)
To: linux-arm-kernel
Arnd Bergmann wrote:
> On Tuesday 15 May 2012, Daniel Mack wrote:
>
>> On 15.05.2012 09:25, jgq516 at gmail.com wrote:
>>
>>> Hi,
>>>
>>> Does somebody notice this compile err with raumfeld_defconfig as follows?
>>>
>>> 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'
>>>
>> Yes, this is being worked on. Thanks for noticing, though :)
>>
>
> Does this work for you?
> 8<---
> input/eeti_ts: pass gpio line in platform data
>
> irq_to_gpio() was removed, so we have to pass the gpio number separately.
>
> Without this patch, building raumfeld_defconfig results in:
>
> /home/arnd/linux-arm/drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
> /home/arnd/linux-arm/drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[4]: *** [drivers/input/touchscreen/eeti_ts.o] Error 1
> make[3]: *** [drivers/input/touchscreen] Error 2
> make[2]: *** [drivers/input] Error 2
> make[1]: *** [drivers] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [sub-make] Error 2
>
> Generated by script, please check manually
>
Compile with raumfeld_defconfig ok after apply this patch manually.
Tested-by: Xiao Jiang <jgq516@gmail.com>
Regards,
Xiao
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/mach-pxa/raumfeld.c | 1 +
> drivers/input/touchscreen/eeti_ts.c | 8 +++++---
> include/linux/input/eeti_ts.h | 1 +
> 3 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 5905ed1..9e1c4ea 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -953,6 +953,7 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
>
> static struct eeti_ts_platform_data eeti_ts_pdata = {
> .irq_active_high = 1,
> + .gpio = GPIO_TOUCH_IRQ,
> };
>
> static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
> diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
> index 503c709..45dab18 100644
> --- a/drivers/input/touchscreen/eeti_ts.c
> +++ b/drivers/input/touchscreen/eeti_ts.c
> @@ -48,7 +48,7 @@ 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;
> };
>
> #define EETI_TS_BITDEPTH (11)
> @@ -62,7 +62,7 @@ struct eeti_ts_priv {
>
> 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 void eeti_ts_read(struct work_struct *work)
> @@ -203,8 +203,10 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>
> pdata = client->dev.platform_data;
>
> - if (pdata)
> + if (pdata) {
> + priv->gpio = pdata->gpio;
> priv->irq_active_high = pdata->irq_active_high;
> + }
>
> irq_flags = priv->irq_active_high ?
> IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;
> diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
> index f875b31..3404504 100644
> --- a/include/linux/input/eeti_ts.h
> +++ b/include/linux/input/eeti_ts.h
> @@ -3,6 +3,7 @@
>
> struct eeti_ts_platform_data {
> unsigned int irq_active_high;
> + unsigned int gpio;
> };
>
> #endif /* LINUX_INPUT_EETI_TS_H */
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-17 7:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 7:25 Compile err with raumfeld_defconfig jgq516 at gmail.com
2012-05-15 14:09 ` Daniel Mack
2012-05-16 19:51 ` Arnd Bergmann
2012-05-17 7:49 ` Xiao Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).