* [PATCH 0/3] omap3: devkit8000: misc fixes
@ 2011-01-14 0:03 Daniel Morsing
2011-01-14 0:03 ` [PATCH 1/3] omap3: devkit8000: Fix indentation issue Daniel Morsing
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Daniel Morsing @ 2011-01-14 0:03 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Thomas Weber, Daniel Morsing
Here is a set of misc fixes for the devkit8000.
The only really notable one is the lcd enable gpio fix. It gets rid
of some nasty low level twl4030 calls and replaces them with generic gpio
calls. It also fixes a bug where the screen would not turn off when
blanking.
Daniel Morsing (3):
omap3: devkit8000: Fix indentation issue
omap3: devkit8000: fix tps65930 pullup/pulldown configuration
omap3: devkit8000: Use generic gpio for second lcd enable
arch/arm/mach-omap2/board-devkit8000.c | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] omap3: devkit8000: Fix indentation issue
2011-01-14 0:03 [PATCH 0/3] omap3: devkit8000: misc fixes Daniel Morsing
@ 2011-01-14 0:03 ` Daniel Morsing
2011-01-14 0:03 ` [PATCH 2/3] omap3: devkit8000: fix tps65930 pullup/pulldown configuration Daniel Morsing
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Daniel Morsing @ 2011-01-14 0:03 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Thomas Weber, Daniel Morsing
Comment line uses 8 spaces as indentation. Replace with a hard tab
Signed-off-by: Daniel Morsing <daniel.morsing@gmail.com>
---
arch/arm/mach-omap2/board-devkit8000.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 451e7ff..864a08f 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -245,7 +245,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
- /* gpio + 1 is "LCD_PWREN" (out, active high) */
+ /* gpio + 1 is "LCD_PWREN" (out, active high) */
devkit8000_lcd_device.reset_gpio = gpio + 1;
gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN");
/* Disable until needed */
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] omap3: devkit8000: fix tps65930 pullup/pulldown configuration
2011-01-14 0:03 [PATCH 0/3] omap3: devkit8000: misc fixes Daniel Morsing
2011-01-14 0:03 ` [PATCH 1/3] omap3: devkit8000: Fix indentation issue Daniel Morsing
@ 2011-01-14 0:03 ` Daniel Morsing
2011-01-14 11:49 ` Daniel Morsing
2011-01-14 0:03 ` [PATCH 3/3] omap3: devkit8000: Use generic gpio for second lcd enable Daniel Morsing
2011-01-14 8:48 ` [PATCH 0/3] omap3: devkit8000: misc fixes Thomas Weber
3 siblings, 1 reply; 7+ messages in thread
From: Daniel Morsing @ 2011-01-14 0:03 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Thomas Weber, Daniel Morsing
gpio1 and gpio7 on the tps65930 are used as outputs on the devkit8000.
Remove them from the pu/pd configuration.
Signed-off-by: Daniel Morsing <daniel.morsing@gmail.com>
---
arch/arm/mach-omap2/board-devkit8000.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 864a08f..8dc7a24 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -265,9 +265,8 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
.irq_base = TWL4030_GPIO_IRQ_BASE,
.irq_end = TWL4030_GPIO_IRQ_END,
.use_leds = true,
- .pullups = BIT(1),
- .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
- | BIT(15) | BIT(16) | BIT(17),
+ .pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13) | BIT(15)
+ | BIT(16) | BIT(17),
.setup = devkit8000_twl_gpio_setup,
};
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] omap3: devkit8000: Use generic gpio for second lcd enable
2011-01-14 0:03 [PATCH 0/3] omap3: devkit8000: misc fixes Daniel Morsing
2011-01-14 0:03 ` [PATCH 1/3] omap3: devkit8000: Fix indentation issue Daniel Morsing
2011-01-14 0:03 ` [PATCH 2/3] omap3: devkit8000: fix tps65930 pullup/pulldown configuration Daniel Morsing
@ 2011-01-14 0:03 ` Daniel Morsing
2011-01-14 8:48 ` [PATCH 0/3] omap3: devkit8000: misc fixes Thomas Weber
3 siblings, 0 replies; 7+ messages in thread
From: Daniel Morsing @ 2011-01-14 0:03 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Thomas Weber, Daniel Morsing
The Devkit8000 uses 2 gpios for the lcd enable line. twl4030_gpio1 and
twl4030_ledA, with ledA configured as an output only gpio. gpio1 is used
through the generic gpio functions while ledA is used via low level
twl4030 calls. Remove the low level calls and use the generic gpio
functions for initialization and use of ledA.
This also fixes a bug where the lcd would not power down when blanking.
Signed-off-by: Daniel Morsing <daniel.morsing@gmail.com>
---
arch/arm/mach-omap2/board-devkit8000.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 8dc7a24..c1fdb1e 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -112,10 +112,16 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */
};
+/* This board uses 2 gpios for the lcd reset line, so use
+ * omap_dss_device.reset_gpio for storing one and this variable
+ * for storing the other.
+ */
+static int lcd_enable_gpio = -EINVAL; /* will be replaced */
+
static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
{
- twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1);
- twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0);
+ if (gpio_is_valid(lcd_enable_gpio))
+ gpio_set_value_cansleep(lcd_enable_gpio, 1);
if (gpio_is_valid(dssdev->reset_gpio))
gpio_set_value_cansleep(dssdev->reset_gpio, 1);
@@ -124,6 +130,9 @@ static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
{
+ if (gpio_is_valid(lcd_enable_gpio))
+ gpio_set_value_cansleep(lcd_enable_gpio, 0);
+
if (gpio_is_valid(dssdev->reset_gpio))
gpio_set_value_cansleep(dssdev->reset_gpio, 0);
}
@@ -251,6 +260,12 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
/* Disable until needed */
gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0);
+ /* TWL4030_GPIO_MAX + 0 == ledA which is also "LCD_PWREN" */
+ lcd_enable_gpio = gpio + TWL4030_GPIO_MAX + 0;
+ gpio_request(lcd_enable_gpio, "LCD_PWREN");
+ /* Disable until needed */
+ gpio_direction_output(lcd_enable_gpio, 0);
+
/* gpio + 7 is "DVI_PD" (out, active low) */
devkit8000_dvi_device.reset_gpio = gpio + 7;
gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown");
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] omap3: devkit8000: misc fixes
2011-01-14 0:03 [PATCH 0/3] omap3: devkit8000: misc fixes Daniel Morsing
` (2 preceding siblings ...)
2011-01-14 0:03 ` [PATCH 3/3] omap3: devkit8000: Use generic gpio for second lcd enable Daniel Morsing
@ 2011-01-14 8:48 ` Thomas Weber
2011-01-14 9:44 ` Daniel Morsing
3 siblings, 1 reply; 7+ messages in thread
From: Thomas Weber @ 2011-01-14 8:48 UTC (permalink / raw)
To: Daniel Morsing; +Cc: Tony Lindgren, linux-omap
Am 14.01.2011 01:03, schrieb Daniel Morsing:
> Here is a set of misc fixes for the devkit8000.
>
> The only really notable one is the lcd enable gpio fix. It gets rid
> of some nasty low level twl4030 calls and replaces them with generic gpio
> calls. It also fixes a bug where the screen would not turn off when
> blanking.
>
> Daniel Morsing (3):
> omap3: devkit8000: Fix indentation issue
> omap3: devkit8000: fix tps65930 pullup/pulldown configuration
> omap3: devkit8000: Use generic gpio for second lcd enable
>
> arch/arm/mach-omap2/board-devkit8000.c | 26 ++++++++++++++++++++------
> 1 files changed, 20 insertions(+), 6 deletions(-)
>
Hello Daniel,
the LCD_PWREN is connected to TWL4030 LEDA only.
The TWL4030 GPIO.1 has a not connected resistor (R61).
My test case is:
# echo 0 > /sys/devices/omapdss/display0/enabled
# echo 1 > /sys/devices/omapdss/display0/enabled
I changed your patch the following way.
I think I cannot write a sign-off-by for you.
Thomas
-----
commit b93fb7d72993e20de4cedb9393dda793c88c7deb
Author: Daniel Morsing <daniel.morsing@gmail.com>
Date: Fri Jan 14 00:03:29 2011 +0000
OMAP3: Devkit8000: Use generic gpio for lcd power pin
The reset_gpio pin for lcd is connected with TWL4030 LedA.
The TWL4030 GPIO.1 has a not connected resistor in the line.
Reported-by: Daniel Morsing <daniel.morsing@gmail.com>
Signed-off-by: Thomas Weber <weber@corscience.de>
diff --git a/arch/arm/mach-omap2/board-devkit8000.c
b/arch/arm/mach-omap2/board-devkit8000.c
index 8dc7a24..54f1f7f 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -114,9 +114,6 @@ static struct omap2_hsmmc_info mmc[] = {
static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
{
- twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1);
- twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0);
-
if (gpio_is_valid(dssdev->reset_gpio))
gpio_set_value_cansleep(dssdev->reset_gpio, 1);
return 0;
@@ -245,8 +242,8 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
- /* gpio + 1 is "LCD_PWREN" (out, active high) */
- devkit8000_lcd_device.reset_gpio = gpio + 1;
+ /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
+ devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0;
gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN");
/* Disable until needed */
gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] omap3: devkit8000: misc fixes
2011-01-14 8:48 ` [PATCH 0/3] omap3: devkit8000: misc fixes Thomas Weber
@ 2011-01-14 9:44 ` Daniel Morsing
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Morsing @ 2011-01-14 9:44 UTC (permalink / raw)
To: Thomas Weber; +Cc: Tony Lindgren, linux-omap
On Fri, 2011-01-14 at 09:48 +0100, Thomas Weber wrote:
> Hello Daniel,
>
> the LCD_PWREN is connected to TWL4030 LEDA only.
> The TWL4030 GPIO.1 has a not connected resistor (R61).
>
> My test case is:
>
> # echo 0 > /sys/devices/omapdss/display0/enabled
> # echo 1 > /sys/devices/omapdss/display0/enabled
>
>
> I changed your patch the following way.
I just checked and you are correct. This would also mean that the
pullup/pulldown patch is incorrect since gpio.1 is now not connected and
should be pulled down.
> I think I cannot write a sign-off-by for you.
Fine by me.
> Author: Daniel Morsing <daniel.morsing@gmail.com>
I don't think i can rightfully call myself the author of this patch
anymore :)
Regards,
Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] omap3: devkit8000: fix tps65930 pullup/pulldown configuration
2011-01-14 0:03 ` [PATCH 2/3] omap3: devkit8000: fix tps65930 pullup/pulldown configuration Daniel Morsing
@ 2011-01-14 11:49 ` Daniel Morsing
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Morsing @ 2011-01-14 11:49 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Thomas Weber
gpio7 on the tps65930 is used as an output on the devkit8000 and gpio1
is not connected. Remove gpio7 and change gpio1 to pulldown
Signed-off-by: Daniel Morsing <daniel.morsing@gmail.com>
---
Since Thomas pointed out that I am unable to read schemas, here's
an updated fix.
arch/arm/mach-omap2/board-devkit8000.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 864a08f..81c8f38 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -265,8 +265,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
.irq_base = TWL4030_GPIO_IRQ_BASE,
.irq_end = TWL4030_GPIO_IRQ_END,
.use_leds = true,
- .pullups = BIT(1),
- .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
+ .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13)
| BIT(15) | BIT(16) | BIT(17),
.setup = devkit8000_twl_gpio_setup,
};
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-01-14 11:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 0:03 [PATCH 0/3] omap3: devkit8000: misc fixes Daniel Morsing
2011-01-14 0:03 ` [PATCH 1/3] omap3: devkit8000: Fix indentation issue Daniel Morsing
2011-01-14 0:03 ` [PATCH 2/3] omap3: devkit8000: fix tps65930 pullup/pulldown configuration Daniel Morsing
2011-01-14 11:49 ` Daniel Morsing
2011-01-14 0:03 ` [PATCH 3/3] omap3: devkit8000: Use generic gpio for second lcd enable Daniel Morsing
2011-01-14 8:48 ` [PATCH 0/3] omap3: devkit8000: misc fixes Thomas Weber
2011-01-14 9:44 ` Daniel Morsing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox