All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ARM: defconfig build errors
@ 2012-08-08 12:54 ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Daniel Mack, Daniel Ribeiro,
	Haojian Zhuang, Linus Walleij, Russell King, Samuel Ortiz,
	Sascha Hauer, Shawn Guo

I'm dusting off my defconfig warning fixes. This is the most important
bunch as these are actual build failures that happen in one of the
defconfigs. I've put these into the "fixes" branch of the arm-soc
tree already and will send them out for -r2 unless I hear objections.

Please take a look.

	Arnd

Cc: Daniel Mack <zonque@gmail.com>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>

Arnd Bergmann (6):
  ARM: pxa: remove irq_to_gpio from ezx-pcap driver
  ARM: pxa remove irq_to_gpio from eeti_ts driver
  ARM: sa1100: include asm/io.h in hackkit leds code
  ARM: s3c24xx: use new PWM driver
  ARM: integrator: include <linux/export.h
  ARM: imx: gpmi-nand depends on mxs-dma

 arch/arm/configs/imx_v6_v7_defconfig |    1 +
 arch/arm/mach-integrator/core.c      |    1 +
 arch/arm/mach-pxa/raumfeld.c         |    1 +
 arch/arm/mach-s3c24xx/Kconfig        |    6 ++++--
 arch/arm/mach-sa1100/leds-hackkit.c  |    1 +
 drivers/input/touchscreen/eeti_ts.c  |    8 +++++---
 drivers/mfd/ezx-pcap.c               |    2 +-
 drivers/mtd/nand/Kconfig             |    2 +-
 include/linux/input/eeti_ts.h        |    1 +
 include/linux/mfd/ezx-pcap.h         |    1 +
 10 files changed, 17 insertions(+), 7 deletions(-)

-- 
1.7.10


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 0/6] ARM: defconfig build errors
@ 2012-08-08 12:54 ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

I'm dusting off my defconfig warning fixes. This is the most important
bunch as these are actual build failures that happen in one of the
defconfigs. I've put these into the "fixes" branch of the arm-soc
tree already and will send them out for -r2 unless I hear objections.

Please take a look.

	Arnd

Cc: Daniel Mack <zonque@gmail.com>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>

Arnd Bergmann (6):
  ARM: pxa: remove irq_to_gpio from ezx-pcap driver
  ARM: pxa remove irq_to_gpio from eeti_ts driver
  ARM: sa1100: include asm/io.h in hackkit leds code
  ARM: s3c24xx: use new PWM driver
  ARM: integrator: include <linux/export.h
  ARM: imx: gpmi-nand depends on mxs-dma

 arch/arm/configs/imx_v6_v7_defconfig |    1 +
 arch/arm/mach-integrator/core.c      |    1 +
 arch/arm/mach-pxa/raumfeld.c         |    1 +
 arch/arm/mach-s3c24xx/Kconfig        |    6 ++++--
 arch/arm/mach-sa1100/leds-hackkit.c  |    1 +
 drivers/input/touchscreen/eeti_ts.c  |    8 +++++---
 drivers/mfd/ezx-pcap.c               |    2 +-
 drivers/mtd/nand/Kconfig             |    2 +-
 include/linux/input/eeti_ts.h        |    1 +
 include/linux/mfd/ezx-pcap.h         |    1 +
 10 files changed, 17 insertions(+), 7 deletions(-)

-- 
1.7.10

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 1/6] ARM: pxa: remove irq_to_gpio from ezx-pcap driver
  2012-08-08 12:54 ` Arnd Bergmann
@ 2012-08-08 12:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, v3.2+,
	Samuel Ortiz, Daniel Ribeiro, Haojian Zhuang

The irq_to_gpio function was removed from the pxa platform
in linux-3.2, and this driver has been broken since.

There is actually no in-tree user of this driver that adds
this platform device, but the driver can and does get enabled
on some platforms.

Without this patch, building ezx_defconfig results in:

drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work':
drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org (v3.2+)
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
---
 drivers/mfd/ezx-pcap.c       |    2 +-
 include/linux/mfd/ezx-pcap.h |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 43a76c4..db662e2 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -202,7 +202,7 @@ static void pcap_isr_work(struct work_struct *work)
 		}
 		local_irq_enable();
 		ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr);
-	} while (gpio_get_value(irq_to_gpio(pcap->spi->irq)));
+	} while (gpio_get_value(pdata->gpio));
 }
 
 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h
index 40c37216..32a1b5c 100644
--- a/include/linux/mfd/ezx-pcap.h
+++ b/include/linux/mfd/ezx-pcap.h
@@ -16,6 +16,7 @@ struct pcap_subdev {
 struct pcap_platform_data {
 	unsigned int irq_base;
 	unsigned int config;
+	int gpio;
 	void (*init) (void *);	/* board specific init */
 	int num_subdevs;
 	struct pcap_subdev *subdevs;
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 1/6] ARM: pxa: remove irq_to_gpio from ezx-pcap driver
@ 2012-08-08 12:54   ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

The irq_to_gpio function was removed from the pxa platform
in linux-3.2, and this driver has been broken since.

There is actually no in-tree user of this driver that adds
this platform device, but the driver can and does get enabled
on some platforms.

Without this patch, building ezx_defconfig results in:

drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work':
drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable at vger.kernel.org (v3.2+)
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
---
 drivers/mfd/ezx-pcap.c       |    2 +-
 include/linux/mfd/ezx-pcap.h |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 43a76c4..db662e2 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -202,7 +202,7 @@ static void pcap_isr_work(struct work_struct *work)
 		}
 		local_irq_enable();
 		ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr);
-	} while (gpio_get_value(irq_to_gpio(pcap->spi->irq)));
+	} while (gpio_get_value(pdata->gpio));
 }
 
 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h
index 40c37216..32a1b5c 100644
--- a/include/linux/mfd/ezx-pcap.h
+++ b/include/linux/mfd/ezx-pcap.h
@@ -16,6 +16,7 @@ struct pcap_subdev {
 struct pcap_platform_data {
 	unsigned int irq_base;
 	unsigned int config;
+	int gpio;
 	void (*init) (void *);	/* board specific init */
 	int num_subdevs;
 	struct pcap_subdev *subdevs;
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
  2012-08-08 12:54 ` Arnd Bergmann
@ 2012-08-08 12:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, v3.2+, Daniel Mack, Haojian Zhuang

The irq_to_gpio function was removed from the pxa platform
in linux-3.2, and this driver has been broken since.

Without this patch, building raumfeld_defconfig results in:

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' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org (v3.2+)
Cc: Daniel Mack <zonque@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
---
 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] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
@ 2012-08-08 12:54   ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

The irq_to_gpio function was removed from the pxa platform
in linux-3.2, and this driver has been broken since.

Without this patch, building raumfeld_defconfig results in:

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' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable at vger.kernel.org (v3.2+)
Cc: Daniel Mack <zonque@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
---
 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] 50+ messages in thread

* [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code
  2012-08-08 12:54 ` Arnd Bergmann
@ 2012-08-08 12:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: arm, linux-kernel, Arnd Bergmann, Russell King

The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
file stopped working because of that.

Without this patch, building hackkit_defconfig results in:

arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/mach-sa1100/leds-hackkit.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c
index 6a23524..9c79674 100644
--- a/arch/arm/mach-sa1100/leds-hackkit.c
+++ b/arch/arm/mach-sa1100/leds-hackkit.c
@@ -13,6 +13,7 @@
 
 #include <mach/hardware.h>
 #include <asm/leds.h>
+#include <asm/io.h>
 
 #include "leds.h"
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code
@ 2012-08-08 12:54   ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
file stopped working because of that.

Without this patch, building hackkit_defconfig results in:

arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/mach-sa1100/leds-hackkit.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c
index 6a23524..9c79674 100644
--- a/arch/arm/mach-sa1100/leds-hackkit.c
+++ b/arch/arm/mach-sa1100/leds-hackkit.c
@@ -13,6 +13,7 @@
 
 #include <mach/hardware.h>
 #include <asm/leds.h>
+#include <asm/io.h>
 
 #include "leds.h"
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 4/6] ARM: s3c24xx: use new PWM driver
  2012-08-08 12:54 ` Arnd Bergmann
@ 2012-08-08 12:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: arm, linux-kernel, Arnd Bergmann

The samsung PWM driver has moved to the new PWM subsystem, which
changed the Kconfig symbol for that driver, but the rx1950 and
gta02 boards still uses the old one.

Without this patch, building s3c2410_defconfig results in:

arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to `pwm_disable'
arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to `pwm_enable'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to `pwm_request'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Kconfig |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e249611..422133a 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,8 @@ config MACH_NEO1973_GTA02
 	select I2C
 	select POWER_SUPPLY
 	select MACH_NEO1973
-	select S3C2410_PWM
+	select PWM
+	select PWM_SAMSUNG
 	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
@@ -493,7 +494,8 @@ config MACH_RX1950
 	select S3C24XX_DCLK
 	select PM_H1940 if PM
 	select I2C
-	select S3C2410_PWM
+	select PWM
+	select PWM_SAMSUNG
 	select S3C_DEV_NAND
 	select S3C2410_IOTIMING if S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 4/6] ARM: s3c24xx: use new PWM driver
@ 2012-08-08 12:54   ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

The samsung PWM driver has moved to the new PWM subsystem, which
changed the Kconfig symbol for that driver, but the rx1950 and
gta02 boards still uses the old one.

Without this patch, building s3c2410_defconfig results in:

arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to `pwm_disable'
arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to `pwm_enable'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to `pwm_request'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Kconfig |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e249611..422133a 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,8 @@ config MACH_NEO1973_GTA02
 	select I2C
 	select POWER_SUPPLY
 	select MACH_NEO1973
-	select S3C2410_PWM
+	select PWM
+	select PWM_SAMSUNG
 	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
@@ -493,7 +494,8 @@ config MACH_RX1950
 	select S3C24XX_DCLK
 	select PM_H1940 if PM
 	select I2C
-	select S3C2410_PWM
+	select PWM
+	select PWM_SAMSUNG
 	select S3C_DEV_NAND
 	select S3C2410_IOTIMING if S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 5/6] ARM: integrator: include <linux/export.h
  2012-08-08 12:54 ` Arnd Bergmann
@ 2012-08-08 12:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Linus Walleij, Russell King

Without this patch, building integrator_defconfig results in:

arch/arm/mach-integrator/core.c:150:1: warning: data definition has no type or storage class [enabled by default]
arch/arm/mach-integrator/core.c:150:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
arch/arm/mach-integrator/core.c:150:1: warning: parameter names (without types) in function declaration [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/mach-integrator/core.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index ebf680b..3fa6c51 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/export.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 5/6] ARM: integrator: include <linux/export.h
@ 2012-08-08 12:54   ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

Without this patch, building integrator_defconfig results in:

arch/arm/mach-integrator/core.c:150:1: warning: data definition has no type or storage class [enabled by default]
arch/arm/mach-integrator/core.c:150:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
arch/arm/mach-integrator/core.c:150:1: warning: parameter names (without types) in function declaration [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/mach-integrator/core.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index ebf680b..3fa6c51 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/export.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
  2012-08-08 12:54 ` Arnd Bergmann
@ 2012-08-08 12:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Shawn Guo, Sascha Hauer

It is not currently possible to build the gpmi-nand driver without
also building the mxs-dma driver. Clarify this Kconfig and enable
both in the defconfig file so we can build it again with both enabled.

drivers/built-in.o: In function `gpmi_dma_filter':
clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
---
 arch/arm/configs/imx_v6_v7_defconfig |    1 +
 drivers/mtd/nand/Kconfig             |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index f725b96..3c9f32f 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
 CONFIG_DMADEVICES=y
 CONFIG_IMX_SDMA=y
+CONFIG_MXS_DMA=y
 CONFIG_COMMON_CLK_DEBUG=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_EXT2_FS=y
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 31bb7e5..8ca4176 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -480,7 +480,7 @@ config MTD_NAND_NANDSIM
 
 config MTD_NAND_GPMI_NAND
         bool "GPMI NAND Flash Controller driver"
-        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28 || SOC_IMX6Q)
+        depends on MTD_NAND && MXS_DMA
         help
 	 Enables NAND Flash support for IMX23 or IMX28.
 	 The GPMI controller is very powerful, with the help of BCH
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
@ 2012-08-08 12:54   ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

It is not currently possible to build the gpmi-nand driver without
also building the mxs-dma driver. Clarify this Kconfig and enable
both in the defconfig file so we can build it again with both enabled.

drivers/built-in.o: In function `gpmi_dma_filter':
clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
---
 arch/arm/configs/imx_v6_v7_defconfig |    1 +
 drivers/mtd/nand/Kconfig             |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index f725b96..3c9f32f 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
 CONFIG_DMADEVICES=y
 CONFIG_IMX_SDMA=y
+CONFIG_MXS_DMA=y
 CONFIG_COMMON_CLK_DEBUG=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_EXT2_FS=y
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 31bb7e5..8ca4176 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -480,7 +480,7 @@ config MTD_NAND_NANDSIM
 
 config MTD_NAND_GPMI_NAND
         bool "GPMI NAND Flash Controller driver"
-        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28 || SOC_IMX6Q)
+        depends on MTD_NAND && MXS_DMA
         help
 	 Enables NAND Flash support for IMX23 or IMX28.
 	 The GPMI controller is very powerful, with the help of BCH
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 13:00     ` Dirk Behme
  -1 siblings, 0 replies; 50+ messages in thread
From: Dirk Behme @ 2012-08-08 13:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Sascha Hauer, arm, linux-kernel, Shawn Guo

On 08.08.2012 14:54, Arnd Bergmann wrote:
> It is not currently possible to build the gpmi-nand driver without
> also building the mxs-dma driver. Clarify this Kconfig and enable
> both in the defconfig file so we can build it again with both enabled.
> 
> drivers/built-in.o: In function `gpmi_dma_filter':
> clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
> make[1]: *** [vmlinux] Error 1
> make: *** [sub-make] Error 2
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk

> ---
>  arch/arm/configs/imx_v6_v7_defconfig |    1 +
>  drivers/mtd/nand/Kconfig             |    2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
> index f725b96..3c9f32f 100644
> --- a/arch/arm/configs/imx_v6_v7_defconfig
> +++ b/arch/arm/configs/imx_v6_v7_defconfig
> @@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y
>  CONFIG_RTC_DRV_MXC=y
>  CONFIG_DMADEVICES=y
>  CONFIG_IMX_SDMA=y
> +CONFIG_MXS_DMA=y
>  CONFIG_COMMON_CLK_DEBUG=y
>  # CONFIG_IOMMU_SUPPORT is not set
>  CONFIG_EXT2_FS=y
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 31bb7e5..8ca4176 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -480,7 +480,7 @@ config MTD_NAND_NANDSIM
>  
>  config MTD_NAND_GPMI_NAND
>          bool "GPMI NAND Flash Controller driver"
> -        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28 || SOC_IMX6Q)
> +        depends on MTD_NAND && MXS_DMA
>          help
>  	 Enables NAND Flash support for IMX23 or IMX28.
>  	 The GPMI controller is very powerful, with the help of BCH

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
@ 2012-08-08 13:00     ` Dirk Behme
  0 siblings, 0 replies; 50+ messages in thread
From: Dirk Behme @ 2012-08-08 13:00 UTC (permalink / raw)
  To: linux-arm-kernel

On 08.08.2012 14:54, Arnd Bergmann wrote:
> It is not currently possible to build the gpmi-nand driver without
> also building the mxs-dma driver. Clarify this Kconfig and enable
> both in the defconfig file so we can build it again with both enabled.
> 
> drivers/built-in.o: In function `gpmi_dma_filter':
> clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
> make[1]: *** [vmlinux] Error 1
> make: *** [sub-make] Error 2
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk

> ---
>  arch/arm/configs/imx_v6_v7_defconfig |    1 +
>  drivers/mtd/nand/Kconfig             |    2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
> index f725b96..3c9f32f 100644
> --- a/arch/arm/configs/imx_v6_v7_defconfig
> +++ b/arch/arm/configs/imx_v6_v7_defconfig
> @@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y
>  CONFIG_RTC_DRV_MXC=y
>  CONFIG_DMADEVICES=y
>  CONFIG_IMX_SDMA=y
> +CONFIG_MXS_DMA=y
>  CONFIG_COMMON_CLK_DEBUG=y
>  # CONFIG_IOMMU_SUPPORT is not set
>  CONFIG_EXT2_FS=y
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 31bb7e5..8ca4176 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -480,7 +480,7 @@ config MTD_NAND_NANDSIM
>  
>  config MTD_NAND_GPMI_NAND
>          bool "GPMI NAND Flash Controller driver"
> -        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28 || SOC_IMX6Q)
> +        depends on MTD_NAND && MXS_DMA
>          help
>  	 Enables NAND Flash support for IMX23 or IMX28.
>  	 The GPMI controller is very powerful, with the help of BCH

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 13:01     ` Fabio Estevam
  -1 siblings, 0 replies; 50+ messages in thread
From: Fabio Estevam @ 2012-08-08 13:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Sascha Hauer, arm, linux-kernel, Shawn Guo

Hi Arnd,

On Wed, Aug 8, 2012 at 9:54 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> It is not currently possible to build the gpmi-nand driver without
> also building the mxs-dma driver. Clarify this Kconfig and enable
> both in the defconfig file so we can build it again with both enabled.
>
> drivers/built-in.o: In function `gpmi_dma_filter':
> clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
> make[1]: *** [vmlinux] Error 1
> make: *** [sub-make] Error 2
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>

I have already sent a fix for this to the mtd list:
https://patchwork.kernel.org/patch/1236551/

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
@ 2012-08-08 13:01     ` Fabio Estevam
  0 siblings, 0 replies; 50+ messages in thread
From: Fabio Estevam @ 2012-08-08 13:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

On Wed, Aug 8, 2012 at 9:54 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> It is not currently possible to build the gpmi-nand driver without
> also building the mxs-dma driver. Clarify this Kconfig and enable
> both in the defconfig file so we can build it again with both enabled.
>
> drivers/built-in.o: In function `gpmi_dma_filter':
> clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
> make[1]: *** [vmlinux] Error 1
> make: *** [sub-make] Error 2
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>

I have already sent a fix for this to the mtd list:
https://patchwork.kernel.org/patch/1236551/

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
  2012-08-08 13:01     ` Fabio Estevam
@ 2012-08-08 13:05       ` Dirk Behme
  -1 siblings, 0 replies; 50+ messages in thread
From: Dirk Behme @ 2012-08-08 13:05 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Arnd Bergmann, Shawn Guo, arm, Sascha Hauer, linux-arm-kernel,
	linux-kernel

On 08.08.2012 15:01, Fabio Estevam wrote:
> Hi Arnd,
> 
> On Wed, Aug 8, 2012 at 9:54 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> It is not currently possible to build the gpmi-nand driver without
>> also building the mxs-dma driver. Clarify this Kconfig and enable
>> both in the defconfig file so we can build it again with both enabled.
>>
>> drivers/built-in.o: In function `gpmi_dma_filter':
>> clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
>> make[1]: *** [vmlinux] Error 1
>> make: *** [sub-make] Error 2
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Cc: Sascha Hauer <kernel@pengutronix.de>
> 
> I have already sent a fix for this to the mtd list:
> https://patchwork.kernel.org/patch/1236551/

Yes. But it seems it's not handled there? I'm trying since ~2 weeks to 
get something like your patch applied to get the broken mainline fixed, 
but unfortunately without success so far.

Best regards

Dirk

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
@ 2012-08-08 13:05       ` Dirk Behme
  0 siblings, 0 replies; 50+ messages in thread
From: Dirk Behme @ 2012-08-08 13:05 UTC (permalink / raw)
  To: linux-arm-kernel

On 08.08.2012 15:01, Fabio Estevam wrote:
> Hi Arnd,
> 
> On Wed, Aug 8, 2012 at 9:54 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> It is not currently possible to build the gpmi-nand driver without
>> also building the mxs-dma driver. Clarify this Kconfig and enable
>> both in the defconfig file so we can build it again with both enabled.
>>
>> drivers/built-in.o: In function `gpmi_dma_filter':
>> clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
>> make[1]: *** [vmlinux] Error 1
>> make: *** [sub-make] Error 2
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Cc: Sascha Hauer <kernel@pengutronix.de>
> 
> I have already sent a fix for this to the mtd list:
> https://patchwork.kernel.org/patch/1236551/

Yes. But it seems it's not handled there? I'm trying since ~2 weeks to 
get something like your patch applied to get the broken mainline fixed, 
but unfortunately without success so far.

Best regards

Dirk

^ permalink raw reply	[flat|nested] 50+ messages in thread

* RE: [PATCH 4/6] ARM: s3c24xx: use new PWM driver
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 13:10     ` Kukjin Kim
  -1 siblings, 0 replies; 50+ messages in thread
From: Kukjin Kim @ 2012-08-08 13:10 UTC (permalink / raw)
  To: 'Arnd Bergmann', linux-arm-kernel; +Cc: arm, linux-kernel

Arnd Bergmann wrote:
> 
> The samsung PWM driver has moved to the new PWM subsystem, which
> changed the Kconfig symbol for that driver, but the rx1950 and
> gta02 boards still uses the old one.
> 
> Without this patch, building s3c2410_defconfig results in:
> 
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
> arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to
> `pwm_disable'
> arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to
> `pwm_enable'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
> arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
> arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to
> `pwm_request'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/Kconfig |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
> index e249611..422133a 100644
> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -483,7 +483,8 @@ config MACH_NEO1973_GTA02
>  	select I2C
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
> -	select S3C2410_PWM
> +	select PWM
> +	select PWM_SAMSUNG
>  	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> @@ -493,7 +494,8 @@ config MACH_RX1950
>  	select S3C24XX_DCLK
>  	select PM_H1940 if PM
>  	select I2C
> -	select S3C2410_PWM
> +	select PWM
> +	select PWM_SAMSUNG
>  	select S3C_DEV_NAND
>  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> --
> 1.7.10
> 
Hi Arnd,

There is following patch for fixing it in my tree now, its reference:

https://lkml.org/lkml/2012/8/8/185

So...?

From: Tushar Behera <tushar.behera@linaro.org>
Subject: [PATCH] ARM: SAMSUNG: Fix compilation error with s3c2410_defconfig

Commit 215c29d3d0e9 ("ARM Samsung: Move s3c pwm driver to pwm framework")
moved Samsung PWM driver to drivers/pwm and the config option to select
this driver has changed.

This patch fixes following build-error with s3c2410_defconfig.

arch/arm/mach-s3c24xx/built-in.o: In function 'rx1950_lcd_power':
arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to 'pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to
'pwm_disable'
arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to 'pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to 'pwm_enable'
arch/arm/mach-s3c24xx/built-in.o: In function 'rx1950_backlight_exit':
arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to 'pwm_free'
arch/arm/mach-s3c24xx/built-in.o: In function 'rx1950_backlight_init':
arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to
'pwm_request'

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
[kgene.kim@samsung.com: re-worked as per review comments]
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s3c24xx/Kconfig |    4 ++--
 arch/arm/plat-samsung/Kconfig |    2 +-
 drivers/pwm/Kconfig           |    6 ++----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e249611..d56b0f7 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
 	select I2C
 	select POWER_SUPPLY
 	select MACH_NEO1973
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
Phone
@@ -493,7 +493,7 @@ config MACH_RX1950
 	select S3C24XX_DCLK
 	select PM_H1940 if PM
 	select I2C
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_NAND
 	select S3C2410_IOTIMING if S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 7aca31c..dcdfb77 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -403,7 +403,7 @@ config S5P_DEV_USB_EHCI
 
 config S3C24XX_PWM
 	bool "PWM device support"
-	select HAVE_PWM
+	select PWM
 	help
 	  Support for exporting the PWM timer blocks via the pwm device
 	  system
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 8fc3808..c74d055 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -58,14 +58,12 @@ config PWM_PXA
 	  will be called pwm-pxa.
 
 config PWM_SAMSUNG
-	tristate "Samsung pwm support"
+	bool "Samsung PWM support"
 	depends on PLAT_SAMSUNG
+	default y
 	help
 	  Generic PWM framework driver for Samsung.
 
-	  To compile this driver as a module, choose M here: the module
-	  will be called pwm-samsung.
-
 config PWM_TEGRA
 	tristate "NVIDIA Tegra PWM support"
 	depends on ARCH_TEGRA
-- 
1.7.4.1

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 4/6] ARM: s3c24xx: use new PWM driver
@ 2012-08-08 13:10     ` Kukjin Kim
  0 siblings, 0 replies; 50+ messages in thread
From: Kukjin Kim @ 2012-08-08 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

Arnd Bergmann wrote:
> 
> The samsung PWM driver has moved to the new PWM subsystem, which
> changed the Kconfig symbol for that driver, but the rx1950 and
> gta02 boards still uses the old one.
> 
> Without this patch, building s3c2410_defconfig results in:
> 
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
> arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to
> `pwm_disable'
> arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to
> `pwm_enable'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
> arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
> arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to
> `pwm_request'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/Kconfig |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
> index e249611..422133a 100644
> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -483,7 +483,8 @@ config MACH_NEO1973_GTA02
>  	select I2C
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
> -	select S3C2410_PWM
> +	select PWM
> +	select PWM_SAMSUNG
>  	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> @@ -493,7 +494,8 @@ config MACH_RX1950
>  	select S3C24XX_DCLK
>  	select PM_H1940 if PM
>  	select I2C
> -	select S3C2410_PWM
> +	select PWM
> +	select PWM_SAMSUNG
>  	select S3C_DEV_NAND
>  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> --
> 1.7.10
> 
Hi Arnd,

There is following patch for fixing it in my tree now, its reference:

https://lkml.org/lkml/2012/8/8/185

So...?

From: Tushar Behera <tushar.behera@linaro.org>
Subject: [PATCH] ARM: SAMSUNG: Fix compilation error with s3c2410_defconfig

Commit 215c29d3d0e9 ("ARM Samsung: Move s3c pwm driver to pwm framework")
moved Samsung PWM driver to drivers/pwm and the config option to select
this driver has changed.

This patch fixes following build-error with s3c2410_defconfig.

arch/arm/mach-s3c24xx/built-in.o: In function 'rx1950_lcd_power':
arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to 'pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to
'pwm_disable'
arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to 'pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to 'pwm_enable'
arch/arm/mach-s3c24xx/built-in.o: In function 'rx1950_backlight_exit':
arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to 'pwm_free'
arch/arm/mach-s3c24xx/built-in.o: In function 'rx1950_backlight_init':
arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to
'pwm_request'

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
[kgene.kim at samsung.com: re-worked as per review comments]
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s3c24xx/Kconfig |    4 ++--
 arch/arm/plat-samsung/Kconfig |    2 +-
 drivers/pwm/Kconfig           |    6 ++----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e249611..d56b0f7 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
 	select I2C
 	select POWER_SUPPLY
 	select MACH_NEO1973
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
Phone
@@ -493,7 +493,7 @@ config MACH_RX1950
 	select S3C24XX_DCLK
 	select PM_H1940 if PM
 	select I2C
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_NAND
 	select S3C2410_IOTIMING if S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 7aca31c..dcdfb77 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -403,7 +403,7 @@ config S5P_DEV_USB_EHCI
 
 config S3C24XX_PWM
 	bool "PWM device support"
-	select HAVE_PWM
+	select PWM
 	help
 	  Support for exporting the PWM timer blocks via the pwm device
 	  system
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 8fc3808..c74d055 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -58,14 +58,12 @@ config PWM_PXA
 	  will be called pwm-pxa.
 
 config PWM_SAMSUNG
-	tristate "Samsung pwm support"
+	bool "Samsung PWM support"
 	depends on PLAT_SAMSUNG
+	default y
 	help
 	  Generic PWM framework driver for Samsung.
 
-	  To compile this driver as a module, choose M here: the module
-	  will be called pwm-samsung.
-
 config PWM_TEGRA
 	tristate "NVIDIA Tegra PWM support"
 	depends on ARCH_TEGRA
-- 
1.7.4.1

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
  2012-08-08 13:05       ` Dirk Behme
@ 2012-08-08 13:18         ` Fabio Estevam
  -1 siblings, 0 replies; 50+ messages in thread
From: Fabio Estevam @ 2012-08-08 13:18 UTC (permalink / raw)
  To: Dirk Behme
  Cc: Arnd Bergmann, Shawn Guo, arm, Sascha Hauer, linux-arm-kernel,
	linux-kernel, artem.bityutskiy

On Wed, Aug 8, 2012 at 10:05 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:

> Yes. But it seems it's not handled there? I'm trying since ~2 weeks to get
> something like your patch applied to get the broken mainline fixed, but
> unfortunately without success so far.

Let's try once again.

Artem,

Could https://patchwork.kernel.org/patch/1236551/ be applied?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
@ 2012-08-08 13:18         ` Fabio Estevam
  0 siblings, 0 replies; 50+ messages in thread
From: Fabio Estevam @ 2012-08-08 13:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 8, 2012 at 10:05 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:

> Yes. But it seems it's not handled there? I'm trying since ~2 weeks to get
> something like your patch applied to get the broken mainline fixed, but
> unfortunately without success so far.

Let's try once again.

Artem,

Could https://patchwork.kernel.org/patch/1236551/ be applied?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 13:23     ` Daniel Mack
  -1 siblings, 0 replies; 50+ messages in thread
From: Daniel Mack @ 2012-08-08 13:23 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, arm, linux-kernel, v3.2+, Haojian Zhuang

[-- Attachment #1: Type: text/plain, Size: 3073 bytes --]

On 08.08.2012 14:54, Arnd Bergmann wrote:
> The irq_to_gpio function was removed from the pxa platform
> in linux-3.2, and this driver has been broken since.
> 
> Without this patch, building raumfeld_defconfig results in:
> 
> 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' [-Werror=implicit-function-declaration]

I've sent out a slightly different version of such a patch just
yesterday. It deferres mainly in the fact that it uses gpio_to_irq() and
ignores the i2c_client's irq line. That way, there can't be any
inconsitency.

I've appended the patch again - I haven't heard back from Dmitry yet.


Thanks,
Daniel



> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable@vger.kernel.org (v3.2+)
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> ---
>  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 */
> 


[-- Attachment #2: 0001-Input-eeti_ts-pass-gpio-value-instead-of-IRQ.patch --]
[-- Type: text/x-patch, Size: 3730 bytes --]

>From bfb14c1a0417435ebcf5bdebbb94ae6812cb4aee Mon Sep 17 00:00:00 2001
From: Daniel Mack <zonque@gmail.com>
Date: Tue, 7 Aug 2012 17:02:59 +0200
Subject: [PATCH] Input: eeti_ts: pass gpio value instead of IRQ

The EETI touchscreen asserts its IRQ line as soon as it has data in its
internal buffers. The line is automatically deasserted once all data has
been read via I2C. Hence, the driver has to monitor the GPIO line and
cannot simply rely on the interrupt handler reception.

In the current implementation of the driver, irq_to_gpio() is used to
determine the GPIO number from the i2c_client's IRQ value.

As irq_to_gpio() is not available on all platforms, this patch changes
this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
added to the platform_data struct and gpio_to_irq is used to derive the
IRQ from that GPIO. If this fails, bail out. The driver is only able to
work in environments where the touchscreen GPIO can be mapped to an
IRQ.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 drivers/input/touchscreen/eeti_ts.c | 21 +++++++++++++--------
 include/linux/input/eeti_ts.h       |  1 +
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 503c709..908407e 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, 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->irq_gpio) == priv->irq_active_high;
 }
 
 static void eeti_ts_read(struct work_struct *work)
@@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)
 static int __devinit eeti_ts_probe(struct i2c_client *client,
 				   const struct i2c_device_id *idp)
 {
-	struct eeti_ts_platform_data *pdata;
+	struct eeti_ts_platform_data *pdata = client->dev.platform_data;
 	struct eeti_ts_priv *priv;
 	struct input_dev *input;
 	unsigned int irq_flags;
@@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	priv->client = client;
 	priv->input = input;
-	priv->irq = client->irq;
+	priv->irq_gpio = pdata->irq_gpio;
+	priv->irq = gpio_to_irq(pdata->irq_gpio);
 
-	pdata = client->dev.platform_data;
+	err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
+	if (err < 0)
+		goto err1;
 
 	if (pdata)
 		priv->irq_active_high = pdata->irq_active_high;
@@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	err = input_register_device(input);
 	if (err)
-		goto err1;
+		goto err2;
 
 	err = request_irq(priv->irq, eeti_ts_isr, irq_flags,
 			  client->name, priv);
 	if (err) {
 		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
-		goto err2;
+		goto err3;
 	}
 
 	/*
@@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 	device_init_wakeup(&client->dev, 0);
 	return 0;
 
-err2:
+err3:
 	input_unregister_device(input);
 	input = NULL; /* so we dont try to free it below */
+err2:
+	gpio_free(pdata->irq_gpio);
 err1:
 	input_free_device(input);
 	kfree(priv);
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
index f875b31..16625d7 100644
--- a/include/linux/input/eeti_ts.h
+++ b/include/linux/input/eeti_ts.h
@@ -2,6 +2,7 @@
 #define LINUX_INPUT_EETI_TS_H
 
 struct eeti_ts_platform_data {
+	int irq_gpio;
 	unsigned int irq_active_high;
 };
 
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
@ 2012-08-08 13:23     ` Daniel Mack
  0 siblings, 0 replies; 50+ messages in thread
From: Daniel Mack @ 2012-08-08 13:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 08.08.2012 14:54, Arnd Bergmann wrote:
> The irq_to_gpio function was removed from the pxa platform
> in linux-3.2, and this driver has been broken since.
> 
> Without this patch, building raumfeld_defconfig results in:
> 
> 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' [-Werror=implicit-function-declaration]

I've sent out a slightly different version of such a patch just
yesterday. It deferres mainly in the fact that it uses gpio_to_irq() and
ignores the i2c_client's irq line. That way, there can't be any
inconsitency.

I've appended the patch again - I haven't heard back from Dmitry yet.


Thanks,
Daniel



> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable at vger.kernel.org (v3.2+)
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> ---
>  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 */
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Input-eeti_ts-pass-gpio-value-instead-of-IRQ.patch
Type: text/x-patch
Size: 3730 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120808/9725df93/attachment.bin>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 5/6] ARM: integrator: include <linux/export.h
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 13:24     ` Linus Walleij
  -1 siblings, 0 replies; 50+ messages in thread
From: Linus Walleij @ 2012-08-08 13:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, arm, linux-kernel, Russell King

On Wed, Aug 8, 2012 at 2:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> Without this patch, building integrator_defconfig results in:
>
> arch/arm/mach-integrator/core.c:150:1: warning: data definition has no type or storage class [enabled by default]
> arch/arm/mach-integrator/core.c:150:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
> arch/arm/mach-integrator/core.c:150:1: warning: parameter names (without types) in function declaration [enabled by default]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Russell King <linux@arm.linux.org.uk>

Missing a ">" at the end of the subject line, but whatever.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 5/6] ARM: integrator: include <linux/export.h
@ 2012-08-08 13:24     ` Linus Walleij
  0 siblings, 0 replies; 50+ messages in thread
From: Linus Walleij @ 2012-08-08 13:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 8, 2012 at 2:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> Without this patch, building integrator_defconfig results in:
>
> arch/arm/mach-integrator/core.c:150:1: warning: data definition has no type or storage class [enabled by default]
> arch/arm/mach-integrator/core.c:150:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
> arch/arm/mach-integrator/core.c:150:1: warning: parameter names (without types) in function declaration [enabled by default]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Russell King <linux@arm.linux.org.uk>

Missing a ">" at the end of the subject line, but whatever.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 5/6] ARM: integrator: include <linux/export.h
  2012-08-08 13:24     ` Linus Walleij
@ 2012-08-08 14:01       ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:01 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-arm-kernel, arm, linux-kernel, Russell King

On Wednesday 08 August 2012, Linus Walleij wrote:
> Missing a ">" at the end of the subject line, but whatever.
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Fixed the subject and added the Ack. Thanks!

	Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 5/6] ARM: integrator: include <linux/export.h
@ 2012-08-08 14:01       ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 08 August 2012, Linus Walleij wrote:
> Missing a ">" at the end of the subject line, but whatever.
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Fixed the subject and added the Ack. Thanks!

	Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
  2012-08-08 13:23     ` Daniel Mack
@ 2012-08-08 14:19       ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:19 UTC (permalink / raw)
  To: Daniel Mack, Haojian Zhuang
  Cc: linux-arm-kernel, arm, linux-kernel, Dmitry Torokhov,
	Sven Neumann, linux-input

On Wednesday 08 August 2012, Daniel Mack wrote:
> On 08.08.2012 14:54, Arnd Bergmann wrote:
> > The irq_to_gpio function was removed from the pxa platform
> > in linux-3.2, and this driver has been broken since.
> > 
> > Without this patch, building raumfeld_defconfig results in:
> > 
> > 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' [-Werror=implicit-function-declaration]
> 
> I've sent out a slightly different version of such a patch just
> yesterday. It deferres mainly in the fact that it uses gpio_to_irq() and
> ignores the i2c_client's irq line. That way, there can't be any
> inconsitency.
> 
> I've appended the patch again - I haven't heard back from Dmitry yet.
> 

I've taken your patch instead now, because contains the gpio_request_one
call that I was missing and you sent it before me, but I also noticed
that you forgot to change arch/arm/mach-pxa/raumfeld.c along with the
driver. I've put that in there as well now. If Dmitry wants to take this
patch, I'll drop it from my tree, otherwise I'll send it myself.

	Arnd

8<-----
>From a919cfbeb9441f5058feec8f790ef90d9299a448 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 30 Apr 2012 16:21:37 +0000
Subject: [PATCH] Input: eeti_ts: pass gpio value instead of IRQ

The EETI touchscreen asserts its IRQ line as soon as it has data in its
internal buffers. The line is automatically deasserted once all data has
been read via I2C. Hence, the driver has to monitor the GPIO line and
cannot simply rely on the interrupt handler reception.

In the current implementation of the driver, irq_to_gpio() is used to
determine the GPIO number from the i2c_client's IRQ value.

As irq_to_gpio() is not available on all platforms, this patch changes
this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
added to the platform_data struct and gpio_to_irq is used to derive the
IRQ from that GPIO. If this fails, bail out. The driver is only able to
work in environments where the touchscreen GPIO can be mapped to an
IRQ.

Without this patch, building raumfeld_defconfig results in:

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' [-Werror=implicit-function-declaration]

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org (v3.2+)
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Cc: linux-input@vger.kernel.org
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 5905ed1..d89d87ae 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
 
 static struct eeti_ts_platform_data eeti_ts_pdata = {
 	.irq_active_high = 1,
+	.irq_gpio = GPIO_TOUCH_IRQ,
 };
 
 static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
 	.type	= "eeti_ts",
 	.addr	= 0x0a,
-	.irq	= PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
 	.platform_data = &eeti_ts_pdata,
 };
 
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 503c709..908407e 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, 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->irq_gpio) == priv->irq_active_high;
 }
 
 static void eeti_ts_read(struct work_struct *work)
@@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)
 static int __devinit eeti_ts_probe(struct i2c_client *client,
 				   const struct i2c_device_id *idp)
 {
-	struct eeti_ts_platform_data *pdata;
+	struct eeti_ts_platform_data *pdata = client->dev.platform_data;
 	struct eeti_ts_priv *priv;
 	struct input_dev *input;
 	unsigned int irq_flags;
@@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	priv->client = client;
 	priv->input = input;
-	priv->irq = client->irq;
+	priv->irq_gpio = pdata->irq_gpio;
+	priv->irq = gpio_to_irq(pdata->irq_gpio);
 
-	pdata = client->dev.platform_data;
+	err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
+	if (err < 0)
+		goto err1;
 
 	if (pdata)
 		priv->irq_active_high = pdata->irq_active_high;
@@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	err = input_register_device(input);
 	if (err)
-		goto err1;
+		goto err2;
 
 	err = request_irq(priv->irq, eeti_ts_isr, irq_flags,
 			  client->name, priv);
 	if (err) {
 		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
-		goto err2;
+		goto err3;
 	}
 
 	/*
@@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 	device_init_wakeup(&client->dev, 0);
 	return 0;
 
-err2:
+err3:
 	input_unregister_device(input);
 	input = NULL; /* so we dont try to free it below */
+err2:
+	gpio_free(pdata->irq_gpio);
 err1:
 	input_free_device(input);
 	kfree(priv);
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
index f875b31..16625d7 100644
--- a/include/linux/input/eeti_ts.h
+++ b/include/linux/input/eeti_ts.h
@@ -2,6 +2,7 @@
 #define LINUX_INPUT_EETI_TS_H
 
 struct eeti_ts_platform_data {
+	int irq_gpio;
 	unsigned int irq_active_high;
 };
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
@ 2012-08-08 14:19       ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 08 August 2012, Daniel Mack wrote:
> On 08.08.2012 14:54, Arnd Bergmann wrote:
> > The irq_to_gpio function was removed from the pxa platform
> > in linux-3.2, and this driver has been broken since.
> > 
> > Without this patch, building raumfeld_defconfig results in:
> > 
> > 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' [-Werror=implicit-function-declaration]
> 
> I've sent out a slightly different version of such a patch just
> yesterday. It deferres mainly in the fact that it uses gpio_to_irq() and
> ignores the i2c_client's irq line. That way, there can't be any
> inconsitency.
> 
> I've appended the patch again - I haven't heard back from Dmitry yet.
> 

I've taken your patch instead now, because contains the gpio_request_one
call that I was missing and you sent it before me, but I also noticed
that you forgot to change arch/arm/mach-pxa/raumfeld.c along with the
driver. I've put that in there as well now. If Dmitry wants to take this
patch, I'll drop it from my tree, otherwise I'll send it myself.

	Arnd

8<-----
>From a919cfbeb9441f5058feec8f790ef90d9299a448 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 30 Apr 2012 16:21:37 +0000
Subject: [PATCH] Input: eeti_ts: pass gpio value instead of IRQ

The EETI touchscreen asserts its IRQ line as soon as it has data in its
internal buffers. The line is automatically deasserted once all data has
been read via I2C. Hence, the driver has to monitor the GPIO line and
cannot simply rely on the interrupt handler reception.

In the current implementation of the driver, irq_to_gpio() is used to
determine the GPIO number from the i2c_client's IRQ value.

As irq_to_gpio() is not available on all platforms, this patch changes
this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
added to the platform_data struct and gpio_to_irq is used to derive the
IRQ from that GPIO. If this fails, bail out. The driver is only able to
work in environments where the touchscreen GPIO can be mapped to an
IRQ.

Without this patch, building raumfeld_defconfig results in:

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' [-Werror=implicit-function-declaration]

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable at vger.kernel.org (v3.2+)
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Cc: linux-input at vger.kernel.org
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 5905ed1..d89d87ae 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
 
 static struct eeti_ts_platform_data eeti_ts_pdata = {
 	.irq_active_high = 1,
+	.irq_gpio = GPIO_TOUCH_IRQ,
 };
 
 static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
 	.type	= "eeti_ts",
 	.addr	= 0x0a,
-	.irq	= PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
 	.platform_data = &eeti_ts_pdata,
 };
 
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 503c709..908407e 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, 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->irq_gpio) == priv->irq_active_high;
 }
 
 static void eeti_ts_read(struct work_struct *work)
@@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)
 static int __devinit eeti_ts_probe(struct i2c_client *client,
 				   const struct i2c_device_id *idp)
 {
-	struct eeti_ts_platform_data *pdata;
+	struct eeti_ts_platform_data *pdata = client->dev.platform_data;
 	struct eeti_ts_priv *priv;
 	struct input_dev *input;
 	unsigned int irq_flags;
@@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	priv->client = client;
 	priv->input = input;
-	priv->irq = client->irq;
+	priv->irq_gpio = pdata->irq_gpio;
+	priv->irq = gpio_to_irq(pdata->irq_gpio);
 
-	pdata = client->dev.platform_data;
+	err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
+	if (err < 0)
+		goto err1;
 
 	if (pdata)
 		priv->irq_active_high = pdata->irq_active_high;
@@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	err = input_register_device(input);
 	if (err)
-		goto err1;
+		goto err2;
 
 	err = request_irq(priv->irq, eeti_ts_isr, irq_flags,
 			  client->name, priv);
 	if (err) {
 		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
-		goto err2;
+		goto err3;
 	}
 
 	/*
@@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 	device_init_wakeup(&client->dev, 0);
 	return 0;
 
-err2:
+err3:
 	input_unregister_device(input);
 	input = NULL; /* so we dont try to free it below */
+err2:
+	gpio_free(pdata->irq_gpio);
 err1:
 	input_free_device(input);
 	kfree(priv);
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
index f875b31..16625d7 100644
--- a/include/linux/input/eeti_ts.h
+++ b/include/linux/input/eeti_ts.h
@@ -2,6 +2,7 @@
 #define LINUX_INPUT_EETI_TS_H
 
 struct eeti_ts_platform_data {
+	int irq_gpio;
 	unsigned int irq_active_high;
 };
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
  2012-08-08 14:19       ` Arnd Bergmann
@ 2012-08-08 14:22         ` Daniel Mack
  -1 siblings, 0 replies; 50+ messages in thread
From: Daniel Mack @ 2012-08-08 14:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haojian Zhuang, linux-arm-kernel, arm, linux-kernel,
	Dmitry Torokhov, Sven Neumann, linux-input

On 08.08.2012 16:19, Arnd Bergmann wrote:
> On Wednesday 08 August 2012, Daniel Mack wrote:
>> On 08.08.2012 14:54, Arnd Bergmann wrote:
>>> The irq_to_gpio function was removed from the pxa platform
>>> in linux-3.2, and this driver has been broken since.
>>>
>>> Without this patch, building raumfeld_defconfig results in:
>>>
>>> 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' [-Werror=implicit-function-declaration]
>>
>> I've sent out a slightly different version of such a patch just
>> yesterday. It deferres mainly in the fact that it uses gpio_to_irq() and
>> ignores the i2c_client's irq line. That way, there can't be any
>> inconsitency.
>>
>> I've appended the patch again - I haven't heard back from Dmitry yet.
>>
> 
> I've taken your patch instead now, 

Will that go to some other tree than linux-input now?

> because contains the gpio_request_one
> call that I was missing and you sent it before me, but I also noticed
> that you forgot to change arch/arm/mach-pxa/raumfeld.c along with the
> driver. I've put that in there as well now. If Dmitry wants to take this
> patch, I'll drop it from my tree, otherwise I'll send it myself.

Forget about that raumfeld.c part for now. I'm in the process of
replacing all that code with DT bindings and wanted to avoid updates to
that code :)

Btw - I have a patch ready that adds eeti_ts DT bindings. I would submit
that once Dmitry (or you) has taken the other one.



Daniel


> 8<-----
> From a919cfbeb9441f5058feec8f790ef90d9299a448 Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Mon, 30 Apr 2012 16:21:37 +0000
> Subject: [PATCH] Input: eeti_ts: pass gpio value instead of IRQ
> 
> The EETI touchscreen asserts its IRQ line as soon as it has data in its
> internal buffers. The line is automatically deasserted once all data has
> been read via I2C. Hence, the driver has to monitor the GPIO line and
> cannot simply rely on the interrupt handler reception.
> 
> In the current implementation of the driver, irq_to_gpio() is used to
> determine the GPIO number from the i2c_client's IRQ value.
> 
> As irq_to_gpio() is not available on all platforms, this patch changes
> this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
> added to the platform_data struct and gpio_to_irq is used to derive the
> IRQ from that GPIO. If this fails, bail out. The driver is only able to
> work in environments where the touchscreen GPIO can be mapped to an
> IRQ.
> 
> Without this patch, building raumfeld_defconfig results in:
> 
> 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' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable@vger.kernel.org (v3.2+)
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Sven Neumann <s.neumann@raumfeld.com>
> Cc: linux-input@vger.kernel.org
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> 
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 5905ed1..d89d87ae 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
>  
>  static struct eeti_ts_platform_data eeti_ts_pdata = {
>  	.irq_active_high = 1,
> +	.irq_gpio = GPIO_TOUCH_IRQ,
>  };
>  
>  static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
>  	.type	= "eeti_ts",
>  	.addr	= 0x0a,
> -	.irq	= PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
>  	.platform_data = &eeti_ts_pdata,
>  };
>  
> diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
> index 503c709..908407e 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, 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->irq_gpio) == priv->irq_active_high;
>  }
>  
>  static void eeti_ts_read(struct work_struct *work)
> @@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)
>  static int __devinit eeti_ts_probe(struct i2c_client *client,
>  				   const struct i2c_device_id *idp)
>  {
> -	struct eeti_ts_platform_data *pdata;
> +	struct eeti_ts_platform_data *pdata = client->dev.platform_data;
>  	struct eeti_ts_priv *priv;
>  	struct input_dev *input;
>  	unsigned int irq_flags;
> @@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>  
>  	priv->client = client;
>  	priv->input = input;
> -	priv->irq = client->irq;
> +	priv->irq_gpio = pdata->irq_gpio;
> +	priv->irq = gpio_to_irq(pdata->irq_gpio);
>  
> -	pdata = client->dev.platform_data;
> +	err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
> +	if (err < 0)
> +		goto err1;
>  
>  	if (pdata)
>  		priv->irq_active_high = pdata->irq_active_high;
> @@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>  
>  	err = input_register_device(input);
>  	if (err)
> -		goto err1;
> +		goto err2;
>  
>  	err = request_irq(priv->irq, eeti_ts_isr, irq_flags,
>  			  client->name, priv);
>  	if (err) {
>  		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
> -		goto err2;
> +		goto err3;
>  	}
>  
>  	/*
> @@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>  	device_init_wakeup(&client->dev, 0);
>  	return 0;
>  
> -err2:
> +err3:
>  	input_unregister_device(input);
>  	input = NULL; /* so we dont try to free it below */
> +err2:
> +	gpio_free(pdata->irq_gpio);
>  err1:
>  	input_free_device(input);
>  	kfree(priv);
> diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
> index f875b31..16625d7 100644
> --- a/include/linux/input/eeti_ts.h
> +++ b/include/linux/input/eeti_ts.h
> @@ -2,6 +2,7 @@
>  #define LINUX_INPUT_EETI_TS_H
>  
>  struct eeti_ts_platform_data {
> +	int irq_gpio;
>  	unsigned int irq_active_high;
>  };
>  
> 


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
@ 2012-08-08 14:22         ` Daniel Mack
  0 siblings, 0 replies; 50+ messages in thread
From: Daniel Mack @ 2012-08-08 14:22 UTC (permalink / raw)
  To: linux-arm-kernel

On 08.08.2012 16:19, Arnd Bergmann wrote:
> On Wednesday 08 August 2012, Daniel Mack wrote:
>> On 08.08.2012 14:54, Arnd Bergmann wrote:
>>> The irq_to_gpio function was removed from the pxa platform
>>> in linux-3.2, and this driver has been broken since.
>>>
>>> Without this patch, building raumfeld_defconfig results in:
>>>
>>> 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' [-Werror=implicit-function-declaration]
>>
>> I've sent out a slightly different version of such a patch just
>> yesterday. It deferres mainly in the fact that it uses gpio_to_irq() and
>> ignores the i2c_client's irq line. That way, there can't be any
>> inconsitency.
>>
>> I've appended the patch again - I haven't heard back from Dmitry yet.
>>
> 
> I've taken your patch instead now, 

Will that go to some other tree than linux-input now?

> because contains the gpio_request_one
> call that I was missing and you sent it before me, but I also noticed
> that you forgot to change arch/arm/mach-pxa/raumfeld.c along with the
> driver. I've put that in there as well now. If Dmitry wants to take this
> patch, I'll drop it from my tree, otherwise I'll send it myself.

Forget about that raumfeld.c part for now. I'm in the process of
replacing all that code with DT bindings and wanted to avoid updates to
that code :)

Btw - I have a patch ready that adds eeti_ts DT bindings. I would submit
that once Dmitry (or you) has taken the other one.



Daniel


> 8<-----
> From a919cfbeb9441f5058feec8f790ef90d9299a448 Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Mon, 30 Apr 2012 16:21:37 +0000
> Subject: [PATCH] Input: eeti_ts: pass gpio value instead of IRQ
> 
> The EETI touchscreen asserts its IRQ line as soon as it has data in its
> internal buffers. The line is automatically deasserted once all data has
> been read via I2C. Hence, the driver has to monitor the GPIO line and
> cannot simply rely on the interrupt handler reception.
> 
> In the current implementation of the driver, irq_to_gpio() is used to
> determine the GPIO number from the i2c_client's IRQ value.
> 
> As irq_to_gpio() is not available on all platforms, this patch changes
> this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
> added to the platform_data struct and gpio_to_irq is used to derive the
> IRQ from that GPIO. If this fails, bail out. The driver is only able to
> work in environments where the touchscreen GPIO can be mapped to an
> IRQ.
> 
> Without this patch, building raumfeld_defconfig results in:
> 
> 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' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable at vger.kernel.org (v3.2+)
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Sven Neumann <s.neumann@raumfeld.com>
> Cc: linux-input at vger.kernel.org
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> 
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 5905ed1..d89d87ae 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
>  
>  static struct eeti_ts_platform_data eeti_ts_pdata = {
>  	.irq_active_high = 1,
> +	.irq_gpio = GPIO_TOUCH_IRQ,
>  };
>  
>  static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
>  	.type	= "eeti_ts",
>  	.addr	= 0x0a,
> -	.irq	= PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
>  	.platform_data = &eeti_ts_pdata,
>  };
>  
> diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
> index 503c709..908407e 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, 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->irq_gpio) == priv->irq_active_high;
>  }
>  
>  static void eeti_ts_read(struct work_struct *work)
> @@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)
>  static int __devinit eeti_ts_probe(struct i2c_client *client,
>  				   const struct i2c_device_id *idp)
>  {
> -	struct eeti_ts_platform_data *pdata;
> +	struct eeti_ts_platform_data *pdata = client->dev.platform_data;
>  	struct eeti_ts_priv *priv;
>  	struct input_dev *input;
>  	unsigned int irq_flags;
> @@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>  
>  	priv->client = client;
>  	priv->input = input;
> -	priv->irq = client->irq;
> +	priv->irq_gpio = pdata->irq_gpio;
> +	priv->irq = gpio_to_irq(pdata->irq_gpio);
>  
> -	pdata = client->dev.platform_data;
> +	err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
> +	if (err < 0)
> +		goto err1;
>  
>  	if (pdata)
>  		priv->irq_active_high = pdata->irq_active_high;
> @@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>  
>  	err = input_register_device(input);
>  	if (err)
> -		goto err1;
> +		goto err2;
>  
>  	err = request_irq(priv->irq, eeti_ts_isr, irq_flags,
>  			  client->name, priv);
>  	if (err) {
>  		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
> -		goto err2;
> +		goto err3;
>  	}
>  
>  	/*
> @@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
>  	device_init_wakeup(&client->dev, 0);
>  	return 0;
>  
> -err2:
> +err3:
>  	input_unregister_device(input);
>  	input = NULL; /* so we dont try to free it below */
> +err2:
> +	gpio_free(pdata->irq_gpio);
>  err1:
>  	input_free_device(input);
>  	kfree(priv);
> diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
> index f875b31..16625d7 100644
> --- a/include/linux/input/eeti_ts.h
> +++ b/include/linux/input/eeti_ts.h
> @@ -2,6 +2,7 @@
>  #define LINUX_INPUT_EETI_TS_H
>  
>  struct eeti_ts_platform_data {
> +	int irq_gpio;
>  	unsigned int irq_active_high;
>  };
>  
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 4/6] ARM: s3c24xx: use new PWM driver
  2012-08-08 13:10     ` Kukjin Kim
@ 2012-08-08 14:34       ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:34 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-arm-kernel, arm, linux-kernel, Tushar Behera

On Wednesday 08 August 2012, Kukjin Kim wrote:

> diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
> index e249611..d56b0f7 100644
> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
>  	select I2C
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> @@ -493,7 +493,7 @@ config MACH_RX1950
>  	select S3C24XX_DCLK
>  	select PM_H1940 if PM
>  	select I2C
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_NAND
>  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 7aca31c..dcdfb77 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -403,7 +403,7 @@ config S5P_DEV_USB_EHCI
>  
>  config S3C24XX_PWM
>  	bool "PWM device support"
> -	select HAVE_PWM
> +	select PWM
>  	help
>  	  Support for exporting the PWM timer blocks via the pwm device
>  	  system
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index 8fc3808..c74d055 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -58,14 +58,12 @@ config PWM_PXA
>  	  will be called pwm-pxa.
>  
>  config PWM_SAMSUNG
> -	tristate "Samsung pwm support"
> +	bool "Samsung PWM support"
>  	depends on PLAT_SAMSUNG
> +	default y
>  	help
>  	  Generic PWM framework driver for Samsung.
>  
> -	  To compile this driver as a module, choose M here: the module
> -	  will be called pwm-samsung.
> -
>  config PWM_TEGRA
>  	tristate "NVIDIA Tegra PWM support"
>  	depends on ARCH_TEGRA

This approach has two disadvantages compared to mine:

* When building for the samsung platforms other than rx1950 or gta02,
  you can no longer have the PWM driver as a loadable module, for no
  good reason.

* It is still possible to manually disable PWM_SAMSUNG, even on
  rx1950 and gta02, because the Kconfig symbol is visible.

I've added a "Reported-by: Tushar Behera <tushar.behera@linaro.org>"
line to my version of the patch, but I would prefer to keep that
approach. I have also changed the patch to use the S3C24XX_PWM
symbol because that lets everyone migrate the defconfig files.

Do you want to give this patch some more testing, or should I keep
it in arm-soc?

	Arnd
---
>From 438b0cf94adb2528bdeeb71314f7be16512ea5b1 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Sat, 4 Aug 2012 07:52:19 +0000
Subject: [PATCH] ARM: s3c24xx: use new PWM driver

The samsung PWM driver has moved to the new PWM subsystem, which
changed the Kconfig symbol for that driver, but the rx1950 and
gta02 boards still uses the old one.

Without this patch, building s3c2410_defconfig results in:

arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to `pwm_disable'
arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to `pwm_enable'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to `pwm_request'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Tushar Behera <tushar.behera@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e249611..d56b0f7 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
 	select I2C
 	select POWER_SUPPLY
 	select MACH_NEO1973
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
@@ -493,7 +493,7 @@ config MACH_RX1950
 	select S3C24XX_DCLK
 	select PM_H1940 if PM
 	select I2C
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_NAND
 	select S3C2410_IOTIMING if S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 7aca31c..9c3b90c 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -403,7 +403,8 @@ config S5P_DEV_USB_EHCI
 
 config S3C24XX_PWM
 	bool "PWM device support"
-	select HAVE_PWM
+	select PWM
+	select PWM_SAMSUNG
 	help
 	  Support for exporting the PWM timer blocks via the pwm device
 	  system


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 4/6] ARM: s3c24xx: use new PWM driver
@ 2012-08-08 14:34       ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 08 August 2012, Kukjin Kim wrote:

> diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
> index e249611..d56b0f7 100644
> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
>  	select I2C
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> @@ -493,7 +493,7 @@ config MACH_RX1950
>  	select S3C24XX_DCLK
>  	select PM_H1940 if PM
>  	select I2C
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_NAND
>  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 7aca31c..dcdfb77 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -403,7 +403,7 @@ config S5P_DEV_USB_EHCI
>  
>  config S3C24XX_PWM
>  	bool "PWM device support"
> -	select HAVE_PWM
> +	select PWM
>  	help
>  	  Support for exporting the PWM timer blocks via the pwm device
>  	  system
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index 8fc3808..c74d055 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -58,14 +58,12 @@ config PWM_PXA
>  	  will be called pwm-pxa.
>  
>  config PWM_SAMSUNG
> -	tristate "Samsung pwm support"
> +	bool "Samsung PWM support"
>  	depends on PLAT_SAMSUNG
> +	default y
>  	help
>  	  Generic PWM framework driver for Samsung.
>  
> -	  To compile this driver as a module, choose M here: the module
> -	  will be called pwm-samsung.
> -
>  config PWM_TEGRA
>  	tristate "NVIDIA Tegra PWM support"
>  	depends on ARCH_TEGRA

This approach has two disadvantages compared to mine:

* When building for the samsung platforms other than rx1950 or gta02,
  you can no longer have the PWM driver as a loadable module, for no
  good reason.

* It is still possible to manually disable PWM_SAMSUNG, even on
  rx1950 and gta02, because the Kconfig symbol is visible.

I've added a "Reported-by: Tushar Behera <tushar.behera@linaro.org>"
line to my version of the patch, but I would prefer to keep that
approach. I have also changed the patch to use the S3C24XX_PWM
symbol because that lets everyone migrate the defconfig files.

Do you want to give this patch some more testing, or should I keep
it in arm-soc?

	Arnd
---
>From 438b0cf94adb2528bdeeb71314f7be16512ea5b1 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Sat, 4 Aug 2012 07:52:19 +0000
Subject: [PATCH] ARM: s3c24xx: use new PWM driver

The samsung PWM driver has moved to the new PWM subsystem, which
changed the Kconfig symbol for that driver, but the rx1950 and
gta02 boards still uses the old one.

Without this patch, building s3c2410_defconfig results in:

arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to `pwm_disable'
arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to `pwm_config'
arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to `pwm_enable'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to `pwm_request'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Tushar Behera <tushar.behera@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e249611..d56b0f7 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
 	select I2C
 	select POWER_SUPPLY
 	select MACH_NEO1973
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
@@ -493,7 +493,7 @@ config MACH_RX1950
 	select S3C24XX_DCLK
 	select PM_H1940 if PM
 	select I2C
-	select S3C2410_PWM
+	select S3C24XX_PWM
 	select S3C_DEV_NAND
 	select S3C2410_IOTIMING if S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 7aca31c..9c3b90c 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -403,7 +403,8 @@ config S5P_DEV_USB_EHCI
 
 config S3C24XX_PWM
 	bool "PWM device support"
-	select HAVE_PWM
+	select PWM
+	select PWM_SAMSUNG
 	help
 	  Support for exporting the PWM timer blocks via the pwm device
 	  system

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
  2012-08-08 14:22         ` Daniel Mack
@ 2012-08-08 14:38           ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:38 UTC (permalink / raw)
  To: Daniel Mack
  Cc: Haojian Zhuang, linux-arm-kernel, arm, linux-kernel,
	Dmitry Torokhov, Sven Neumann, linux-input

On Wednesday 08 August 2012, Daniel Mack wrote:
> > 
> > I've taken your patch instead now, 
> 
> Will that go to some other tree than linux-input now?

I have it in the arm-soc tree for now, but I don't really care
which tree it goes through, as long as it does. I've kept a
version of this patch in one branch with random fixes that
I try to clear out now.

Other than that, I'm fine with whatever Dmitry prefers.

	Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
@ 2012-08-08 14:38           ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 08 August 2012, Daniel Mack wrote:
> > 
> > I've taken your patch instead now, 
> 
> Will that go to some other tree than linux-input now?

I have it in the arm-soc tree for now, but I don't really care
which tree it goes through, as long as it does. I've kept a
version of this patch in one branch with random fixes that
I try to clear out now.

Other than that, I'm fine with whatever Dmitry prefers.

	Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 15:24     ` Haojian Zhuang
  -1 siblings, 0 replies; 50+ messages in thread
From: Haojian Zhuang @ 2012-08-08 15:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, arm, linux-kernel, v3.2+, Daniel Mack

On Wed, Aug 8, 2012 at 8:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The irq_to_gpio function was removed from the pxa platform
> in linux-3.2, and this driver has been broken since.
>
> Without this patch, building raumfeld_defconfig results in:
>
> 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' [-Werror=implicit-function-declaration]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable@vger.kernel.org (v3.2+)
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> ---
>  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(-)
>

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
@ 2012-08-08 15:24     ` Haojian Zhuang
  0 siblings, 0 replies; 50+ messages in thread
From: Haojian Zhuang @ 2012-08-08 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 8, 2012 at 8:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The irq_to_gpio function was removed from the pxa platform
> in linux-3.2, and this driver has been broken since.
>
> Without this patch, building raumfeld_defconfig results in:
>
> 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' [-Werror=implicit-function-declaration]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable at vger.kernel.org (v3.2+)
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> ---
>  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(-)
>

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 1/6] ARM: pxa: remove irq_to_gpio from ezx-pcap driver
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 15:27     ` Haojian Zhuang
  -1 siblings, 0 replies; 50+ messages in thread
From: Haojian Zhuang @ 2012-08-08 15:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, v3.2+, Samuel Ortiz, Daniel Ribeiro

On Wed, Aug 8, 2012 at 8:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The irq_to_gpio function was removed from the pxa platform
> in linux-3.2, and this driver has been broken since.
>
> There is actually no in-tree user of this driver that adds
> this platform device, but the driver can and does get enabled
> on some platforms.
>
> Without this patch, building ezx_defconfig results in:
>
> drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work':
> drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable@vger.kernel.org (v3.2+)
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Daniel Ribeiro <drwyrm@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> ---
>  drivers/mfd/ezx-pcap.c       |    2 +-
>  include/linux/mfd/ezx-pcap.h |    1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 1/6] ARM: pxa: remove irq_to_gpio from ezx-pcap driver
@ 2012-08-08 15:27     ` Haojian Zhuang
  0 siblings, 0 replies; 50+ messages in thread
From: Haojian Zhuang @ 2012-08-08 15:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 8, 2012 at 8:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The irq_to_gpio function was removed from the pxa platform
> in linux-3.2, and this driver has been broken since.
>
> There is actually no in-tree user of this driver that adds
> this platform device, but the driver can and does get enabled
> on some platforms.
>
> Without this patch, building ezx_defconfig results in:
>
> drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work':
> drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable at vger.kernel.org (v3.2+)
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Daniel Ribeiro <drwyrm@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> ---
>  drivers/mfd/ezx-pcap.c       |    2 +-
>  include/linux/mfd/ezx-pcap.h |    1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code
  2012-08-08 12:54   ` Arnd Bergmann
@ 2012-08-08 15:36     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 50+ messages in thread
From: Russell King - ARM Linux @ 2012-08-08 15:36 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, arm, linux-kernel

On Wed, Aug 08, 2012 at 02:54:50PM +0200, Arnd Bergmann wrote:
> The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
> file stopped working because of that.
> 
> Without this patch, building hackkit_defconfig results in:
> 
> arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
> arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]

NAK.  Should be linux/io.h

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code
@ 2012-08-08 15:36     ` Russell King - ARM Linux
  0 siblings, 0 replies; 50+ messages in thread
From: Russell King - ARM Linux @ 2012-08-08 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 08, 2012 at 02:54:50PM +0200, Arnd Bergmann wrote:
> The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
> file stopped working because of that.
> 
> Without this patch, building hackkit_defconfig results in:
> 
> arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
> arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]

NAK.  Should be linux/io.h

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code
  2012-08-08 15:36     ` Russell King - ARM Linux
@ 2012-08-08 17:17       ` Arnd Bergmann
  -1 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 17:17 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, arm, linux-kernel

On Wednesday 08 August 2012, Russell King - ARM Linux wrote:
> On Wed, Aug 08, 2012 at 02:54:50PM +0200, Arnd Bergmann wrote:
> > The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
> > file stopped working because of that.
> > 
> > Without this patch, building hackkit_defconfig results in:
> > 
> > arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
> > arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]
> 
> NAK.  Should be linux/io.h


Right, fixed now.

Thanks for having a look over this!

	Arnd


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code
@ 2012-08-08 17:17       ` Arnd Bergmann
  0 siblings, 0 replies; 50+ messages in thread
From: Arnd Bergmann @ 2012-08-08 17:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 08 August 2012, Russell King - ARM Linux wrote:
> On Wed, Aug 08, 2012 at 02:54:50PM +0200, Arnd Bergmann wrote:
> > The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
> > file stopped working because of that.
> > 
> > Without this patch, building hackkit_defconfig results in:
> > 
> > arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
> > arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]
> 
> NAK.  Should be linux/io.h


Right, fixed now.

Thanks for having a look over this!

	Arnd

^ permalink raw reply	[flat|nested] 50+ messages in thread

* RE: [PATCH 4/6] ARM: s3c24xx: use new PWM driver
  2012-08-08 14:34       ` Arnd Bergmann
@ 2012-08-09  5:31         ` Kukjin Kim
  -1 siblings, 0 replies; 50+ messages in thread
From: Kukjin Kim @ 2012-08-09  5:31 UTC (permalink / raw)
  To: 'Arnd Bergmann'
  Cc: linux-arm-kernel, arm, linux-kernel, 'Tushar Behera'

Arnd Bergmann wrote:
> 
> On Wednesday 08 August 2012, Kukjin Kim wrote:
> 
> > diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-
> s3c24xx/Kconfig
> > index e249611..d56b0f7 100644
> > --- a/arch/arm/mach-s3c24xx/Kconfig
> > +++ b/arch/arm/mach-s3c24xx/Kconfig
> > @@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
> >  	select I2C
> >  	select POWER_SUPPLY
> >  	select MACH_NEO1973
> > -	select S3C2410_PWM
> > +	select S3C24XX_PWM
> >  	select S3C_DEV_USB_HOST
> >  	help
> >  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> > Phone
> > @@ -493,7 +493,7 @@ config MACH_RX1950
> >  	select S3C24XX_DCLK
> >  	select PM_H1940 if PM
> >  	select I2C
> > -	select S3C2410_PWM
> > +	select S3C24XX_PWM
> >  	select S3C_DEV_NAND
> >  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
> >  	select S3C2440_XTAL_16934400
> > diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-
> samsung/Kconfig
> > index 7aca31c..dcdfb77 100644
> > --- a/arch/arm/plat-samsung/Kconfig
> > +++ b/arch/arm/plat-samsung/Kconfig
> > @@ -403,7 +403,7 @@ config S5P_DEV_USB_EHCI
> >
> >  config S3C24XX_PWM
> >  	bool "PWM device support"
> > -	select HAVE_PWM
> > +	select PWM
> >  	help
> >  	  Support for exporting the PWM timer blocks via the pwm device
> >  	  system
> > diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> > index 8fc3808..c74d055 100644
> > --- a/drivers/pwm/Kconfig
> > +++ b/drivers/pwm/Kconfig
> > @@ -58,14 +58,12 @@ config PWM_PXA
> >  	  will be called pwm-pxa.
> >
> >  config PWM_SAMSUNG
> > -	tristate "Samsung pwm support"
> > +	bool "Samsung PWM support"
> >  	depends on PLAT_SAMSUNG
> > +	default y
> >  	help
> >  	  Generic PWM framework driver for Samsung.
> >
> > -	  To compile this driver as a module, choose M here: the module
> > -	  will be called pwm-samsung.
> > -
> >  config PWM_TEGRA
> >  	tristate "NVIDIA Tegra PWM support"
> >  	depends on ARCH_TEGRA
> 
> This approach has two disadvantages compared to mine:
> 
> * When building for the samsung platforms other than rx1950 or gta02,
>   you can no longer have the PWM driver as a loadable module, for no
>   good reason.
> 
OK I see, I'm still thinking the PWM driver can be selected in kernel
menuconfig though.

My concept is when PWM is selected on Samsung platforms by defconfig or
manually enabling, PWM_SAMSUNG is selected automatically. In addition,
current Samsung PWM driver cannot support module now because pwm_init() is
called by arch_initcall().

I think, we can remove S3C24XX_PWM and just select PWM (or using HAVE_PWM)
and PWM_SAMSUNG can be selected by enabling PWM in samsung platform next
time :-)

> * It is still possible to manually disable PWM_SAMSUNG, even on
>   rx1950 and gta02, because the Kconfig symbol is visible.
> 
Yeah you're right, makes sense.

> I've added a "Reported-by: Tushar Behera <tushar.behera@linaro.org>"
> line to my version of the patch, but I would prefer to keep that
> approach. I have also changed the patch to use the S3C24XX_PWM
> symbol because that lets everyone migrate the defconfig files.
> 
OK.

> Do you want to give this patch some more testing, or should I keep
> it in arm-soc?
> 
Looks good to me, please keep going on.

> ---
> From 438b0cf94adb2528bdeeb71314f7be16512ea5b1 Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Sat, 4 Aug 2012 07:52:19 +0000
> Subject: [PATCH] ARM: s3c24xx: use new PWM driver
> 
> The samsung PWM driver has moved to the new PWM subsystem, which
> changed the Kconfig symbol for that driver, but the rx1950 and
> gta02 boards still uses the old one.
> 
> Without this patch, building s3c2410_defconfig results in:
> 
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
> arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to
> `pwm_disable'
> arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to
> `pwm_enable'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
> arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
> arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to
> `pwm_request'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Reported-by: Tushar Behera <tushar.behera@linaro.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> 
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

> diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
> index e249611..d56b0f7 100644
> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
>  	select I2C
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> @@ -493,7 +493,7 @@ config MACH_RX1950
>  	select S3C24XX_DCLK
>  	select PM_H1940 if PM
>  	select I2C
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_NAND
>  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 7aca31c..9c3b90c 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -403,7 +403,8 @@ config S5P_DEV_USB_EHCI
> 
>  config S3C24XX_PWM
>  	bool "PWM device support"
> -	select HAVE_PWM
> +	select PWM
> +	select PWM_SAMSUNG
>  	help
>  	  Support for exporting the PWM timer blocks via the pwm device
>  	  system


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 4/6] ARM: s3c24xx: use new PWM driver
@ 2012-08-09  5:31         ` Kukjin Kim
  0 siblings, 0 replies; 50+ messages in thread
From: Kukjin Kim @ 2012-08-09  5:31 UTC (permalink / raw)
  To: linux-arm-kernel

Arnd Bergmann wrote:
> 
> On Wednesday 08 August 2012, Kukjin Kim wrote:
> 
> > diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-
> s3c24xx/Kconfig
> > index e249611..d56b0f7 100644
> > --- a/arch/arm/mach-s3c24xx/Kconfig
> > +++ b/arch/arm/mach-s3c24xx/Kconfig
> > @@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
> >  	select I2C
> >  	select POWER_SUPPLY
> >  	select MACH_NEO1973
> > -	select S3C2410_PWM
> > +	select S3C24XX_PWM
> >  	select S3C_DEV_USB_HOST
> >  	help
> >  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> > Phone
> > @@ -493,7 +493,7 @@ config MACH_RX1950
> >  	select S3C24XX_DCLK
> >  	select PM_H1940 if PM
> >  	select I2C
> > -	select S3C2410_PWM
> > +	select S3C24XX_PWM
> >  	select S3C_DEV_NAND
> >  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
> >  	select S3C2440_XTAL_16934400
> > diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-
> samsung/Kconfig
> > index 7aca31c..dcdfb77 100644
> > --- a/arch/arm/plat-samsung/Kconfig
> > +++ b/arch/arm/plat-samsung/Kconfig
> > @@ -403,7 +403,7 @@ config S5P_DEV_USB_EHCI
> >
> >  config S3C24XX_PWM
> >  	bool "PWM device support"
> > -	select HAVE_PWM
> > +	select PWM
> >  	help
> >  	  Support for exporting the PWM timer blocks via the pwm device
> >  	  system
> > diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> > index 8fc3808..c74d055 100644
> > --- a/drivers/pwm/Kconfig
> > +++ b/drivers/pwm/Kconfig
> > @@ -58,14 +58,12 @@ config PWM_PXA
> >  	  will be called pwm-pxa.
> >
> >  config PWM_SAMSUNG
> > -	tristate "Samsung pwm support"
> > +	bool "Samsung PWM support"
> >  	depends on PLAT_SAMSUNG
> > +	default y
> >  	help
> >  	  Generic PWM framework driver for Samsung.
> >
> > -	  To compile this driver as a module, choose M here: the module
> > -	  will be called pwm-samsung.
> > -
> >  config PWM_TEGRA
> >  	tristate "NVIDIA Tegra PWM support"
> >  	depends on ARCH_TEGRA
> 
> This approach has two disadvantages compared to mine:
> 
> * When building for the samsung platforms other than rx1950 or gta02,
>   you can no longer have the PWM driver as a loadable module, for no
>   good reason.
> 
OK I see, I'm still thinking the PWM driver can be selected in kernel
menuconfig though.

My concept is when PWM is selected on Samsung platforms by defconfig or
manually enabling, PWM_SAMSUNG is selected automatically. In addition,
current Samsung PWM driver cannot support module now because pwm_init() is
called by arch_initcall().

I think, we can remove S3C24XX_PWM and just select PWM (or using HAVE_PWM)
and PWM_SAMSUNG can be selected by enabling PWM in samsung platform next
time :-)

> * It is still possible to manually disable PWM_SAMSUNG, even on
>   rx1950 and gta02, because the Kconfig symbol is visible.
> 
Yeah you're right, makes sense.

> I've added a "Reported-by: Tushar Behera <tushar.behera@linaro.org>"
> line to my version of the patch, but I would prefer to keep that
> approach. I have also changed the patch to use the S3C24XX_PWM
> symbol because that lets everyone migrate the defconfig files.
> 
OK.

> Do you want to give this patch some more testing, or should I keep
> it in arm-soc?
> 
Looks good to me, please keep going on.

> ---
> From 438b0cf94adb2528bdeeb71314f7be16512ea5b1 Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Sat, 4 Aug 2012 07:52:19 +0000
> Subject: [PATCH] ARM: s3c24xx: use new PWM driver
> 
> The samsung PWM driver has moved to the new PWM subsystem, which
> changed the Kconfig symbol for that driver, but the rx1950 and
> gta02 boards still uses the old one.
> 
> Without this patch, building s3c2410_defconfig results in:
> 
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
> arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to
> `pwm_disable'
> arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to
> `pwm_config'
> arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to
> `pwm_enable'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
> arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
> arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
> arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to
> `pwm_request'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Reported-by: Tushar Behera <tushar.behera@linaro.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> 
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

> diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
> index e249611..d56b0f7 100644
> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
>  	select I2C
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> @@ -493,7 +493,7 @@ config MACH_RX1950
>  	select S3C24XX_DCLK
>  	select PM_H1940 if PM
>  	select I2C
> -	select S3C2410_PWM
> +	select S3C24XX_PWM
>  	select S3C_DEV_NAND
>  	select S3C2410_IOTIMING if S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 7aca31c..9c3b90c 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -403,7 +403,8 @@ config S5P_DEV_USB_EHCI
> 
>  config S3C24XX_PWM
>  	bool "PWM device support"
> -	select HAVE_PWM
> +	select PWM
> +	select PWM_SAMSUNG
>  	help
>  	  Support for exporting the PWM timer blocks via the pwm device
>  	  system

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
  2012-08-08 13:18         ` Fabio Estevam
@ 2012-08-13 10:22           ` Artem Bityutskiy
  -1 siblings, 0 replies; 50+ messages in thread
From: Artem Bityutskiy @ 2012-08-13 10:22 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Dirk Behme, Arnd Bergmann, Shawn Guo, arm, Sascha Hauer,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

On Wed, 2012-08-08 at 10:18 -0300, Fabio Estevam wrote:
> On Wed, Aug 8, 2012 at 10:05 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> 
> > Yes. But it seems it's not handled there? I'm trying since ~2 weeks to get
> > something like your patch applied to get the broken mainline fixed, but
> > unfortunately without success so far.
> 
> Let's try once again.
> 
> Artem,
> 
> Could https://patchwork.kernel.org/patch/1236551/ be applied?

I will get to that. I was busy and also having vacation, so I have a
huge back-log, sorry.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma
@ 2012-08-13 10:22           ` Artem Bityutskiy
  0 siblings, 0 replies; 50+ messages in thread
From: Artem Bityutskiy @ 2012-08-13 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2012-08-08 at 10:18 -0300, Fabio Estevam wrote:
> On Wed, Aug 8, 2012 at 10:05 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> 
> > Yes. But it seems it's not handled there? I'm trying since ~2 weeks to get
> > something like your patch applied to get the broken mainline fixed, but
> > unfortunately without success so far.
> 
> Let's try once again.
> 
> Artem,
> 
> Could https://patchwork.kernel.org/patch/1236551/ be applied?

I will get to that. I was busy and also having vacation, so I have a
huge back-log, sorry.

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120813/702c4fd6/attachment.sig>

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2012-08-13 10:22 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 12:54 [PATCH 0/6] ARM: defconfig build errors Arnd Bergmann
2012-08-08 12:54 ` Arnd Bergmann
2012-08-08 12:54 ` [PATCH 1/6] ARM: pxa: remove irq_to_gpio from ezx-pcap driver Arnd Bergmann
2012-08-08 12:54   ` Arnd Bergmann
2012-08-08 15:27   ` Haojian Zhuang
2012-08-08 15:27     ` Haojian Zhuang
2012-08-08 12:54 ` [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver Arnd Bergmann
2012-08-08 12:54   ` Arnd Bergmann
2012-08-08 13:23   ` Daniel Mack
2012-08-08 13:23     ` Daniel Mack
2012-08-08 14:19     ` Arnd Bergmann
2012-08-08 14:19       ` Arnd Bergmann
2012-08-08 14:22       ` Daniel Mack
2012-08-08 14:22         ` Daniel Mack
2012-08-08 14:38         ` Arnd Bergmann
2012-08-08 14:38           ` Arnd Bergmann
2012-08-08 15:24   ` Haojian Zhuang
2012-08-08 15:24     ` Haojian Zhuang
2012-08-08 12:54 ` [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code Arnd Bergmann
2012-08-08 12:54   ` Arnd Bergmann
2012-08-08 15:36   ` Russell King - ARM Linux
2012-08-08 15:36     ` Russell King - ARM Linux
2012-08-08 17:17     ` Arnd Bergmann
2012-08-08 17:17       ` Arnd Bergmann
2012-08-08 12:54 ` [PATCH 4/6] ARM: s3c24xx: use new PWM driver Arnd Bergmann
2012-08-08 12:54   ` Arnd Bergmann
2012-08-08 13:10   ` Kukjin Kim
2012-08-08 13:10     ` Kukjin Kim
2012-08-08 14:34     ` Arnd Bergmann
2012-08-08 14:34       ` Arnd Bergmann
2012-08-09  5:31       ` Kukjin Kim
2012-08-09  5:31         ` Kukjin Kim
2012-08-08 12:54 ` [PATCH 5/6] ARM: integrator: include <linux/export.h Arnd Bergmann
2012-08-08 12:54   ` Arnd Bergmann
2012-08-08 13:24   ` Linus Walleij
2012-08-08 13:24     ` Linus Walleij
2012-08-08 14:01     ` Arnd Bergmann
2012-08-08 14:01       ` Arnd Bergmann
2012-08-08 12:54 ` [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma Arnd Bergmann
2012-08-08 12:54   ` Arnd Bergmann
2012-08-08 13:00   ` Dirk Behme
2012-08-08 13:00     ` Dirk Behme
2012-08-08 13:01   ` Fabio Estevam
2012-08-08 13:01     ` Fabio Estevam
2012-08-08 13:05     ` Dirk Behme
2012-08-08 13:05       ` Dirk Behme
2012-08-08 13:18       ` Fabio Estevam
2012-08-08 13:18         ` Fabio Estevam
2012-08-13 10:22         ` Artem Bityutskiy
2012-08-13 10:22           ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.