Skip to contentSkip to conversation

ARM: EXYNOS4: enabled lcd and backlight in NURI board

PATCH Superseded Donghwa Lee 2 participants 3 messages Mar 7, 2011

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: EXYNOS4: enabled lcd and backlight in NURI board

This patch enables lcd and backlight drivers in NURI board.

---
Changes since v1:
- Adds backlight platform data to control brightness and GPIO
- Modify inappropriate function name and remove useless codes.
- And so on.

 arch/arm/mach-exynos4/Kconfig     |    1 +
 arch/arm/mach-exynos4/mach-nuri.c |   81 +++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 0 deletions(-)
arch/arm/mach-exynos4/Kconfig +1 -0
index 5bf00b9..de31e4d 100644
@@ -135,6 +135,7 @@ config MACH_NURI
 	select EXYNOS4_SETUP_I2C1
 	select EXYNOS4_SETUP_I2C5
 	select EXYNOS4_SETUP_SDHCI
+	select SAMSUNG_DEV_PWM
 	help
 	  Machine support for Samsung Mobile NURI Board.
 
arch/arm/mach-exynos4/mach-nuri.c +81 -0

107 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#1 lore raw

PATCH v2 1/1 ARM: EXYNOS4: enabled lcd and backlight in NURI board

Quoted 11 lines · Donghwa Lee

This patch enables lcd and backlight drivers in NURI board.

---
Changes since v1:
- Adds backlight platform data to control brightness and GPIO
- Modify inappropriate function name and remove useless codes.
- And so on.

Quoted 4 lines
 arch/arm/mach-exynos4/Kconfig     |    1 +
 arch/arm/mach-exynos4/mach-nuri.c |   81
+++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 0 deletions(-)

Thanks for re-work :)
There are small comments below.

(snip)

Quoted 1 line

+static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int

power)

arch/arm/mach-exynos4/mach-nuri.c static struct platform_device nuri_gpio_keys = { · line 195

Quoted 7 lines
arch/arm/mach-exynos4/mach-nuri.c +7 -0
+{
+	int gpio = EXYNOS4_GPE1(5);
+
+	if (power)
+		gpio_direction_output(gpio, 1);
+	else
+		gpio_direction_output(gpio, 0);
	gpio_direction_output(gpio, power);

arch/arm/mach-exynos4/mach-nuri.c static struct platform_device nuri_gpio_keys = { · line 206

Quoted 11 lines
arch/arm/mach-exynos4/mach-nuri.c +11 -0
+}
+
+static int nuri_bl_init(struct device *dev)
+{
+	int ret, gpio = EXYNOS4_GPE2(3);
+
+	ret = gpio_request(gpio, "LCD_LDO_EN");
+	if (!ret)
+		gpio_direction_output(gpio, 0);
+
+	return 0;
	return ret;
Quoted 1 line

+}

(snip)

arch/arm/mach-exynos4/mach-nuri.c static struct platform_device nuri_gpio_keys = { · line 252

Quoted 5 lines
arch/arm/mach-exynos4/mach-nuri.c +5 -0
+static struct platform_device nuri_lcd_device = {
+	.name			= "platform-lcd",
+	.id			= -1,
+	.dev			= {
+		.platform_data	= (void *) &nuri_lcd_platform_data,

.platform_data = &nuri_lcd_platform_data,

Review

Quoted 2 lines
(quoted diff) +2 -0
+	},
+};

(snip)

You used gpio_request() for EXYNOS4_GPE2(3) and EXYNOS4_GPE1(5), but EXYNOS4_GPE1(5). Is there any reason or policy for it?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#2 lore raw

PATCH v2 1/1 ARM: EXYNOS4: enabled lcd and backlight in NURI board

Thank you for your comments.
I had answer below and will fix it along your comments.

Quoted 22 lines · Kukjin Kim
Quoted 10 lines · Donghwa Lee

This patch enables lcd and backlight drivers in NURI board.

---
Changes since v1:
- Adds backlight platform data to control brightness and GPIO
- Modify inappropriate function name and remove useless codes.
- And so on.

Quoted 4 lines
 arch/arm/mach-exynos4/Kconfig     |    1 +
 arch/arm/mach-exynos4/mach-nuri.c |   81
+++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 0 deletions(-)

Thanks for re-work :)
There are small comments below.

(snip)

Quoted 1 line

+static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int

power)

Quoted 9 lines

arch/arm/mach-exynos4/mach-nuri.c static struct platform_device nuri_gpio_keys = { · line 195

Quoted 7 lines
arch/arm/mach-exynos4/mach-nuri.c +7 -0
+{
+	int gpio = EXYNOS4_GPE1(5);
+
+	if (power)
+		gpio_direction_output(gpio, 1);
+	else
+		gpio_direction_output(gpio, 0);
	gpio_direction_output(gpio, power);

Ok, I will fix it.

Quoted 4 lines
Quoted 4 lines
arch/arm/mach-exynos4/mach-nuri.c +4 -0
+}
+
+static int nuri_bl_init(struct device *dev)
+{
Quoted 9 lines

arch/arm/mach-exynos4/mach-nuri.c static struct platform_device nuri_gpio_keys = { · line 206

Quoted 7 lines
arch/arm/mach-exynos4/mach-nuri.c +7 -0
+	int ret, gpio = EXYNOS4_GPE2(3);
+
+	ret = gpio_request(gpio, "LCD_LDO_EN");
+	if (!ret)
+		gpio_direction_output(gpio, 0);
+
+	return 0;
	return ret;

I will fix it.

Quoted 10 lines
Quoted 1 line

+}

(snip)

arch/arm/mach-exynos4/mach-nuri.c static struct platform_device nuri_gpio_keys = { · line 252

Quoted 5 lines
arch/arm/mach-exynos4/mach-nuri.c +5 -0
+static struct platform_device nuri_lcd_device = {
+	.name			= "platform-lcd",
+	.id			= -1,
+	.dev			= {
+		.platform_data	= (void *) &nuri_lcd_platform_data,

.platform_data = &nuri_lcd_platform_data,

Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+	},
+};

I will fix it.

Quoted 6 lines

(snip)

You used gpio_request() for EXYNOS4_GPE2(3) and EXYNOS4_GPE1(5), but EXYNOS4_GPE1(5). Is there any reason or policy for it?

You mean why I left out the gpio_free() after gpio_request(), right? There was my mistake, I will add it.

Thank you,
Donghwa Lee