* [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA
@ 2011-10-31 18:42 Mark Brown
2011-10-31 18:42 ` [PATCH 2/3 v3.1] ARM: SAMSUNG: Fix GPIO space reservation for S3C64xx platforms Mark Brown
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mark Brown @ 2011-10-31 18:42 UTC (permalink / raw)
To: linux-arm-kernel
The conversion of the S3C64XX GPIOs to the generic Samsung GPIOs mean that
rather than using the previous S3C24XX_GPIO_EXTRA configuration the driver
now uses SAMSUNG_GPIO_EXTRA.
Since SAMSUNG_GPIO_EXTRA requires the arch to include the extra space in
ARCH_NR_GPIOs add it on to BOARD_NR_GPIOs (in case boards are relying on
the existing reservation).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/mach-s3c64xx/include/mach/gpio.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h
index 6e34c2f..090c497 100644
--- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
+++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
@@ -88,6 +88,6 @@ enum s3c_gpio_number {
/* define the number of gpios we need to the one after the GPQ() range */
#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1)
-#define BOARD_NR_GPIOS 16
+#define BOARD_NR_GPIOS (16 + CONFIG_SAMSUNG_GPIO_EXTRA)
#define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS)
--
1.7.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/3 v3.1] ARM: SAMSUNG: Fix GPIO space reservation for S3C64xx platforms 2011-10-31 18:42 [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Mark Brown @ 2011-10-31 18:42 ` Mark Brown 2011-10-31 18:42 ` [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore Mark Brown 2011-11-02 12:03 ` [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Kukjin Kim 2 siblings, 0 replies; 8+ messages in thread From: Mark Brown @ 2011-10-31 18:42 UTC (permalink / raw) To: linux-arm-kernel The conversion to use SAMSUNG_GPIO_EXTRA rather than S3C24XX_GPIO_EXTRA broke a number of S3C64xx boards which had been using the symbols provided to reserve a range of GPIOs for board specific use. Fix this by adding equivalent symbols for the new shared driver and updating the relevant boards to use the new symbols. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> --- arch/arm/mach-s3c64xx/Kconfig | 6 +++--- arch/arm/plat-samsung/Kconfig | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index 5552e04..4d8c489 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig @@ -188,7 +188,7 @@ config SMDK6410_WM1190_EV1 depends on MACH_SMDK6410 select REGULATOR select REGULATOR_WM8350 - select S3C24XX_GPIO_EXTRA64 + select SAMSUNG_GPIO_EXTRA64 select MFD_WM8350_I2C select MFD_WM8350_CONFIG_MODE_0 select MFD_WM8350_CONFIG_MODE_3 @@ -206,7 +206,7 @@ config SMDK6410_WM1192_EV1 depends on MACH_SMDK6410 select REGULATOR select REGULATOR_WM831X - select S3C24XX_GPIO_EXTRA64 + select SAMSUNG_GPIO_EXTRA64 select MFD_WM831X select MFD_WM831X_I2C help @@ -287,7 +287,7 @@ config MACH_WLF_CRAGG_6410 select S3C_DEV_WDT select S3C_DEV_RTC select S3C64XX_DEV_SPI - select S3C24XX_GPIO_EXTRA128 + select SAMSUNG_GPIO_EXTRA128 select I2C help Machine support for the Wolfson Cragganmore S3C6410 variant. diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 313eb26..bb0af66 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -88,12 +88,20 @@ config S5P_GPIO_DRVSTR config SAMSUNG_GPIO_EXTRA int "Number of additional GPIO pins" + default 128 if SAMSUNG_GPIO_EXTRA128 + default 64 if SAMSUNG_GPIO_EXTRA64 default 0 help Use additional GPIO space in addition to the GPIO's the SOC provides. This allows expanding the GPIO space for use with GPIO expanders. +config SAMSUNG_GPIO_EXTRA64 + bool + +config SAMSUNG_GPIO_EXTRA128 + bool + config S3C_GPIO_SPACE int "Space between gpio banks" default 0 -- 1.7.7.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore 2011-10-31 18:42 [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Mark Brown 2011-10-31 18:42 ` [PATCH 2/3 v3.1] ARM: SAMSUNG: Fix GPIO space reservation for S3C64xx platforms Mark Brown @ 2011-10-31 18:42 ` Mark Brown 2011-11-03 7:45 ` Kukjin Kim 2011-11-02 12:03 ` [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Kukjin Kim 2 siblings, 1 reply; 8+ messages in thread From: Mark Brown @ 2011-10-31 18:42 UTC (permalink / raw) To: linux-arm-kernel The gpio_base for the PMIC on the CPU module was being incorrectly set to be the same as that for the CODEC causing the two GPIO drivers to collide. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> --- arch/arm/mach-s3c64xx/mach-crag6410.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 3903d86..03eb475 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -74,6 +74,7 @@ #define PCA935X_GPIO_BASE GPIO_BOARD_START #define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) #define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) +#define BANFF_PMIC_GPIO_BASE (GLENFARCLAS_PMIC_GPIO_BASE + 16) /* serial port setup */ @@ -509,7 +510,7 @@ static struct wm831x_touch_pdata touch_pdata __initdata = { static struct wm831x_pdata crag_pmic_pdata __initdata = { .wm831x_num = 1, .irq_base = BANFF_PMIC_IRQ_BASE, - .gpio_base = GPIO_BOARD_START + 8, + .gpio_base = BANFF_PMIC_GPIO_BASE, .soft_shutdown = true, .backup = &banff_backup_pdata, -- 1.7.7.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore 2011-10-31 18:42 ` [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore Mark Brown @ 2011-11-03 7:45 ` Kukjin Kim 2011-11-03 12:10 ` Mark Brown 0 siblings, 1 reply; 8+ messages in thread From: Kukjin Kim @ 2011-11-03 7:45 UTC (permalink / raw) To: linux-arm-kernel Mark Brown wrote: > > The gpio_base for the PMIC on the CPU module was being incorrectly set to > be the same as that for the CODEC causing the two GPIO drivers to collide. > > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> > --- > arch/arm/mach-s3c64xx/mach-crag6410.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach- > s3c64xx/mach-crag6410.c > index 3903d86..03eb475 100644 > --- a/arch/arm/mach-s3c64xx/mach-crag6410.c > +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c > @@ -74,6 +74,7 @@ > #define PCA935X_GPIO_BASE GPIO_BOARD_START > #define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) > #define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) > +#define BANFF_PMIC_GPIO_BASE > (GLENFARCLAS_PMIC_GPIO_BASE + 16) > Mark, Above definitions are at mach/crag6410.h file not mach-crag6410.c file in my tree. And in my opinion, to use GPIO_BOARD_START is better than to use GLENFARCLAS_PMIC_GPIO_BASE like others for easily reading. > /* serial port setup */ > > @@ -509,7 +510,7 @@ static struct wm831x_touch_pdata touch_pdata __initdata > = { > static struct wm831x_pdata crag_pmic_pdata __initdata = { > .wm831x_num = 1, > .irq_base = BANFF_PMIC_IRQ_BASE, > - .gpio_base = GPIO_BOARD_START + 8, > + .gpio_base = BANFF_PMIC_GPIO_BASE, > .soft_shutdown = true, There is no above line in my tree... > > .backup = &banff_backup_pdata, > -- > 1.7.7.1 So I think, this should be following...? diff --git a/arch/arm/mach-s3c64xx/include/mach/crag6410.h b/arch/arm/mach-s3c64xx/include/mach/crag6410.h index be9074e..1cc1cc8 100644 --- a/arch/arm/mach-s3c64xx/include/mach/crag6410.h +++ b/arch/arm/mach-s3c64xx/include/mach/crag6410.h @@ -17,7 +17,8 @@ #define GLENFARCLAS_PMIC_IRQ_BASE (IRQ_BOARD_START + 64) #define PCA935X_GPIO_BASE GPIO_BOARD_START -#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) +#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) #define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) +#define BANFF_PMIC_GPIO_BASE (GPIO_BOARD_START + 32) #endif diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index d04b654..8b04a46 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -500,7 +500,7 @@ static struct wm831x_touch_pdata touch_pdata __initdata = { static struct wm831x_pdata crag_pmic_pdata __initdata = { .wm831x_num = 1, .irq_base = BANFF_PMIC_IRQ_BASE, - .gpio_base = GPIO_BOARD_START + 8, + .gpio_base = BANFF_PMIC_GPIO_BASE, .backup = &banff_backup_pdata, 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] 8+ messages in thread
* [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore 2011-11-03 7:45 ` Kukjin Kim @ 2011-11-03 12:10 ` Mark Brown 2011-11-04 5:02 ` Kukjin Kim 0 siblings, 1 reply; 8+ messages in thread From: Mark Brown @ 2011-11-03 12:10 UTC (permalink / raw) To: linux-arm-kernel On Thu, Nov 03, 2011 at 04:45:21PM +0900, Kukjin Kim wrote: > Mark Brown wrote: > > #define PCA935X_GPIO_BASE GPIO_BOARD_START > > #define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) > > #define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) > > +#define BANFF_PMIC_GPIO_BASE > > (GLENFARCLAS_PMIC_GPIO_BASE + 16) > Above definitions are at mach/crag6410.h file not mach-crag6410.c file in my > tree. > And in my opinion, to use GPIO_BOARD_START is better than to use > GLENFARCLAS_PMIC_GPIO_BASE like others for easily reading. I'd prefer it if the were all defined in terms of the preceeding one but yes. > So I think, this should be following...? Yes. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore 2011-11-03 12:10 ` Mark Brown @ 2011-11-04 5:02 ` Kukjin Kim 0 siblings, 0 replies; 8+ messages in thread From: Kukjin Kim @ 2011-11-04 5:02 UTC (permalink / raw) To: linux-arm-kernel Mark Brown wrote: > > On Thu, Nov 03, 2011 at 04:45:21PM +0900, Kukjin Kim wrote: > > Mark Brown wrote: > > > > #define PCA935X_GPIO_BASE GPIO_BOARD_START > > > #define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) > > > #define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) > > > +#define BANFF_PMIC_GPIO_BASE > > > (GLENFARCLAS_PMIC_GPIO_BASE + 16) > > > Above definitions are at mach/crag6410.h file not mach-crag6410.c file in my > > tree. > > And in my opinion, to use GPIO_BOARD_START is better than to use > > GLENFARCLAS_PMIC_GPIO_BASE like others for easily reading. > > I'd prefer it if the were all defined in terms of the preceeding one but > yes. > > > So I think, this should be following...? > > Yes. OK, applied. Thanks. Best regards, Kgene. -- Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA 2011-10-31 18:42 [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Mark Brown 2011-10-31 18:42 ` [PATCH 2/3 v3.1] ARM: SAMSUNG: Fix GPIO space reservation for S3C64xx platforms Mark Brown 2011-10-31 18:42 ` [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore Mark Brown @ 2011-11-02 12:03 ` Kukjin Kim 2011-11-02 12:30 ` Mark Brown 2 siblings, 1 reply; 8+ messages in thread From: Kukjin Kim @ 2011-11-02 12:03 UTC (permalink / raw) To: linux-arm-kernel Mark Brown wrote: > > The conversion of the S3C64XX GPIOs to the generic Samsung GPIOs mean that > rather than using the previous S3C24XX_GPIO_EXTRA configuration the driver > now uses SAMSUNG_GPIO_EXTRA. > > Since SAMSUNG_GPIO_EXTRA requires the arch to include the extra space in > ARCH_NR_GPIOs add it on to BOARD_NR_GPIOs (in case boards are relying on > the existing reservation). > > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> > --- > arch/arm/mach-s3c64xx/include/mach/gpio.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach- > s3c64xx/include/mach/gpio.h > index 6e34c2f..090c497 100644 > --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h > +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h > @@ -88,6 +88,6 @@ enum s3c_gpio_number { > /* define the number of gpios we need to the one after the GPQ() range */ > #define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) > > -#define BOARD_NR_GPIOS 16 > +#define BOARD_NR_GPIOS (16 + CONFIG_SAMSUNG_GPIO_EXTRA) > > #define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS) > -- > 1.7.7.1 Yes, agree. BTW, what's the 'v3.1' in title? Thanks. Best regards, Kgene. -- Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA 2011-11-02 12:03 ` [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Kukjin Kim @ 2011-11-02 12:30 ` Mark Brown 0 siblings, 0 replies; 8+ messages in thread From: Mark Brown @ 2011-11-02 12:30 UTC (permalink / raw) To: linux-arm-kernel On Wed, Nov 02, 2011 at 09:03:38PM +0900, Kukjin Kim wrote: > Yes, agree. BTW, what's the 'v3.1' in title? A thinko for 3.2, sorry. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-11-04 5:02 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-31 18:42 [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Mark Brown 2011-10-31 18:42 ` [PATCH 2/3 v3.1] ARM: SAMSUNG: Fix GPIO space reservation for S3C64xx platforms Mark Brown 2011-10-31 18:42 ` [PATCH 3/3 v3.1] ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore Mark Brown 2011-11-03 7:45 ` Kukjin Kim 2011-11-03 12:10 ` Mark Brown 2011-11-04 5:02 ` Kukjin Kim 2011-11-02 12:03 ` [PATCH 1/3 v3.1] ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Kukjin Kim 2011-11-02 12:30 ` Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).