* [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable()
@ 2012-03-19 15:02 Mark Brown
2012-03-19 15:02 ` [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay Mark Brown
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Mark Brown @ 2012-03-19 15:02 UTC (permalink / raw)
To: Tomi Valkeinen, Florian Tobias Schandinat
Cc: Grazvydas Ignotas, linux-omap, linux-fbdev, Mark Brown
It is possible for regulator_enable() to fail and if it does fail that's
generally a bad sign for anything we try to do with the hardware afterwards
so check for and immediately return an error if regulator_enable() fails.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
.../video/omap2/displays/panel-tpo-td043mtea1.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index 32f3fcd..74c6b87 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -272,11 +272,14 @@ static const struct omap_video_timings tpo_td043_timings = {
static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043)
{
int nreset_gpio = tpo_td043->nreset_gpio;
+ int r;
if (tpo_td043->powered_on)
return 0;
- regulator_enable(tpo_td043->vcc_reg);
+ r = regulator_enable(tpo_td043->vcc_reg);
+ if (r != 0)
+ return r;
/* wait for regulator to stabilize */
msleep(160);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay
2012-03-19 15:02 [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Mark Brown
@ 2012-03-19 15:02 ` Mark Brown
2012-03-19 16:06 ` Grazvydas Ignotas
2012-03-19 16:01 ` [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Grazvydas Ignotas
2012-03-21 12:50 ` Tomi Valkeinen
2 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2012-03-19 15:02 UTC (permalink / raw)
To: Tomi Valkeinen, Florian Tobias Schandinat
Cc: Grazvydas Ignotas, linux-omap, linux-fbdev, Mark Brown
Since any power on stabilisation delay for the supply itself should be
taken care of transparently by the regulator API when the regulator is
enabled the additional delay that the TPO-TD03MTEA1 driver adds after
that returned should be due to the requirements of the device itself
rather than the supply (the delay is also suspicously long for one for
a regulator to ramp). Correct the comment to avoid misleading people
taking this code as a reference.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
.../video/omap2/displays/panel-tpo-td043mtea1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index 74c6b87..987cb84 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -281,7 +281,7 @@ static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043)
if (r != 0)
return r;
- /* wait for regulator to stabilize */
+ /* wait for panel to stabilize */
msleep(160);
if (gpio_is_valid(nreset_gpio))
--
1.7.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable()
2012-03-19 15:02 [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Mark Brown
2012-03-19 15:02 ` [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay Mark Brown
@ 2012-03-19 16:01 ` Grazvydas Ignotas
2012-03-21 12:50 ` Tomi Valkeinen
2 siblings, 0 replies; 5+ messages in thread
From: Grazvydas Ignotas @ 2012-03-19 16:01 UTC (permalink / raw)
To: Mark Brown
Cc: Tomi Valkeinen, Florian Tobias Schandinat, linux-omap,
linux-fbdev
On Mon, Mar 19, 2012 at 5:02 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> It is possible for regulator_enable() to fail and if it does fail that's
> generally a bad sign for anything we try to do with the hardware afterwards
> so check for and immediately return an error if regulator_enable() fails.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> .../video/omap2/displays/panel-tpo-td043mtea1.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
FWIW:
Acked-by: Grazvydas Ignotas <notasas@gmail.com>
--
Gražvydas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay
2012-03-19 15:02 ` [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay Mark Brown
@ 2012-03-19 16:06 ` Grazvydas Ignotas
0 siblings, 0 replies; 5+ messages in thread
From: Grazvydas Ignotas @ 2012-03-19 16:06 UTC (permalink / raw)
To: Mark Brown
Cc: Tomi Valkeinen, Florian Tobias Schandinat, linux-omap,
linux-fbdev
On Mon, Mar 19, 2012 at 5:02 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> Since any power on stabilisation delay for the supply itself should be
> taken care of transparently by the regulator API when the regulator is
> enabled the additional delay that the TPO-TD03MTEA1 driver adds after
> that returned should be due to the requirements of the device itself
> rather than the supply (the delay is also suspicously long for one for
> a regulator to ramp).
True, it came from panel's datasheet which asks to wait for ">10ms + 7
vsyncs" after tuning on the supply and before switching the control
signal.
> Correct the comment to avoid misleading people
> taking this code as a reference.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> .../video/omap2/displays/panel-tpo-td043mtea1.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
FWIW:
Acked-by: Grazvydas Ignotas <notasas@gmail.com>
--
Gražvydas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable()
2012-03-19 15:02 [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Mark Brown
2012-03-19 15:02 ` [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay Mark Brown
2012-03-19 16:01 ` [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Grazvydas Ignotas
@ 2012-03-21 12:50 ` Tomi Valkeinen
2 siblings, 0 replies; 5+ messages in thread
From: Tomi Valkeinen @ 2012-03-21 12:50 UTC (permalink / raw)
To: Mark Brown
Cc: Florian Tobias Schandinat, Grazvydas Ignotas, linux-omap,
linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
On Mon, 2012-03-19 at 15:02 +0000, Mark Brown wrote:
> It is possible for regulator_enable() to fail and if it does fail that's
> generally a bad sign for anything we try to do with the hardware afterwards
> so check for and immediately return an error if regulator_enable() fails.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> .../video/omap2/displays/panel-tpo-td043mtea1.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
> index 32f3fcd..74c6b87 100644
> --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
> +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
> @@ -272,11 +272,14 @@ static const struct omap_video_timings tpo_td043_timings = {
> static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043)
> {
> int nreset_gpio = tpo_td043->nreset_gpio;
> + int r;
>
> if (tpo_td043->powered_on)
> return 0;
>
> - regulator_enable(tpo_td043->vcc_reg);
> + r = regulator_enable(tpo_td043->vcc_reg);
> + if (r != 0)
> + return r;
>
> /* wait for regulator to stabilize */
> msleep(160);
Thanks, I'll apply this series to omapdss tree.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-21 12:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 15:02 [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Mark Brown
2012-03-19 15:02 ` [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay Mark Brown
2012-03-19 16:06 ` Grazvydas Ignotas
2012-03-19 16:01 ` [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Grazvydas Ignotas
2012-03-21 12:50 ` Tomi Valkeinen
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).