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 <[email protected]>
Cc: Daniel Ribeiro <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Russell King <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
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
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 <[email protected]>
Cc: [email protected] (v3.2+)
Cc: Samuel Ortiz <[email protected]>
Cc: Daniel Ribeiro <[email protected]>
Cc: Haojian Zhuang <[email protected]>
---
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
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 <[email protected]>
---
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
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 <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Sascha Hauer <[email protected]>
---
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
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 <[email protected]>
Cc: [email protected] (v3.2+)
Cc: Daniel Mack <[email protected]>
Cc: Haojian Zhuang <[email protected]>
---
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
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 <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Russell King <[email protected]>
---
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
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 <[email protected]>
Cc: Russell King <[email protected]>
---
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
Hi Arnd,
On Wed, Aug 8, 2012 at 9:54 AM, Arnd Bergmann <[email protected]> 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 <[email protected]>
> Cc: Shawn Guo <[email protected]>
> Cc: Sascha Hauer <[email protected]>
I have already sent a fix for this to the mtd list:
https://patchwork.kernel.org/patch/1236551/
Regards,
Fabio Estevam
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 <[email protected]>
> Cc: Shawn Guo <[email protected]>
> Cc: Sascha Hauer <[email protected]>
Acked-by: Dirk Behme <[email protected]>
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
On 08.08.2012 15:01, Fabio Estevam wrote:
> Hi Arnd,
>
> On Wed, Aug 8, 2012 at 9:54 AM, Arnd Bergmann <[email protected]> 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 <[email protected]>
>> Cc: Shawn Guo <[email protected]>
>> Cc: Sascha Hauer <[email protected]>
>
> 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
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 <[email protected]>
> ---
> 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 <[email protected]>
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 <[email protected]>
[[email protected]: re-worked as per review comments]
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
---
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 <[email protected]>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
On Wed, Aug 8, 2012 at 10:05 AM, Dirk Behme <[email protected]> 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
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 <[email protected]>
> Cc: [email protected] (v3.2+)
> Cc: Daniel Mack <[email protected]>
> Cc: Haojian Zhuang <[email protected]>
> ---
> 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 */
>
On Wed, Aug 8, 2012 at 2:54 PM, Arnd Bergmann <[email protected]> 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 <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: Russell King <[email protected]>
Missing a ">" at the end of the subject line, but whatever.
Acked-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Wednesday 08 August 2012, Linus Walleij wrote:
> Missing a ">" at the end of the subject line, but whatever.
>
> Acked-by: Linus Walleij <[email protected]>
Fixed the subject and added the Ack. Thanks!
Arnd
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: [email protected] (v3.2+)
Cc: Dmitry Torokhov <[email protected]>
Cc: Sven Neumann <[email protected]>
Cc: [email protected]
Cc: Haojian Zhuang <[email protected]>
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;
};
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 <[email protected]>
> 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 <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: [email protected] (v3.2+)
> Cc: Dmitry Torokhov <[email protected]>
> Cc: Sven Neumann <[email protected]>
> Cc: [email protected]
> Cc: Haojian Zhuang <[email protected]>
>
> 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;
> };
>
>
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 <[email protected]>"
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 <[email protected]>
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 <[email protected]>
Reported-by: Tushar Behera <[email protected]>
Cc: Kukjin Kim <[email protected]>
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
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
On Wed, Aug 8, 2012 at 8:54 PM, Arnd Bergmann <[email protected]> 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 <[email protected]>
> Cc: [email protected] (v3.2+)
> Cc: Daniel Mack <[email protected]>
> Cc: Haojian Zhuang <[email protected]>
> ---
> 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 <[email protected]>
On Wed, Aug 8, 2012 at 8:54 PM, Arnd Bergmann <[email protected]> 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 <[email protected]>
> Cc: [email protected] (v3.2+)
> Cc: Samuel Ortiz <[email protected]>
> Cc: Daniel Ribeiro <[email protected]>
> Cc: Haojian Zhuang <[email protected]>
> ---
> drivers/mfd/ezx-pcap.c | 2 +-
> include/linux/mfd/ezx-pcap.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Haojian Zhuang <[email protected]>
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
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
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 <[email protected]>"
> 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 <[email protected]>
> 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 <[email protected]>
> Reported-by: Tushar Behera <[email protected]>
> Cc: Kukjin Kim <[email protected]>
>
Acked-by: Kukjin Kim <[email protected]>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, 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
On Wed, 2012-08-08 at 10:18 -0300, Fabio Estevam wrote:
> On Wed, Aug 8, 2012 at 10:05 AM, Dirk Behme <[email protected]> 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