From afbb1edcd48bc7e2d90d6ae9ea5aa662d222c07c Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 28 Feb 2011 15:24:07 +0900 Subject: ARM: S3C2440: Register PCM device on GTA02 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 Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2440/mach-gta02.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 9f2c14ec7181..e83062bde416 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 = { >a02_nor_flash, &s3c24xx_pwm_device, &s3c_device_iis, + &samsung_asoc_dma, &s3c_device_i2c0, }; -- cgit v1.2.1 From 003ddede62892f332992b200b1a1d7506f253d56 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 28 Feb 2011 15:24:34 +0900 Subject: ARM: S3C2440: Add button support on GTA02 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 Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2440/mach-gta02.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index e83062bde416..6629998bafdc 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -58,6 +58,9 @@ #include #include +#include +#include + #include #include #include @@ -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 = >a02_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, + >a02_buttons_device, }; /* These guys DO need to be children of PMU. */ -- cgit v1.2.1 From 7cda34407714b17db73d59f8fa9e9b62ee594ebf Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 28 Feb 2011 15:25:08 +0900 Subject: ARM: S3C2440: Fix regulator valid_modes_ops on GTA02 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 Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2440/mach-gta02.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 6629998bafdc..e57c4d851299 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, -- cgit v1.2.1 From 3c861b88d0c2a1099b75c7a28648514cc67c8be6 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 28 Feb 2011 15:25:43 +0900 Subject: ARM: S3C2440: Call regulator_has_full_constraints on GTA02 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 Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2440/mach-gta02.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index e57c4d851299..66004212380c 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -605,6 +605,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(); } -- cgit v1.2.1 From 5246ae86770d084abff091a6090ca82bde8e2083 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 28 Feb 2011 20:22:58 +0900 Subject: ARM: S3C2440: Remove state_mem constraints for the pcf50633 regulators on GTA02 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 Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2440/mach-gta02.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 66004212380c..2682592ede5e 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, - }, }, }, -- cgit v1.2.1 From d73af18330ca5c17e03d36d436b5642ae764467f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 28 Feb 2011 20:26:36 +0900 Subject: ARM: S3C2440: Add touchscreen support on GTA02 This patch adds registers the s3c touchscreen and adc devices to add touchscreen support for the gta02. Signed-off-by: Lars-Peter Clausen Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2440/mach-gta02.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 2682592ede5e..d217ef3cd86a 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -89,6 +89,8 @@ #include #include #include +#include + 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, >a02_buttons_device, + &s3c_device_adc, + &s3c_device_ts, }; /* These guys DO need to be children of PMU. */ @@ -582,6 +593,7 @@ static void __init gta02_machine_init(void) #endif s3c24xx_udc_set_platdata(>a02_udc_cfg); + s3c24xx_ts_set_platdata(>a02_ts_info); s3c_ohci_set_platdata(>a02_usb_info); s3c_nand_set_platdata(>a02_nand_info); s3c_i2c0_set_platdata(NULL); -- cgit v1.2.1