LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
@ 2011-02-07  1:51 Lars-Peter Clausen
  2011-02-07  1:51 ` [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device Lars-Peter Clausen
                   ` (9 more replies)
  0 siblings, 10 replies; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

The gta02 header file still uses the old S3C2410_GPJx defines instead of the
S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been removed
this causes the following build failure:

	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_set_spk':
	sound/soc/samsung/neo1973_wm8753.c:259: error: 'S3C2440_GPJ2' undeclared (first use in this function)
	sound/soc/samsung/neo1973_wm8753.c:259: error: (Each undeclared identifier is reported only once
	sound/soc/samsung/neo1973_wm8753.c:259: error: for each function it appears in.)
	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_get_spk':
	sound/soc/samsung/neo1973_wm8753.c:267: error: 'S3C2440_GPJ2' undeclared (first use in this function)
	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_event':
	sound/soc/samsung/neo1973_wm8753.c:276: error: 'S3C2440_GPJ1' undeclared (first use in this function)
	sound/soc/samsung/neo1973_wm8753.c: At top level:
	sound/soc/samsung/neo1973_wm8753.c:439: error: 'S3C2440_GPJ2' undeclared here (not in a function)
	sound/soc/samsung/neo1973_wm8753.c:440: error: 'S3C2440_GPJ1' undeclared here (not in a function)

This patches fixes the issue by doing a s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g
on the file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/include/mach/gta02.h |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-s3c2440/include/mach/gta02.h b/arch/arm/mach-s3c2440/include/mach/gta02.h
index 953331d..3a56a22 100644
--- a/arch/arm/mach-s3c2440/include/mach/gta02.h
+++ b/arch/arm/mach-s3c2440/include/mach/gta02.h
@@ -44,19 +44,19 @@
 #define GTA02v3_GPIO_nUSB_FLT	S3C2410_GPG(10)	/* v3 + v4 only */
 #define GTA02v3_GPIO_nGSM_OC	S3C2410_GPG(11)	/* v3 + v4 only */
 
-#define GTA02_GPIO_AMP_SHUT	S3C2440_GPJ1	/* v2 + v3 + v4 only */
-#define GTA02v1_GPIO_WLAN_GPIO10	S3C2440_GPJ2
-#define GTA02_GPIO_HP_IN	S3C2440_GPJ2	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_INT0		S3C2440_GPJ3	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_nGSM_EN	S3C2440_GPJ4
-#define GTA02_GPIO_3D_RESET	S3C2440_GPJ5
-#define GTA02_GPIO_nDL_GSM	S3C2440_GPJ6	/* v4 + v5 only */
-#define GTA02_GPIO_WLAN_GPIO0	S3C2440_GPJ7
-#define GTA02v1_GPIO_BAT_ID	S3C2440_GPJ8
-#define GTA02_GPIO_KEEPACT	S3C2440_GPJ8
-#define GTA02v1_GPIO_HP_IN	S3C2440_GPJ10
-#define GTA02_CHIP_PWD		S3C2440_GPJ11	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_nWLAN_RESET	S3C2440_GPJ12	/* v2 + v3 + v4 only */
+#define GTA02_GPIO_AMP_SHUT	S3C2410_GPJ(1)	/* v2 + v3 + v4 only */
+#define GTA02v1_GPIO_WLAN_GPIO10	S3C2410_GPJ(2)
+#define GTA02_GPIO_HP_IN	S3C2410_GPJ(2)	/* v2 + v3 + v4 only */
+#define GTA02_GPIO_INT0		S3C2410_GPJ(3)	/* v2 + v3 + v4 only */
+#define GTA02_GPIO_nGSM_EN	S3C2410_GPJ(4)
+#define GTA02_GPIO_3D_RESET	S3C2410_GPJ(5)
+#define GTA02_GPIO_nDL_GSM	S3C2410_GPJ(6)	/* v4 + v5 only */
+#define GTA02_GPIO_WLAN_GPIO0	S3C2410_GPJ(7)
+#define GTA02v1_GPIO_BAT_ID	S3C2410_GPJ(8)
+#define GTA02_GPIO_KEEPACT	S3C2410_GPJ(8)
+#define GTA02v1_GPIO_HP_IN	S3C2410_GPJ(10)
+#define GTA02_CHIP_PWD		S3C2410_GPJ(11)	/* v2 + v3 + v4 only */
+#define GTA02_GPIO_nWLAN_RESET	S3C2410_GPJ(12)	/* v2 + v3 + v4 only */
 
 #define GTA02_IRQ_GSENSOR_1	IRQ_EINT0
 #define GTA02_IRQ_MODEM		IRQ_EINT1
-- 
1.7.2.3


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

* [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
@ 2011-02-07  1:51 ` Lars-Peter Clausen
  2011-02-28  6:38   ` Kukjin Kim
  2011-02-07  1:51 ` [PATCH 03/09] ARM: s3c2440: gta02: Add button support Lars-Peter Clausen
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

The ASoC multi-component patch introduced a new pcm platform device, which needs
to be registered by board files in order for sound to work.
This patch does this for the gta02 board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 9f2c14e..e83062b 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -509,6 +509,7 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&gta02_nor_flash,
 	&s3c24xx_pwm_device,
 	&s3c_device_iis,
+	&samsung_asoc_dma,
 	&s3c_device_i2c0,
 };
 
-- 
1.7.2.3


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

* [PATCH 03/09] ARM: s3c2440: gta02: Add button support
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
  2011-02-07  1:51 ` [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device Lars-Peter Clausen
@ 2011-02-07  1:51 ` Lars-Peter Clausen
  2011-02-28  6:37   ` Kukjin Kim
  2011-02-07  1:51 ` [PATCH 04/09] ARM: s3c2440: gta02: Select missing S3C_DEV_USB_HOST Lars-Peter Clausen
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

This patch adds support for the two buttons found on the gta02 device, which are
connectd to gpio pins, using the gpio-keys driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index e83062b..6629998 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -58,6 +58,9 @@
 #include <linux/mfd/pcf50633/pmic.h>
 #include <linux/mfd/pcf50633/backlight.h>
 
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
@@ -489,6 +492,36 @@ static struct s3c2410_hcd_info gta02_usb_info __initdata = {
 	},
 };
 
+/* Buttons */
+static struct gpio_keys_button gta02_buttons[] = {
+	{
+		.gpio = GTA02_GPIO_AUX_KEY,
+		.code = KEY_PHONE,
+		.desc = "Aux",
+		.type = EV_KEY,
+		.debounce_interval = 100,
+	},
+	{
+		.gpio = GTA02_GPIO_HOLD_KEY,
+		.code = KEY_PAUSE,
+		.desc = "Hold",
+		.type = EV_KEY,
+		.debounce_interval = 100,
+	},
+};
+
+static struct gpio_keys_platform_data gta02_buttons_pdata = {
+	.buttons = gta02_buttons,
+	.nbuttons = ARRAY_SIZE(gta02_buttons),
+};
+
+static struct platform_device gta02_buttons_device = {
+	.name = "gpio-keys",
+	.id = -1,
+	.dev = {
+		.platform_data = &gta02_buttons_pdata,
+	},
+};
 
 static void __init gta02_map_io(void)
 {
@@ -511,6 +544,7 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&s3c_device_iis,
 	&samsung_asoc_dma,
 	&s3c_device_i2c0,
+	&gta02_buttons_device,
 };
 
 /* These guys DO need to be children of PMU. */
-- 
1.7.2.3


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

* [PATCH 04/09] ARM: s3c2440: gta02: Select missing S3C_DEV_USB_HOST
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
  2011-02-07  1:51 ` [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device Lars-Peter Clausen
  2011-02-07  1:51 ` [PATCH 03/09] ARM: s3c2440: gta02: Add button support Lars-Peter Clausen
@ 2011-02-07  1:51 ` Lars-Peter Clausen
  2011-02-28  6:31   ` Kukjin Kim
  2011-02-07  1:51 ` [PATCH 05/09] ARM: s3c2440: gta02: Fix regulator valid_modes_ops Lars-Peter Clausen
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

The gta02 mach file references the ohci device.
So we need to select S3C_DEV_USB_HOST to have the device available.

This fixes the following linker errors:
	arch/arm/mach-s3c2440/built-in.o: In function `gta02_machine_init':
	mach-gta02.c:(.init.text+0x370): undefined reference to `s3c_ohci_set_platdata'
	arch/arm/mach-s3c2440/built-in.o:(.init.data+0xac): undefined reference to `s3c_device_ohci'

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index a0cb258..50825a3 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -99,6 +99,7 @@ config MACH_NEO1973_GTA02
 	select POWER_SUPPLY
 	select MACH_NEO1973
 	select S3C2410_PWM
+	select S3C_DEV_USB_HOST
 	help
 	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
 
-- 
1.7.2.3


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

* [PATCH 05/09] ARM: s3c2440: gta02: Fix regulator valid_modes_ops
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (2 preceding siblings ...)
  2011-02-07  1:51 ` [PATCH 04/09] ARM: s3c2440: gta02: Select missing S3C_DEV_USB_HOST Lars-Peter Clausen
@ 2011-02-07  1:51 ` Lars-Peter Clausen
  2011-02-28  6:48   ` Kukjin Kim
  2011-02-07  1:51 ` [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators Lars-Peter Clausen
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

The REGULATOR_CHANGE_STATUS flag needs to be set on valid_ops_mask, otherwise it
a driver wont be able to turn the regulator on or off.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 6629998..e57c4d8 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -314,8 +314,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.min_uV = 2000000,
 				.max_uV = 3300000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
-				.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
-				.always_on = 1,
+				.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+						REGULATOR_CHANGE_STATUS,
 			},
 		},
 		[PCF50633_REGULATOR_LDO1] = {
@@ -323,6 +323,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.min_uV = 3300000,
 				.max_uV = 3300000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
+				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
 				.apply_uV = 1,
 				.state_mem = {
 					.enabled = 0,
@@ -350,6 +351,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.min_uV = 3200000,
 				.max_uV = 3200000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
+				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
 				.apply_uV = 1,
 			},
 		},
@@ -358,6 +360,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.min_uV = 3000000,
 				.max_uV = 3000000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
+				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
 				.apply_uV = 1,
 				.state_mem = {
 					.enabled = 1,
-- 
1.7.2.3


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

* [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (3 preceding siblings ...)
  2011-02-07  1:51 ` [PATCH 05/09] ARM: s3c2440: gta02: Fix regulator valid_modes_ops Lars-Peter Clausen
@ 2011-02-07  1:51 ` Lars-Peter Clausen
  2011-02-28  6:26   ` Kukjin Kim
  2011-02-07  1:51 ` [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints Lars-Peter Clausen
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

The pcf50633 regulator driver does not use the state_mem constraints, so there
is no use in setting them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index e57c4d8..01e0930 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -283,9 +283,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.always_on = 1,
 				.apply_uV = 1,
-				.state_mem = {
-					.enabled = 1,
-				},
 			},
 		},
 		[PCF50633_REGULATOR_DOWN1] = {
@@ -304,9 +301,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.apply_uV = 1,
 				.always_on = 1,
-				.state_mem = {
-					.enabled = 1,
-				},
 			},
 		},
 		[PCF50633_REGULATOR_HCLDO] = {
@@ -325,9 +319,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
 				.apply_uV = 1,
-				.state_mem = {
-					.enabled = 0,
-				},
 			},
 		},
 		[PCF50633_REGULATOR_LDO2] = {
@@ -362,9 +353,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
 				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
 				.apply_uV = 1,
-				.state_mem = {
-					.enabled = 1,
-				},
 			},
 		},
 		[PCF50633_REGULATOR_LDO6] = {
@@ -379,9 +367,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
 				.min_uV = 1800000,
 				.max_uV = 1800000,
 				.valid_modes_mask = REGULATOR_MODE_NORMAL,
-				.state_mem = {
-					.enabled = 1,
-				},
 			},
 		},
 
-- 
1.7.2.3


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

* [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (4 preceding siblings ...)
  2011-02-07  1:51 ` [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators Lars-Peter Clausen
@ 2011-02-07  1:51 ` Lars-Peter Clausen
  2011-02-07 11:58   ` Mark Brown
  2011-02-08  2:55   ` [PATCH v2 " Lars-Peter Clausen
  2011-02-07  1:52 ` [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it Lars-Peter Clausen
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:51 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

At the end of gta02_pmu_attach_child_devices all drivers should have taken
control of their regulators and we can tell the regulator core to disable all
regulators which are currently not in use.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 01e0930..1396639 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -563,6 +563,8 @@ static void gta02_pmu_attach_child_devices(struct pcf50633 *pcf)
 
 	platform_add_devices(gta02_devices_pmu_children,
 			     ARRAY_SIZE(gta02_devices_pmu_children));
+
+	regulator_has_full_constraints();
 }
 
 static void gta02_poweroff(void)
-- 
1.7.2.3


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

* [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (5 preceding siblings ...)
  2011-02-07  1:51 ` [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints Lars-Peter Clausen
@ 2011-02-07  1:52 ` Lars-Peter Clausen
  2011-02-28  6:16   ` Kukjin Kim
  2011-02-07  1:52 ` [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support Lars-Peter Clausen
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:52 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

Request the gpio pin used to control the usb pullup before using it to avoid a
runtime warning about an auto-requested gpio.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 1396639..94456fa 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -451,11 +451,11 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e cmd)
 	switch (cmd) {
 	case S3C2410_UDC_P_ENABLE:
 		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
-		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
+		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);
 		break;
 	case S3C2410_UDC_P_DISABLE:
 		pr_debug("%s S3C2410_UDC_P_DISABLE\n", __func__);
-		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 0);
+		gpio_set_value(GTA02_GPIO_USB_PULLUP, 0);
 		break;
 	case S3C2410_UDC_P_RESET:
 		pr_debug("%s S3C2410_UDC_P_RESET\n", __func__);
@@ -572,11 +572,24 @@ static void gta02_poweroff(void)
 	pcf50633_reg_set_bit_mask(gta02_pcf, PCF50633_REG_OOCSHDWN, 1, 1);
 }
 
+static void gta02_request_gpios(void)
+{
+	int ret;
+	ret = gpio_request_one(GTA02_GPIO_USB_PULLUP, GPIOF_OUT_INIT_LOW,
+				"USB pullup");
+	if (ret) {
+		printk(KERN_ERR "Failed to request USB pullup gpio pin: %d\n",
+			ret);
+	}
+}
+
 static void __init gta02_machine_init(void)
 {
 	/* Set the panic callback to turn AUX LED on or off. */
 	panic_blink = gta02_panic_blink;
 
+	gta02_request_gpios();
+
 	s3c_pm_init();
 
 #ifdef CONFIG_CHARGER_PCF50633
-- 
1.7.2.3


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

* [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (6 preceding siblings ...)
  2011-02-07  1:52 ` [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it Lars-Peter Clausen
@ 2011-02-07  1:52 ` Lars-Peter Clausen
  2011-02-28  6:04   ` Kukjin Kim
  2011-02-28 11:17   ` [PATCH v2 " Lars-Peter Clausen
  2011-02-18 10:41 ` [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
  2011-02-28  6:41 ` Kukjin Kim
  9 siblings, 2 replies; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-07  1:52 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

This patch registers the s3c touchscreen and adc devices to add touchscreen
support for the gta02.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 94456fa..2300ec5 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -79,6 +79,8 @@
 #include <mach/regs-mem.h>
 #include <mach/hardware.h>
 
+#include <plat/ts.h>
+
 #include <mach/gta02.h>
 
 #include <plat/regs-serial.h>
@@ -480,6 +482,13 @@ static struct s3c2410_hcd_info gta02_usb_info __initdata = {
 	},
 };
 
+/* Touchscreen */
+static struct s3c2410_ts_mach_info gta02_ts_info = {
+	.delay = 10000,
+	.presc = 0xff, /* slow as we can go */
+	.oversampling_shift = 2,
+};
+
 /* Buttons */
 static struct gpio_keys_button gta02_buttons[] = {
 	{
@@ -533,6 +542,8 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&samsung_asoc_dma,
 	&s3c_device_i2c0,
 	&gta02_buttons_device,
+	&s3c_device_adc,
+	&s3c_device_ts,
 };
 
 /* These guys DO need to be children of PMU. */
@@ -597,6 +608,7 @@ static void __init gta02_machine_init(void)
 #endif
 
 	s3c24xx_udc_set_platdata(&gta02_udc_cfg);
+	s3c24xx_ts_set_platdata(&gta02_ts_info);
 	s3c_ohci_set_platdata(&gta02_usb_info);
 	s3c_nand_set_platdata(&gta02_nand_info);
 	s3c_i2c0_set_platdata(NULL);
-- 
1.7.2.3


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

* Re: [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints
  2011-02-07  1:51 ` [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints Lars-Peter Clausen
@ 2011-02-07 11:58   ` Mark Brown
  2011-02-08  2:55   ` [PATCH v2 " Lars-Peter Clausen
  1 sibling, 0 replies; 35+ messages in thread
From: Mark Brown @ 2011-02-07 11:58 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Ben Dooks, Kukjin Kim, linux-kernel, linux-arm-kernel

On Mon, Feb 07, 2011 at 02:51:59AM +0100, Lars-Peter Clausen wrote:
> At the end of gta02_pmu_attach_child_devices all drivers should have taken
> control of their regulators and we can tell the regulator core to disable all
> regulators which are currently not in use.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

You're misunderstanding this API.  It can be called at any time and will
only actually do anything at the end of init.  You should just call it
from your machine init.

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

* [PATCH v2 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints
  2011-02-07  1:51 ` [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints Lars-Peter Clausen
  2011-02-07 11:58   ` Mark Brown
@ 2011-02-08  2:55   ` Lars-Peter Clausen
  2011-02-28  6:47     ` Kukjin Kim
  1 sibling, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-08  2:55 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

This allows the regulator core to disable all regulators which are not in use
at the end of the kernel init phase.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 01e0930..2682592 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -590,6 +590,8 @@ static void __init gta02_machine_init(void)
 
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
+
+	regulator_has_full_constraints();
 }
 
 
-- 
1.7.2.3


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

* Re: [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (7 preceding siblings ...)
  2011-02-07  1:52 ` [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support Lars-Peter Clausen
@ 2011-02-18 10:41 ` Lars-Peter Clausen
  2011-02-21  9:58   ` Kukjin Kim
  2011-02-28  6:41 ` Kukjin Kim
  9 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-18 10:41 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Ben Dooks, Kukjin Kim, linux-kernel, linux-arm-kernel

On 02/07/2011 02:51 AM, Lars-Peter Clausen wrote:
> The gta02 header file still uses the old S3C2410_GPJx defines instead of the
> S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been removed
> this causes the following build failure:
> 
> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_set_spk':
> 	sound/soc/samsung/neo1973_wm8753.c:259: error: 'S3C2440_GPJ2' undeclared (first use in this function)
> 	sound/soc/samsung/neo1973_wm8753.c:259: error: (Each undeclared identifier is reported only once
> 	sound/soc/samsung/neo1973_wm8753.c:259: error: for each function it appears in.)
> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_get_spk':
> 	sound/soc/samsung/neo1973_wm8753.c:267: error: 'S3C2440_GPJ2' undeclared (first use in this function)
> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_event':
> 	sound/soc/samsung/neo1973_wm8753.c:276: error: 'S3C2440_GPJ1' undeclared (first use in this function)
> 	sound/soc/samsung/neo1973_wm8753.c: At top level:
> 	sound/soc/samsung/neo1973_wm8753.c:439: error: 'S3C2440_GPJ2' undeclared here (not in a function)
> 	sound/soc/samsung/neo1973_wm8753.c:440: error: 'S3C2440_GPJ1' undeclared here (not in a function)
> 
> This patches fixes the issue by doing a s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g
> on the file.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>


Hi

Ben or Kukjin could you take a look at this series and merge it, if it is ok?

- Lars


> ---
>  arch/arm/mach-s3c2440/include/mach/gta02.h |   26 +++++++++++++-------------
>  1 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/include/mach/gta02.h b/arch/arm/mach-s3c2440/include/mach/gta02.h
> index 953331d..3a56a22 100644
> --- a/arch/arm/mach-s3c2440/include/mach/gta02.h
> +++ b/arch/arm/mach-s3c2440/include/mach/gta02.h
> @@ -44,19 +44,19 @@
>  #define GTA02v3_GPIO_nUSB_FLT	S3C2410_GPG(10)	/* v3 + v4 only */
>  #define GTA02v3_GPIO_nGSM_OC	S3C2410_GPG(11)	/* v3 + v4 only */
>  
> -#define GTA02_GPIO_AMP_SHUT	S3C2440_GPJ1	/* v2 + v3 + v4 only */
> -#define GTA02v1_GPIO_WLAN_GPIO10	S3C2440_GPJ2
> -#define GTA02_GPIO_HP_IN	S3C2440_GPJ2	/* v2 + v3 + v4 only */
> -#define GTA02_GPIO_INT0		S3C2440_GPJ3	/* v2 + v3 + v4 only */
> -#define GTA02_GPIO_nGSM_EN	S3C2440_GPJ4
> -#define GTA02_GPIO_3D_RESET	S3C2440_GPJ5
> -#define GTA02_GPIO_nDL_GSM	S3C2440_GPJ6	/* v4 + v5 only */
> -#define GTA02_GPIO_WLAN_GPIO0	S3C2440_GPJ7
> -#define GTA02v1_GPIO_BAT_ID	S3C2440_GPJ8
> -#define GTA02_GPIO_KEEPACT	S3C2440_GPJ8
> -#define GTA02v1_GPIO_HP_IN	S3C2440_GPJ10
> -#define GTA02_CHIP_PWD		S3C2440_GPJ11	/* v2 + v3 + v4 only */
> -#define GTA02_GPIO_nWLAN_RESET	S3C2440_GPJ12	/* v2 + v3 + v4 only */
> +#define GTA02_GPIO_AMP_SHUT	S3C2410_GPJ(1)	/* v2 + v3 + v4 only */
> +#define GTA02v1_GPIO_WLAN_GPIO10	S3C2410_GPJ(2)
> +#define GTA02_GPIO_HP_IN	S3C2410_GPJ(2)	/* v2 + v3 + v4 only */
> +#define GTA02_GPIO_INT0		S3C2410_GPJ(3)	/* v2 + v3 + v4 only */
> +#define GTA02_GPIO_nGSM_EN	S3C2410_GPJ(4)
> +#define GTA02_GPIO_3D_RESET	S3C2410_GPJ(5)
> +#define GTA02_GPIO_nDL_GSM	S3C2410_GPJ(6)	/* v4 + v5 only */
> +#define GTA02_GPIO_WLAN_GPIO0	S3C2410_GPJ(7)
> +#define GTA02v1_GPIO_BAT_ID	S3C2410_GPJ(8)
> +#define GTA02_GPIO_KEEPACT	S3C2410_GPJ(8)
> +#define GTA02v1_GPIO_HP_IN	S3C2410_GPJ(10)
> +#define GTA02_CHIP_PWD		S3C2410_GPJ(11)	/* v2 + v3 + v4 only */
> +#define GTA02_GPIO_nWLAN_RESET	S3C2410_GPJ(12)	/* v2 + v3 + v4 only */
>  
>  #define GTA02_IRQ_GSENSOR_1	IRQ_EINT0
>  #define GTA02_IRQ_MODEM		IRQ_EINT1


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

* RE: [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
  2011-02-18 10:41 ` [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
@ 2011-02-21  9:58   ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-21  9:58 UTC (permalink / raw)
  To: 'Lars-Peter Clausen'
  Cc: 'Ben Dooks', linux-kernel, linux-arm-kernel

Lasrs-Peter Clausen wrote:
> 
> On 02/07/2011 02:51 AM, Lars-Peter Clausen wrote:
> > The gta02 header file still uses the old S3C2410_GPJx defines instead of
> the
> > S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been
> removed
> > this causes the following build failure:
> >
> > 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_set_spk':
> > 	sound/soc/samsung/neo1973_wm8753.c:259: error: 'S3C2440_GPJ2'
> undeclared (first use in this function)
> > 	sound/soc/samsung/neo1973_wm8753.c:259: error: (Each undeclared
> identifier is reported only once
> > 	sound/soc/samsung/neo1973_wm8753.c:259: error: for each function it
> appears in.)
> > 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_get_spk':
> > 	sound/soc/samsung/neo1973_wm8753.c:267: error: 'S3C2440_GPJ2'
> undeclared (first use in this function)
> > 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_event':
> > 	sound/soc/samsung/neo1973_wm8753.c:276: error: 'S3C2440_GPJ1'
> undeclared (first use in this function)
> > 	sound/soc/samsung/neo1973_wm8753.c: At top level:
> > 	sound/soc/samsung/neo1973_wm8753.c:439: error: 'S3C2440_GPJ2'
> undeclared here (not in a function)
> > 	sound/soc/samsung/neo1973_wm8753.c:440: error: 'S3C2440_GPJ1'
> undeclared here (not in a function)
> >
> > This patches fixes the issue by doing a
> s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g
> > on the file.
> >
> > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> 
> 
> Hi
> 
> Ben or Kukjin could you take a look at this series and merge it, if it is
ok?
> 
Hi Lars-Peter,

Basically, the maintainer of mach-s3c* is Ben Dooks.
I think, he will review this series but if he can't soon, I will/can do it.

Ben, could you please review this patches?
If you're busy, please let me know :)

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] 35+ messages in thread

* RE: [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support
  2011-02-07  1:52 ` [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support Lars-Peter Clausen
@ 2011-02-28  6:04   ` Kukjin Kim
  2011-02-28 10:44     ` Lars-Peter Clausen
  2011-02-28 11:17   ` [PATCH v2 " Lars-Peter Clausen
  1 sibling, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:04 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> This patch registers the s3c touchscreen and adc devices to add
touchscreen
> support for the gta02.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index 94456fa..2300ec5 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -79,6 +79,8 @@
>  #include <mach/regs-mem.h>
>  #include <mach/hardware.h>
> 
> +#include <plat/ts.h>
> +

Please group same/similar inclusion together like following.
<linux/...> <asm/...> then <mach/...> or <plat/...>

In other words, please add your <plat/ts.h> inclusion after other <plat/...>

>  #include <mach/gta02.h>
> 
>  #include <plat/regs-serial.h>
> @@ -480,6 +482,13 @@ static struct s3c2410_hcd_info gta02_usb_info
__initdata
> = {
>  	},
>  };
> 
> +/* Touchscreen */
> +static struct s3c2410_ts_mach_info gta02_ts_info = {
> +	.delay = 10000,
> +	.presc = 0xff, /* slow as we can go */
> +	.oversampling_shift = 2,
> +};

How about to use tab between member and = like following?

static struct s3c2410_ts_mach_info gta02_ts_info = {
	.delay			= 10000,
	.presc			= 0xff, /* slow as we can go */
	.oversampling_shift	= 2,
};

> +
>  /* Buttons */
>  static struct gpio_keys_button gta02_buttons[] = {
>  	{
> @@ -533,6 +542,8 @@ static struct platform_device *gta02_devices[]
__initdata
> = {
>  	&samsung_asoc_dma,
>  	&s3c_device_i2c0,
>  	&gta02_buttons_device,
> +	&s3c_device_adc,

No need to build plat-samsung/dev-adc.c for this?
If you want to add '&s3c_deivce_adc', should add 'select SAMSUNG_DEV_ADC'
into "config MACH_NEO1973_GTA02".

> +	&s3c_device_ts,

'select SAMSUNG_DEV_TS'

>  };
> 
>  /* These guys DO need to be children of PMU. */
> @@ -597,6 +608,7 @@ static void __init gta02_machine_init(void)
>  #endif
> 
>  	s3c24xx_udc_set_platdata(&gta02_udc_cfg);
> +	s3c24xx_ts_set_platdata(&gta02_ts_info);

Same as above. 'select SAMSUNG_DEV_TS' should be added for
plat-samsung/dev-ts.c.

>  	s3c_ohci_set_platdata(&gta02_usb_info);
>  	s3c_nand_set_platdata(&gta02_nand_info);
>  	s3c_i2c0_set_platdata(NULL);
> --
> 1.7.2.3


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] 35+ messages in thread

* RE: [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-02-07  1:52 ` [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it Lars-Peter Clausen
@ 2011-02-28  6:16   ` Kukjin Kim
  2011-02-28 10:25     ` Lars-Peter Clausen
  0 siblings, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:16 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> Request the gpio pin used to control the usb pullup before using it to
avoid
> a
> runtime warning about an auto-requested gpio.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
>  1 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index 1396639..94456fa 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -451,11 +451,11 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e
> cmd)
>  	switch (cmd) {
>  	case S3C2410_UDC_P_ENABLE:
>  		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);

How about following instead?
	gpio_request(GTA02_GPIO_USB_PULLUP, "USB_PULLUP");
	gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
	gpio_free(GTA02_GPIO_USB_PULLUP);

>  		break;
>  	case S3C2410_UDC_P_DISABLE:
>  		pr_debug("%s S3C2410_UDC_P_DISABLE\n", __func__);
> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 0);
> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 0);
>  		break;
>  	case S3C2410_UDC_P_RESET:
>  		pr_debug("%s S3C2410_UDC_P_RESET\n", __func__);
> @@ -572,11 +572,24 @@ static void gta02_poweroff(void)
>  	pcf50633_reg_set_bit_mask(gta02_pcf, PCF50633_REG_OOCSHDWN, 1, 1);
>  }
> 
> +static void gta02_request_gpios(void)
> +{
> +	int ret;
> +	ret = gpio_request_one(GTA02_GPIO_USB_PULLUP, GPIOF_OUT_INIT_LOW,
> +				"USB pullup");
> +	if (ret) {
> +		printk(KERN_ERR "Failed to request USB pullup gpio pin:
%d\n",
> +			ret);
> +	}
> +}
> +
>  static void __init gta02_machine_init(void)
>  {
>  	/* Set the panic callback to turn AUX LED on or off. */
>  	panic_blink = gta02_panic_blink;
> 
> +	gta02_request_gpios();
> +
>  	s3c_pm_init();
> 
>  #ifdef CONFIG_CHARGER_PCF50633
> --



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] 35+ messages in thread

* RE: [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators
  2011-02-07  1:51 ` [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators Lars-Peter Clausen
@ 2011-02-28  6:26   ` Kukjin Kim
  2011-02-28 10:28     ` Lars-Peter Clausen
  0 siblings, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:26 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> The pcf50633 regulator driver does not use the state_mem constraints, so
> there
> is no use in setting them.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |   15 ---------------
>  1 files changed, 0 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index e57c4d8..01e0930 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -283,9 +283,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>  				.always_on = 1,
>  				.apply_uV = 1,
> -				.state_mem = {
> -					.enabled = 1,
> -				},
>  			},
>  		},
>  		[PCF50633_REGULATOR_DOWN1] = {
> @@ -304,9 +301,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>  				.apply_uV = 1,
>  				.always_on = 1,
> -				.state_mem = {
> -					.enabled = 1,
> -				},
>  			},
>  		},
>  		[PCF50633_REGULATOR_HCLDO] = {
> @@ -325,9 +319,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>  				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>  				.apply_uV = 1,
> -				.state_mem = {
> -					.enabled = 0,
> -				},
>  			},
>  		},
>  		[PCF50633_REGULATOR_LDO2] = {
> @@ -362,9 +353,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>  				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>  				.apply_uV = 1,
> -				.state_mem = {
> -					.enabled = 1,
> -				},
>  			},
>  		},
>  		[PCF50633_REGULATOR_LDO6] = {
> @@ -379,9 +367,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.min_uV = 1800000,
>  				.max_uV = 1800000,
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> -				.state_mem = {
> -					.enabled = 1,
> -				},
>  			},
>  		},
> 
> --

Don't we need regulator_suspend_mem_state_show() on PCF50633?


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] 35+ messages in thread

* RE: [PATCH 04/09] ARM: s3c2440: gta02: Select missing S3C_DEV_USB_HOST
  2011-02-07  1:51 ` [PATCH 04/09] ARM: s3c2440: gta02: Select missing S3C_DEV_USB_HOST Lars-Peter Clausen
@ 2011-02-28  6:31   ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:31 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> The gta02 mach file references the ohci device.
> So we need to select S3C_DEV_USB_HOST to have the device available.
> 
> This fixes the following linker errors:
> 	arch/arm/mach-s3c2440/built-in.o: In function `gta02_machine_init':
> 	mach-gta02.c:(.init.text+0x370): undefined reference to
> `s3c_ohci_set_platdata'
> 	arch/arm/mach-s3c2440/built-in.o:(.init.data+0xac): undefined
> reference to `s3c_device_ohci'
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/Kconfig |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
> index a0cb258..50825a3 100644
> --- a/arch/arm/mach-s3c2440/Kconfig
> +++ b/arch/arm/mach-s3c2440/Kconfig
> @@ -99,6 +99,7 @@ config MACH_NEO1973_GTA02
>  	select POWER_SUPPLY
>  	select MACH_NEO1973
>  	select S3C2410_PWM
> +	select S3C_DEV_USB_HOST
>  	help
>  	   Say Y here if you are using the Openmoko GTA02 / Freerunner GSM
> Phone
> 
> --
> 1.7.2.3

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] 35+ messages in thread

* RE: [PATCH 03/09] ARM: s3c2440: gta02: Add button support
  2011-02-07  1:51 ` [PATCH 03/09] ARM: s3c2440: gta02: Add button support Lars-Peter Clausen
@ 2011-02-28  6:37   ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:37 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> This patch adds support for the two buttons found on the gta02 device,
which
> are
> connectd to gpio pins, using the gpio-keys driver.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |   34
++++++++++++++++++++++++++++++++++
>  1 files changed, 34 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index e83062b..6629998 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -58,6 +58,9 @@
>  #include <linux/mfd/pcf50633/pmic.h>
>  #include <linux/mfd/pcf50633/backlight.h>
> 
> +#include <linux/input.h>
> +#include <linux/gpio_keys.h>
> +
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
> @@ -489,6 +492,36 @@ static struct s3c2410_hcd_info gta02_usb_info
__initdata
> = {
>  	},
>  };
> 
> +/* Buttons */
> +static struct gpio_keys_button gta02_buttons[] = {
> +	{
> +		.gpio = GTA02_GPIO_AUX_KEY,
> +		.code = KEY_PHONE,
> +		.desc = "Aux",
> +		.type = EV_KEY,
> +		.debounce_interval = 100,
> +	},
> +	{
> +		.gpio = GTA02_GPIO_HOLD_KEY,
> +		.code = KEY_PAUSE,
> +		.desc = "Hold",
> +		.type = EV_KEY,
> +		.debounce_interval = 100,
> +	},
> +};
> +
> +static struct gpio_keys_platform_data gta02_buttons_pdata = {
> +	.buttons = gta02_buttons,
> +	.nbuttons = ARRAY_SIZE(gta02_buttons),
> +};
> +
> +static struct platform_device gta02_buttons_device = {
> +	.name = "gpio-keys",
> +	.id = -1,
> +	.dev = {
> +		.platform_data = &gta02_buttons_pdata,
> +	},
> +};
> 
>  static void __init gta02_map_io(void)
>  {
> @@ -511,6 +544,7 @@ static struct platform_device *gta02_devices[]
__initdata
> = {
>  	&s3c_device_iis,
>  	&samsung_asoc_dma,
>  	&s3c_device_i2c0,
> +	&gta02_buttons_device,
>  };
> 
>  /* These guys DO need to be children of PMU. */
> --

Ok, will apply.
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] 35+ messages in thread

* RE: [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device
  2011-02-07  1:51 ` [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device Lars-Peter Clausen
@ 2011-02-28  6:38   ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:38 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> The ASoC multi-component patch introduced a new pcm platform device, which
> needs
> to be registered by board files in order for sound to work.
> This patch does this for the gta02 board.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index 9f2c14e..e83062b 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -509,6 +509,7 @@ static struct platform_device *gta02_devices[]
__initdata
> = {
>  	&gta02_nor_flash,
>  	&s3c24xx_pwm_device,
>  	&s3c_device_iis,
> +	&samsung_asoc_dma,
>  	&s3c_device_i2c0,
>  };
> 
> --

Ok, will apply.
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] 35+ messages in thread

* RE: [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
  2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
                   ` (8 preceding siblings ...)
  2011-02-18 10:41 ` [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
@ 2011-02-28  6:41 ` Kukjin Kim
  2011-02-28 10:46   ` Lars-Peter Clausen
  9 siblings, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:41 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> The gta02 header file still uses the old S3C2410_GPJx defines instead of
the
> S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been
> removed
> this causes the following build failure:
> 
> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_set_spk':
> 	sound/soc/samsung/neo1973_wm8753.c:259: error: 'S3C2440_GPJ2'
> undeclared (first use in this function)
> 	sound/soc/samsung/neo1973_wm8753.c:259: error: (Each undeclared
> identifier is reported only once
> 	sound/soc/samsung/neo1973_wm8753.c:259: error: for each function it
> appears in.)
> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_get_spk':
> 	sound/soc/samsung/neo1973_wm8753.c:267: error: 'S3C2440_GPJ2'
> undeclared (first use in this function)
> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_event':
> 	sound/soc/samsung/neo1973_wm8753.c:276: error: 'S3C2440_GPJ1'
> undeclared (first use in this function)
> 	sound/soc/samsung/neo1973_wm8753.c: At top level:
> 	sound/soc/samsung/neo1973_wm8753.c:439: error: 'S3C2440_GPJ2'
> undeclared here (not in a function)
> 	sound/soc/samsung/neo1973_wm8753.c:440: error: 'S3C2440_GPJ1'
> undeclared here (not in a function)
> 
> This patches fixes the issue by doing a
> s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g

Maybe, "s,S3C2440_GPJ([\d]+),S3C2410_GPJ(\1),g" instead ?

> on the file.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/include/mach/gta02.h |   26
+++++++++++++-------------
>  1 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/include/mach/gta02.h b/arch/arm/mach-
> s3c2440/include/mach/gta02.h
> index 953331d..3a56a22 100644
> --- a/arch/arm/mach-s3c2440/include/mach/gta02.h
> +++ b/arch/arm/mach-s3c2440/include/mach/gta02.h
> @@ -44,19 +44,19 @@
>  #define GTA02v3_GPIO_nUSB_FLT	S3C2410_GPG(10)	/* v3 + v4 only */
>  #define GTA02v3_GPIO_nGSM_OC	S3C2410_GPG(11)	/* v3 + v4 only */
> 
> -#define GTA02_GPIO_AMP_SHUT	S3C2440_GPJ1	/* v2 + v3 + v4 only */
> -#define GTA02v1_GPIO_WLAN_GPIO10	S3C2440_GPJ2
> -#define GTA02_GPIO_HP_IN	S3C2440_GPJ2	/* v2 + v3 + v4 only */
> -#define GTA02_GPIO_INT0		S3C2440_GPJ3	/* v2 + v3 + v4 only
*/
> -#define GTA02_GPIO_nGSM_EN	S3C2440_GPJ4
> -#define GTA02_GPIO_3D_RESET	S3C2440_GPJ5
> -#define GTA02_GPIO_nDL_GSM	S3C2440_GPJ6	/* v4 + v5 only */
> -#define GTA02_GPIO_WLAN_GPIO0	S3C2440_GPJ7
> -#define GTA02v1_GPIO_BAT_ID	S3C2440_GPJ8
> -#define GTA02_GPIO_KEEPACT	S3C2440_GPJ8
> -#define GTA02v1_GPIO_HP_IN	S3C2440_GPJ10
> -#define GTA02_CHIP_PWD		S3C2440_GPJ11	/* v2 + v3 + v4 only
*/
> -#define GTA02_GPIO_nWLAN_RESET	S3C2440_GPJ12	/* v2 + v3 + v4 only
*/
> +#define GTA02_GPIO_AMP_SHUT	S3C2410_GPJ(1)	/* v2 + v3 + v4 only */
> +#define GTA02v1_GPIO_WLAN_GPIO10	S3C2410_GPJ(2)
> +#define GTA02_GPIO_HP_IN	S3C2410_GPJ(2)	/* v2 + v3 + v4 only */
> +#define GTA02_GPIO_INT0		S3C2410_GPJ(3)	/* v2 + v3 + v4 only
*/
> +#define GTA02_GPIO_nGSM_EN	S3C2410_GPJ(4)
> +#define GTA02_GPIO_3D_RESET	S3C2410_GPJ(5)
> +#define GTA02_GPIO_nDL_GSM	S3C2410_GPJ(6)	/* v4 + v5 only */
> +#define GTA02_GPIO_WLAN_GPIO0	S3C2410_GPJ(7)
> +#define GTA02v1_GPIO_BAT_ID	S3C2410_GPJ(8)
> +#define GTA02_GPIO_KEEPACT	S3C2410_GPJ(8)
> +#define GTA02v1_GPIO_HP_IN	S3C2410_GPJ(10)
> +#define GTA02_CHIP_PWD		S3C2410_GPJ(11)	/* v2 + v3 + v4
> only */
> +#define GTA02_GPIO_nWLAN_RESET	S3C2410_GPJ(12)	/* v2 + v3 + v4
> only */
> 
>  #define GTA02_IRQ_GSENSOR_1	IRQ_EINT0
>  #define GTA02_IRQ_MODEM		IRQ_EINT1
> --
> 1.7.2.3

Yeah, old S3C2440_GPJx has removed.
Is the S3C2410_GPJ(1) right instead of S3C2440_GPJ1?

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] 35+ messages in thread

* RE: [PATCH v2 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints
  2011-02-08  2:55   ` [PATCH v2 " Lars-Peter Clausen
@ 2011-02-28  6:47     ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:47 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> This allows the regulator core to disable all regulators which are not in
use
> at the end of the kernel init phase.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index 01e0930..2682592 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -590,6 +590,8 @@ static void __init gta02_machine_init(void)
> 
>  	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
>  	pm_power_off = gta02_poweroff;
> +
> +	regulator_has_full_constraints();
>  }
> 
> 
> --

Ok, will apply.
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] 35+ messages in thread

* RE: [PATCH 05/09] ARM: s3c2440: gta02: Fix regulator valid_modes_ops
  2011-02-07  1:51 ` [PATCH 05/09] ARM: s3c2440: gta02: Fix regulator valid_modes_ops Lars-Peter Clausen
@ 2011-02-28  6:48   ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28  6:48 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> The REGULATOR_CHANGE_STATUS flag needs to be set on valid_ops_mask,
otherwise
> it
> a driver wont be able to turn the regulator on or off.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index 6629998..e57c4d8 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -314,8 +314,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.min_uV = 2000000,
>  				.max_uV = 3300000,
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> -				.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
> -				.always_on = 1,
> +				.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
> +						REGULATOR_CHANGE_STATUS,
>  			},
>  		},
>  		[PCF50633_REGULATOR_LDO1] = {
> @@ -323,6 +323,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.min_uV = 3300000,
>  				.max_uV = 3300000,
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>  				.apply_uV = 1,
>  				.state_mem = {
>  					.enabled = 0,
> @@ -350,6 +351,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.min_uV = 3200000,
>  				.max_uV = 3200000,
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>  				.apply_uV = 1,
>  			},
>  		},
> @@ -358,6 +360,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>  				.min_uV = 3000000,
>  				.max_uV = 3000000,
>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>  				.apply_uV = 1,
>  				.state_mem = {
>  					.enabled = 1,
> --

Ok, will apply.
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] 35+ messages in thread

* Re: [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-02-28  6:16   ` Kukjin Kim
@ 2011-02-28 10:25     ` Lars-Peter Clausen
  2011-02-28 10:44       ` Kukjin Kim
  0 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-28 10:25 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

On 02/28/2011 07:16 AM, Kukjin Kim wrote:
> Lars-Peter Clausen wrote:
>>
>> Request the gpio pin used to control the usb pullup before using it to
> avoid
>> a
>> runtime warning about an auto-requested gpio.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>>  arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
>>  1 files changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
> b/arch/arm/mach-s3c2440/mach-
>> gta02.c
>> index 1396639..94456fa 100644
>> --- a/arch/arm/mach-s3c2440/mach-gta02.c
>> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
>> @@ -451,11 +451,11 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e
>> cmd)
>>  	switch (cmd) {
>>  	case S3C2410_UDC_P_ENABLE:
>>  		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
>> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
>> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);
> 
> How about following instead?
> 	gpio_request(GTA02_GPIO_USB_PULLUP, "USB_PULLUP");
> 	gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
> 	gpio_free(GTA02_GPIO_USB_PULLUP);
> 

I don't think that is a good idea. This gpio should really be reserved for the
udc driver. If it is freed again, it could be requested from someone else which
could lead to undefined behaviour.


>>  		break;
>>  	case S3C2410_UDC_P_DISABLE:
>>  		pr_debug("%s S3C2410_UDC_P_DISABLE\n", __func__);
>> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 0);
>> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 0);
>>  		break;
>>  	case S3C2410_UDC_P_RESET:
>>  		pr_debug("%s S3C2410_UDC_P_RESET\n", __func__);
>> @@ -572,11 +572,24 @@ static void gta02_poweroff(void)
>>  	pcf50633_reg_set_bit_mask(gta02_pcf, PCF50633_REG_OOCSHDWN, 1, 1);
>>  }
>>
>> +static void gta02_request_gpios(void)
>> +{
>> +	int ret;
>> +	ret = gpio_request_one(GTA02_GPIO_USB_PULLUP, GPIOF_OUT_INIT_LOW,
>> +				"USB pullup");
>> +	if (ret) {
>> +		printk(KERN_ERR "Failed to request USB pullup gpio pin:
> %d\n",
>> +			ret);
>> +	}
>> +}
>> +
>>  static void __init gta02_machine_init(void)
>>  {
>>  	/* Set the panic callback to turn AUX LED on or off. */
>>  	panic_blink = gta02_panic_blink;
>>
>> +	gta02_request_gpios();
>> +
>>  	s3c_pm_init();
>>
>>  #ifdef CONFIG_CHARGER_PCF50633
>> --
> 
> 
> 
> 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] 35+ messages in thread

* Re: [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators
  2011-02-28  6:26   ` Kukjin Kim
@ 2011-02-28 10:28     ` Lars-Peter Clausen
  2011-02-28 10:58       ` Kukjin Kim
  0 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-28 10:28 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

On 02/28/2011 07:26 AM, Kukjin Kim wrote:
> Lars-Peter Clausen wrote:
>>
>> The pcf50633 regulator driver does not use the state_mem constraints, so
>> there
>> is no use in setting them.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>>  arch/arm/mach-s3c2440/mach-gta02.c |   15 ---------------
>>  1 files changed, 0 insertions(+), 15 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
> b/arch/arm/mach-s3c2440/mach-
>> gta02.c
>> index e57c4d8..01e0930 100644
>> --- a/arch/arm/mach-s3c2440/mach-gta02.c
>> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
>> @@ -283,9 +283,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>>  				.always_on = 1,
>>  				.apply_uV = 1,
>> -				.state_mem = {
>> -					.enabled = 1,
>> -				},
>>  			},
>>  		},
>>  		[PCF50633_REGULATOR_DOWN1] = {
>> @@ -304,9 +301,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>>  				.apply_uV = 1,
>>  				.always_on = 1,
>> -				.state_mem = {
>> -					.enabled = 1,
>> -				},
>>  			},
>>  		},
>>  		[PCF50633_REGULATOR_HCLDO] = {
>> @@ -325,9 +319,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>>  				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>>  				.apply_uV = 1,
>> -				.state_mem = {
>> -					.enabled = 0,
>> -				},
>>  			},
>>  		},
>>  		[PCF50633_REGULATOR_LDO2] = {
>> @@ -362,9 +353,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>>  				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
>>  				.apply_uV = 1,
>> -				.state_mem = {
>> -					.enabled = 1,
>> -				},
>>  			},
>>  		},
>>  		[PCF50633_REGULATOR_LDO6] = {
>> @@ -379,9 +367,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
>>  				.min_uV = 1800000,
>>  				.max_uV = 1800000,
>>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
>> -				.state_mem = {
>> -					.enabled = 1,
>> -				},
>>  			},
>>  		},
>>
>> --
> 
> Don't we need regulator_suspend_mem_state_show() on PCF50633?
> 
> 
No. The pcf50633 driver has no set_suspend_enable or set_suspend_disable ops.
So the 'suspend_mem_state' sysfs file does not get registered and that function
is never called.

- Lars

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

* RE: [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-02-28 10:25     ` Lars-Peter Clausen
@ 2011-02-28 10:44       ` Kukjin Kim
  2011-02-28 10:58         ` Lars-Peter Clausen
  0 siblings, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28 10:44 UTC (permalink / raw)
  To: 'Lars-Peter Clausen'
  Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> On 02/28/2011 07:16 AM, Kukjin Kim wrote:
> > Lars-Peter Clausen wrote:
> >>
> >> Request the gpio pin used to control the usb pullup before using it to
> > avoid
> >> a
> >> runtime warning about an auto-requested gpio.
> >>
> >> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> >> ---
> >>  arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
> >>  1 files changed, 15 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
> > b/arch/arm/mach-s3c2440/mach-
> >> gta02.c
> >> index 1396639..94456fa 100644
> >> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> >> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> >> @@ -451,11 +451,11 @@ static void gta02_udc_command(enum
s3c2410_udc_cmd_e
> >> cmd)
> >>  	switch (cmd) {
> >>  	case S3C2410_UDC_P_ENABLE:
> >>  		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
> >> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
> >> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);
> >
> > How about following instead?
> > 	gpio_request(GTA02_GPIO_USB_PULLUP, "USB_PULLUP");
> > 	gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
> > 	gpio_free(GTA02_GPIO_USB_PULLUP);
> >
> 
> I don't think that is a good idea. This gpio should really be reserved for
> the
> udc driver. If it is freed again, it could be requested from someone else
> which
> could lead to undefined behaviour.
> 
Yes right, but I mean the board designer already knows the usage of
regarding GPIOs on his board.
So why do we really need gpio_request for it?...

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] 35+ messages in thread

* Re: [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support
  2011-02-28  6:04   ` Kukjin Kim
@ 2011-02-28 10:44     ` Lars-Peter Clausen
  2011-02-28 10:57       ` Kukjin Kim
  0 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-28 10:44 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

On 02/28/2011 07:04 AM, Kukjin Kim wrote:
> Lars-Peter Clausen wrote:
>>
>> This patch registers the s3c touchscreen and adc devices to add
> touchscreen
>> support for the gta02.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>>  arch/arm/mach-s3c2440/mach-gta02.c |   12 ++++++++++++
>>  1 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
> b/arch/arm/mach-s3c2440/mach-
>> gta02.c
>> index 94456fa..2300ec5 100644
>> --- a/arch/arm/mach-s3c2440/mach-gta02.c
>> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
>> @@ -79,6 +79,8 @@
>>  #include <mach/regs-mem.h>
>>  #include <mach/hardware.h>
>>
>> +#include <plat/ts.h>
>> +
> 
> Please group same/similar inclusion together like following.
> <linux/...> <asm/...> then <mach/...> or <plat/...>
> 
> In other words, please add your <plat/ts.h> inclusion after other <plat/...>

Ok.
> 
>>  #include <mach/gta02.h>
>>
>>  #include <plat/regs-serial.h>
>> @@ -480,6 +482,13 @@ static struct s3c2410_hcd_info gta02_usb_info
> __initdata
>> = {
>>  	},
>>  };
>>
>> +/* Touchscreen */
>> +static struct s3c2410_ts_mach_info gta02_ts_info = {
>> +	.delay = 10000,
>> +	.presc = 0xff, /* slow as we can go */
>> +	.oversampling_shift = 2,
>> +};
> 
> How about to use tab between member and = like following?
> 
> static struct s3c2410_ts_mach_info gta02_ts_info = {
> 	.delay			= 10000,
> 	.presc			= 0xff, /* slow as we can go */
> 	.oversampling_shift	= 2,
> };

Ok.

> 
>> +
>>  /* Buttons */
>>  static struct gpio_keys_button gta02_buttons[] = {
>>  	{
>> @@ -533,6 +542,8 @@ static struct platform_device *gta02_devices[]
> __initdata
>> = {
>>  	&samsung_asoc_dma,
>>  	&s3c_device_i2c0,
>>  	&gta02_buttons_device,
>> +	&s3c_device_adc,
> 
> No need to build plat-samsung/dev-adc.c for this?
> If you want to add '&s3c_deivce_adc', should add 'select SAMSUNG_DEV_ADC'
> into "config MACH_NEO1973_GTA02".

There appear to be two different definitions for s3c_deivce_adc one is in
plat-samsung/dev-adc.c the other is in plat-s3c24xx/devs.c. So if I select
SAMSUNG_DEV_ADC I'll actually get compile errors.
The definition in plat-s3c24xx/devs.c should probably be dropped, but thats
something for a different patch.


> 
>> +	&s3c_device_ts,
> 
> 'select SAMSUNG_DEV_TS'

Same here.

> 
>>  };
>>
>>  /* These guys DO need to be children of PMU. */
>> @@ -597,6 +608,7 @@ static void __init gta02_machine_init(void)
>>  #endif
>>
>>  	s3c24xx_udc_set_platdata(&gta02_udc_cfg);
>> +	s3c24xx_ts_set_platdata(&gta02_ts_info);
> 
> Same as above. 'select SAMSUNG_DEV_TS' should be added for
> plat-samsung/dev-ts.c.

And here.

> 
>>  	s3c_ohci_set_platdata(&gta02_usb_info);
>>  	s3c_nand_set_platdata(&gta02_nand_info);
>>  	s3c_i2c0_set_platdata(NULL);
>> --
>> 1.7.2.3
> 
> 
> 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] 35+ messages in thread

* Re: [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
  2011-02-28  6:41 ` Kukjin Kim
@ 2011-02-28 10:46   ` Lars-Peter Clausen
  2011-02-28 10:49     ` Kukjin Kim
  0 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-28 10:46 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

On 02/28/2011 07:41 AM, Kukjin Kim wrote:
> Lars-Peter Clausen wrote:
>>
>> The gta02 header file still uses the old S3C2410_GPJx defines instead of
> the
>> S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been
>> removed
>> this causes the following build failure:
>>
>> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_set_spk':
>> 	sound/soc/samsung/neo1973_wm8753.c:259: error: 'S3C2440_GPJ2'
>> undeclared (first use in this function)
>> 	sound/soc/samsung/neo1973_wm8753.c:259: error: (Each undeclared
>> identifier is reported only once
>> 	sound/soc/samsung/neo1973_wm8753.c:259: error: for each function it
>> appears in.)
>> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_get_spk':
>> 	sound/soc/samsung/neo1973_wm8753.c:267: error: 'S3C2440_GPJ2'
>> undeclared (first use in this function)
>> 	sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_event':
>> 	sound/soc/samsung/neo1973_wm8753.c:276: error: 'S3C2440_GPJ1'
>> undeclared (first use in this function)
>> 	sound/soc/samsung/neo1973_wm8753.c: At top level:
>> 	sound/soc/samsung/neo1973_wm8753.c:439: error: 'S3C2440_GPJ2'
>> undeclared here (not in a function)
>> 	sound/soc/samsung/neo1973_wm8753.c:440: error: 'S3C2440_GPJ1'
>> undeclared here (not in a function)
>>
>> This patches fixes the issue by doing a
>> s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g
> 
> Maybe, "s,S3C2440_GPJ([\d]+),S3C2410_GPJ(\1),g" instead ?
> 
>> on the file.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>>  arch/arm/mach-s3c2440/include/mach/gta02.h |   26
> +++++++++++++-------------
>>  1 files changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c2440/include/mach/gta02.h b/arch/arm/mach-
>> s3c2440/include/mach/gta02.h
>> index 953331d..3a56a22 100644
>> --- a/arch/arm/mach-s3c2440/include/mach/gta02.h
>> +++ b/arch/arm/mach-s3c2440/include/mach/gta02.h
>> @@ -44,19 +44,19 @@
>>  #define GTA02v3_GPIO_nUSB_FLT	S3C2410_GPG(10)	/* v3 + v4 only */
>>  #define GTA02v3_GPIO_nGSM_OC	S3C2410_GPG(11)	/* v3 + v4 only */
>>
>> -#define GTA02_GPIO_AMP_SHUT	S3C2440_GPJ1	/* v2 + v3 + v4 only */
>> -#define GTA02v1_GPIO_WLAN_GPIO10	S3C2440_GPJ2
>> -#define GTA02_GPIO_HP_IN	S3C2440_GPJ2	/* v2 + v3 + v4 only */
>> -#define GTA02_GPIO_INT0		S3C2440_GPJ3	/* v2 + v3 + v4 only
> */
>> -#define GTA02_GPIO_nGSM_EN	S3C2440_GPJ4
>> -#define GTA02_GPIO_3D_RESET	S3C2440_GPJ5
>> -#define GTA02_GPIO_nDL_GSM	S3C2440_GPJ6	/* v4 + v5 only */
>> -#define GTA02_GPIO_WLAN_GPIO0	S3C2440_GPJ7
>> -#define GTA02v1_GPIO_BAT_ID	S3C2440_GPJ8
>> -#define GTA02_GPIO_KEEPACT	S3C2440_GPJ8
>> -#define GTA02v1_GPIO_HP_IN	S3C2440_GPJ10
>> -#define GTA02_CHIP_PWD		S3C2440_GPJ11	/* v2 + v3 + v4 only
> */
>> -#define GTA02_GPIO_nWLAN_RESET	S3C2440_GPJ12	/* v2 + v3 + v4 only
> */
>> +#define GTA02_GPIO_AMP_SHUT	S3C2410_GPJ(1)	/* v2 + v3 + v4 only */
>> +#define GTA02v1_GPIO_WLAN_GPIO10	S3C2410_GPJ(2)
>> +#define GTA02_GPIO_HP_IN	S3C2410_GPJ(2)	/* v2 + v3 + v4 only */
>> +#define GTA02_GPIO_INT0		S3C2410_GPJ(3)	/* v2 + v3 + v4 only
> */
>> +#define GTA02_GPIO_nGSM_EN	S3C2410_GPJ(4)
>> +#define GTA02_GPIO_3D_RESET	S3C2410_GPJ(5)
>> +#define GTA02_GPIO_nDL_GSM	S3C2410_GPJ(6)	/* v4 + v5 only */
>> +#define GTA02_GPIO_WLAN_GPIO0	S3C2410_GPJ(7)
>> +#define GTA02v1_GPIO_BAT_ID	S3C2410_GPJ(8)
>> +#define GTA02_GPIO_KEEPACT	S3C2410_GPJ(8)
>> +#define GTA02v1_GPIO_HP_IN	S3C2410_GPJ(10)
>> +#define GTA02_CHIP_PWD		S3C2410_GPJ(11)	/* v2 + v3 + v4
>> only */
>> +#define GTA02_GPIO_nWLAN_RESET	S3C2410_GPJ(12)	/* v2 + v3 + v4
>> only */
>>
>>  #define GTA02_IRQ_GSENSOR_1	IRQ_EINT0
>>  #define GTA02_IRQ_MODEM		IRQ_EINT1
>> --
>> 1.7.2.3
> 
> Yeah, old S3C2440_GPJx has removed.
> Is the S3C2410_GPJ(1) right instead of S3C2440_GPJ1?

I think so. At least the the compile errors are gone and the drivers using
these gpios work as expected.

- Lars

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

* RE: [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
  2011-02-28 10:46   ` Lars-Peter Clausen
@ 2011-02-28 10:49     ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28 10:49 UTC (permalink / raw)
  To: 'Lars-Peter Clausen'
  Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> On 02/28/2011 07:41 AM, Kukjin Kim wrote:
> > Lars-Peter Clausen wrote:

(snip)

> >
> > Yeah, old S3C2440_GPJx has removed.
> > Is the S3C2410_GPJ(1) right instead of S3C2440_GPJ1?
> 
> I think so. At least the the compile errors are gone and the drivers using
> these gpios work as expected.
> 
Ok, you mean test it on board...so will apply into my s5p-fixes-for-linus
for 38-rc.

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] 35+ messages in thread

* RE: [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support
  2011-02-28 10:44     ` Lars-Peter Clausen
@ 2011-02-28 10:57       ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28 10:57 UTC (permalink / raw)
  To: 'Lars-Peter Clausen'
  Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> On 02/28/2011 07:04 AM, Kukjin Kim wrote:
> > Lars-Peter Clausen wrote:
> >>

(snip)

> >>  /* Buttons */
> >>  static struct gpio_keys_button gta02_buttons[] = {
> >>  	{
> >> @@ -533,6 +542,8 @@ static struct platform_device *gta02_devices[]
> > __initdata
> >> = {
> >>  	&samsung_asoc_dma,
> >>  	&s3c_device_i2c0,
> >>  	&gta02_buttons_device,
> >> +	&s3c_device_adc,
> >
> > No need to build plat-samsung/dev-adc.c for this?
> > If you want to add '&s3c_deivce_adc', should add 'select
SAMSUNG_DEV_ADC'
> > into "config MACH_NEO1973_GTA02".
> 
> There appear to be two different definitions for s3c_deivce_adc one is in
> plat-samsung/dev-adc.c the other is in plat-s3c24xx/devs.c. So if I select
> SAMSUNG_DEV_ADC I'll actually get compile errors.
> The definition in plat-s3c24xx/devs.c should probably be dropped, but
thats
> something for a different patch.
> 
Oops, you're right...ok, please keep your current code.
If required, we can do it later :)

(snip)

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] 35+ messages in thread

* RE: [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators
  2011-02-28 10:28     ` Lars-Peter Clausen
@ 2011-02-28 10:58       ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28 10:58 UTC (permalink / raw)
  To: 'Lars-Peter Clausen'
  Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> On 02/28/2011 07:26 AM, Kukjin Kim wrote:
> > Lars-Peter Clausen wrote:
> >>
> >> The pcf50633 regulator driver does not use the state_mem constraints,
so
> >> there
> >> is no use in setting them.
> >>
> >> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> >> ---
> >>  arch/arm/mach-s3c2440/mach-gta02.c |   15 ---------------
> >>  1 files changed, 0 insertions(+), 15 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
> > b/arch/arm/mach-s3c2440/mach-
> >> gta02.c
> >> index e57c4d8..01e0930 100644
> >> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> >> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> >> @@ -283,9 +283,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
> >>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> >>  				.always_on = 1,
> >>  				.apply_uV = 1,
> >> -				.state_mem = {
> >> -					.enabled = 1,
> >> -				},
> >>  			},
> >>  		},
> >>  		[PCF50633_REGULATOR_DOWN1] = {
> >> @@ -304,9 +301,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
> >>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> >>  				.apply_uV = 1,
> >>  				.always_on = 1,
> >> -				.state_mem = {
> >> -					.enabled = 1,
> >> -				},
> >>  			},
> >>  		},
> >>  		[PCF50633_REGULATOR_HCLDO] = {
> >> @@ -325,9 +319,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
> >>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> >>  				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> >>  				.apply_uV = 1,
> >> -				.state_mem = {
> >> -					.enabled = 0,
> >> -				},
> >>  			},
> >>  		},
> >>  		[PCF50633_REGULATOR_LDO2] = {
> >> @@ -362,9 +353,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
> >>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> >>  				.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> >>  				.apply_uV = 1,
> >> -				.state_mem = {
> >> -					.enabled = 1,
> >> -				},
> >>  			},
> >>  		},
> >>  		[PCF50633_REGULATOR_LDO6] = {
> >> @@ -379,9 +367,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
> >>  				.min_uV = 1800000,
> >>  				.max_uV = 1800000,
> >>  				.valid_modes_mask = REGULATOR_MODE_NORMAL,
> >> -				.state_mem = {
> >> -					.enabled = 1,
> >> -				},
> >>  			},
> >>  		},
> >>
> >> --
> >
> > Don't we need regulator_suspend_mem_state_show() on PCF50633?
> >
> >
> No. The pcf50633 driver has no set_suspend_enable or set_suspend_disable
ops.
> So the 'suspend_mem_state' sysfs file does not get registered and that
> function
> is never called.
> 
Ok, will apply.
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] 35+ messages in thread

* Re: [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-02-28 10:44       ` Kukjin Kim
@ 2011-02-28 10:58         ` Lars-Peter Clausen
  2011-03-07  6:42           ` Kukjin Kim
  0 siblings, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-28 10:58 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

On 02/28/2011 11:44 AM, Kukjin Kim wrote:
> Lars-Peter Clausen wrote:
>>
>> On 02/28/2011 07:16 AM, Kukjin Kim wrote:
>>> Lars-Peter Clausen wrote:
>>>>
>>>> Request the gpio pin used to control the usb pullup before using it to
>>> avoid
>>>> a
>>>> runtime warning about an auto-requested gpio.
>>>>
>>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>>> ---
>>>>  arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
>>>>  1 files changed, 15 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
>>> b/arch/arm/mach-s3c2440/mach-
>>>> gta02.c
>>>> index 1396639..94456fa 100644
>>>> --- a/arch/arm/mach-s3c2440/mach-gta02.c
>>>> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
>>>> @@ -451,11 +451,11 @@ static void gta02_udc_command(enum
> s3c2410_udc_cmd_e
>>>> cmd)
>>>>  	switch (cmd) {
>>>>  	case S3C2410_UDC_P_ENABLE:
>>>>  		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
>>>> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
>>>> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);
>>>
>>> How about following instead?
>>> 	gpio_request(GTA02_GPIO_USB_PULLUP, "USB_PULLUP");
>>> 	gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
>>> 	gpio_free(GTA02_GPIO_USB_PULLUP);
>>>
>>
>> I don't think that is a good idea. This gpio should really be reserved for
>> the
>> udc driver. If it is freed again, it could be requested from someone else
>> which
>> could lead to undefined behaviour.
>>
> Yes right, but I mean the board designer already knows the usage of
> regarding GPIOs on his board.
> So why do we really need gpio_request for it?...

Well, for one because it's part of the gpio-api. You should not call any other
gpio functions on a pin unless you've successfully requested that pin.
On the other hand this helps debugging and ensures that the same gpio is not
used by two drivers accident. For example it is also possible to request gpios
from userspace using the gpio sysfs. So by keeping the gpio requested it wont
be possible to request it from userspace by accident. And the gpio will also be
listed in the gpio debugfs file, which can be helpful for debugging as well.

- Lars

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

* [PATCH v2 09/09] ARM: s3c2440: gta02: Add touchscreen support
  2011-02-07  1:52 ` [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support Lars-Peter Clausen
  2011-02-28  6:04   ` Kukjin Kim
@ 2011-02-28 11:17   ` Lars-Peter Clausen
  2011-02-28 11:56     ` Kukjin Kim
  1 sibling, 1 reply; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-02-28 11:17 UTC (permalink / raw)
  To: Ben Dooks, Kukjin Kim; +Cc: linux-arm-kernel, linux-kernel, Lars-Peter Clausen

This patch adds registers the s3c touchscreen and adc devices to add touchscreen
support for the gta02.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 arch/arm/mach-s3c2440/mach-gta02.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 640ca68..12193ad 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -89,6 +89,8 @@
 #include <plat/udc.h>
 #include <plat/gpio-cfg.h>
 #include <plat/iic.h>
+#include <plat/ts.h>
+
 
 static struct pcf50633 *gta02_pcf;
 
@@ -480,6 +482,13 @@ static struct s3c2410_hcd_info gta02_usb_info __initdata = {
 	},
 };
 
+/* Touchscreen */
+static struct s3c2410_ts_mach_info gta02_ts_info = {
+	.delay			= 10000,
+	.presc			= 0xff, /* slow as we can go */
+	.oversampling_shift	= 2,
+};
+
 /* Buttons */
 static struct gpio_keys_button gta02_buttons[] = {
 	{
@@ -533,6 +542,8 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&samsung_asoc_dma,
 	&s3c_device_i2c0,
 	&gta02_buttons_device,
+	&s3c_device_adc,
+	&s3c_device_ts,
 };
 
 /* These guys DO need to be children of PMU. */
@@ -595,6 +606,7 @@ static void __init gta02_machine_init(void)
 #endif
 
 	s3c24xx_udc_set_platdata(&gta02_udc_cfg);
+	s3c24xx_ts_set_platdata(&gta02_ts_info);
 	s3c_ohci_set_platdata(&gta02_usb_info);
 	s3c_nand_set_platdata(&gta02_nand_info);
 	s3c_i2c0_set_platdata(NULL);
-- 
1.7.2.3


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

* RE: [PATCH v2 09/09] ARM: s3c2440: gta02: Add touchscreen support
  2011-02-28 11:17   ` [PATCH v2 " Lars-Peter Clausen
@ 2011-02-28 11:56     ` Kukjin Kim
  0 siblings, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2011-02-28 11:56 UTC (permalink / raw)
  To: 'Lars-Peter Clausen', 'Ben Dooks'
  Cc: linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> This patch adds registers the s3c touchscreen and adc devices to add
> touchscreen
> support for the gta02.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  arch/arm/mach-s3c2440/mach-gta02.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
b/arch/arm/mach-s3c2440/mach-
> gta02.c
> index 640ca68..12193ad 100644
> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> @@ -89,6 +89,8 @@
>  #include <plat/udc.h>
>  #include <plat/gpio-cfg.h>
>  #include <plat/iic.h>
> +#include <plat/ts.h>
> +
> 
>  static struct pcf50633 *gta02_pcf;
> 
> @@ -480,6 +482,13 @@ static struct s3c2410_hcd_info gta02_usb_info
__initdata
> = {
>  	},
>  };
> 
> +/* Touchscreen */
> +static struct s3c2410_ts_mach_info gta02_ts_info = {
> +	.delay			= 10000,
> +	.presc			= 0xff, /* slow as we can go */
> +	.oversampling_shift	= 2,
> +};
> +
>  /* Buttons */
>  static struct gpio_keys_button gta02_buttons[] = {
>  	{
> @@ -533,6 +542,8 @@ static struct platform_device *gta02_devices[]
__initdata
> = {
>  	&samsung_asoc_dma,
>  	&s3c_device_i2c0,
>  	&gta02_buttons_device,
> +	&s3c_device_adc,
> +	&s3c_device_ts,
>  };
> 
>  /* These guys DO need to be children of PMU. */
> @@ -595,6 +606,7 @@ static void __init gta02_machine_init(void)
>  #endif
> 
>  	s3c24xx_udc_set_platdata(&gta02_udc_cfg);
> +	s3c24xx_ts_set_platdata(&gta02_ts_info);
>  	s3c_ohci_set_platdata(&gta02_usb_info);
>  	s3c_nand_set_platdata(&gta02_nand_info);
>  	s3c_i2c0_set_platdata(NULL);
> --
> 1.7.2.3

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] 35+ messages in thread

* RE: [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-02-28 10:58         ` Lars-Peter Clausen
@ 2011-03-07  6:42           ` Kukjin Kim
  2011-03-07  7:00             ` Lars-Peter Clausen
  0 siblings, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2011-03-07  6:42 UTC (permalink / raw)
  To: 'Lars-Peter Clausen'
  Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

Lars-Peter Clausen wrote:
> 
> On 02/28/2011 11:44 AM, Kukjin Kim wrote:
> > Lars-Peter Clausen wrote:
> >>
> >> On 02/28/2011 07:16 AM, Kukjin Kim wrote:
> >>> Lars-Peter Clausen wrote:
> >>>>
> >>>> Request the gpio pin used to control the usb pullup before using it
to
> >>> avoid
> >>>> a
> >>>> runtime warning about an auto-requested gpio.
> >>>>
> >>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> >>>> ---
> >>>>  arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
> >>>>  1 files changed, 15 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
> >>> b/arch/arm/mach-s3c2440/mach-
> >>>> gta02.c
> >>>> index 1396639..94456fa 100644
> >>>> --- a/arch/arm/mach-s3c2440/mach-gta02.c
> >>>> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
> >>>> @@ -451,11 +451,11 @@ static void gta02_udc_command(enum
> > s3c2410_udc_cmd_e
> >>>> cmd)
> >>>>  	switch (cmd) {
> >>>>  	case S3C2410_UDC_P_ENABLE:
> >>>>  		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
> >>>> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
> >>>> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);
> >>>
> >>> How about following instead?
> >>> 	gpio_request(GTA02_GPIO_USB_PULLUP, "USB_PULLUP");
> >>> 	gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
> >>> 	gpio_free(GTA02_GPIO_USB_PULLUP);
> >>>
> >>
> >> I don't think that is a good idea. This gpio should really be reserved
for
> >> the
> >> udc driver. If it is freed again, it could be requested from someone
else
> >> which
> >> could lead to undefined behaviour.
> >>
> > Yes right, but I mean the board designer already knows the usage of
> > regarding GPIOs on his board.
> > So why do we really need gpio_request for it?...
> 
> Well, for one because it's part of the gpio-api. You should not call any
> other
> gpio functions on a pin unless you've successfully requested that pin.
> On the other hand this helps debugging and ensures that the same gpio is
not
> used by two drivers accident. For example it is also possible to request
> gpios
> from userspace using the gpio sysfs. So by keeping the gpio requested it
wont
> be possible to request it from userspace by accident. And the gpio will
also
> be
> listed in the gpio debugfs file, which can be helpful for debugging as
well.
> 
> - Lars

Hi Lars,

Ok, will apply :)
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] 35+ messages in thread

* Re: [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it
  2011-03-07  6:42           ` Kukjin Kim
@ 2011-03-07  7:00             ` Lars-Peter Clausen
  0 siblings, 0 replies; 35+ messages in thread
From: Lars-Peter Clausen @ 2011-03-07  7:00 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: 'Ben Dooks', linux-arm-kernel, linux-kernel

On 03/07/2011 07:42 AM, Kukjin Kim wrote:
> Lars-Peter Clausen wrote:
>>
>> On 02/28/2011 11:44 AM, Kukjin Kim wrote:
>>> Lars-Peter Clausen wrote:
>>>>
>>>> On 02/28/2011 07:16 AM, Kukjin Kim wrote:
>>>>> Lars-Peter Clausen wrote:
>>>>>>
>>>>>> Request the gpio pin used to control the usb pullup before using it
> to
>>>>> avoid
>>>>>> a
>>>>>> runtime warning about an auto-requested gpio.
>>>>>>
>>>>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>>>>> ---
>>>>>>  arch/arm/mach-s3c2440/mach-gta02.c |   17 +++++++++++++++--
>>>>>>  1 files changed, 15 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm/mach-s3c2440/mach-gta02.c
>>>>> b/arch/arm/mach-s3c2440/mach-
>>>>>> gta02.c
>>>>>> index 1396639..94456fa 100644
>>>>>> --- a/arch/arm/mach-s3c2440/mach-gta02.c
>>>>>> +++ b/arch/arm/mach-s3c2440/mach-gta02.c
>>>>>> @@ -451,11 +451,11 @@ static void gta02_udc_command(enum
>>> s3c2410_udc_cmd_e
>>>>>> cmd)
>>>>>>  	switch (cmd) {
>>>>>>  	case S3C2410_UDC_P_ENABLE:
>>>>>>  		pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__);
>>>>>> -		gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
>>>>>> +		gpio_set_value(GTA02_GPIO_USB_PULLUP, 1);
>>>>>
>>>>> How about following instead?
>>>>> 	gpio_request(GTA02_GPIO_USB_PULLUP, "USB_PULLUP");
>>>>> 	gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1);
>>>>> 	gpio_free(GTA02_GPIO_USB_PULLUP);
>>>>>
>>>>
>>>> I don't think that is a good idea. This gpio should really be reserved
> for
>>>> the
>>>> udc driver. If it is freed again, it could be requested from someone
> else
>>>> which
>>>> could lead to undefined behaviour.
>>>>
>>> Yes right, but I mean the board designer already knows the usage of
>>> regarding GPIOs on his board.
>>> So why do we really need gpio_request for it?...
>>
>> Well, for one because it's part of the gpio-api. You should not call any
>> other
>> gpio functions on a pin unless you've successfully requested that pin.
>> On the other hand this helps debugging and ensures that the same gpio is
> not
>> used by two drivers accident. For example it is also possible to request
>> gpios
>> from userspace using the gpio sysfs. So by keeping the gpio requested it
> wont
>> be possible to request it from userspace by accident. And the gpio will
> also
>> be
>> listed in the gpio debugfs file, which can be helpful for debugging as
> well.
>>
>> - Lars
> 
> Hi Lars,
> 
> Ok, will apply :)
> Thanks.
> 
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> 

Hi Kgene

Actually I've prepared another patch, which I'm was about to send in a few
minutes, which moves the controlling of the pullup pin to the udc driver.

- Lars

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

end of thread, other threads:[~2011-03-07  7:14 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07  1:51 [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
2011-02-07  1:51 ` [PATCH 02/09] ARM: s3c2440: gta02: Register PCM device Lars-Peter Clausen
2011-02-28  6:38   ` Kukjin Kim
2011-02-07  1:51 ` [PATCH 03/09] ARM: s3c2440: gta02: Add button support Lars-Peter Clausen
2011-02-28  6:37   ` Kukjin Kim
2011-02-07  1:51 ` [PATCH 04/09] ARM: s3c2440: gta02: Select missing S3C_DEV_USB_HOST Lars-Peter Clausen
2011-02-28  6:31   ` Kukjin Kim
2011-02-07  1:51 ` [PATCH 05/09] ARM: s3c2440: gta02: Fix regulator valid_modes_ops Lars-Peter Clausen
2011-02-28  6:48   ` Kukjin Kim
2011-02-07  1:51 ` [PATCH 06/09] ARM: s3c2440: gta02: Remove state_mem constraints for the pcf50633 regulators Lars-Peter Clausen
2011-02-28  6:26   ` Kukjin Kim
2011-02-28 10:28     ` Lars-Peter Clausen
2011-02-28 10:58       ` Kukjin Kim
2011-02-07  1:51 ` [PATCH 07/09] ARM: s3c2440: gta02: Call regulator_has_full_constraints Lars-Peter Clausen
2011-02-07 11:58   ` Mark Brown
2011-02-08  2:55   ` [PATCH v2 " Lars-Peter Clausen
2011-02-28  6:47     ` Kukjin Kim
2011-02-07  1:52 ` [PATCH 08/09] ARM: s3c2440: gta02: Request usb pullup pin before using it Lars-Peter Clausen
2011-02-28  6:16   ` Kukjin Kim
2011-02-28 10:25     ` Lars-Peter Clausen
2011-02-28 10:44       ` Kukjin Kim
2011-02-28 10:58         ` Lars-Peter Clausen
2011-03-07  6:42           ` Kukjin Kim
2011-03-07  7:00             ` Lars-Peter Clausen
2011-02-07  1:52 ` [PATCH 09/09] ARM: s3c2440: gta02: Add touchscreen support Lars-Peter Clausen
2011-02-28  6:04   ` Kukjin Kim
2011-02-28 10:44     ` Lars-Peter Clausen
2011-02-28 10:57       ` Kukjin Kim
2011-02-28 11:17   ` [PATCH v2 " Lars-Peter Clausen
2011-02-28 11:56     ` Kukjin Kim
2011-02-18 10:41 ` [PATCH 01/09] ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions Lars-Peter Clausen
2011-02-21  9:58   ` Kukjin Kim
2011-02-28  6:41 ` Kukjin Kim
2011-02-28 10:46   ` Lars-Peter Clausen
2011-02-28 10:49     ` Kukjin Kim

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).