All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Kumar <ajaykumar.rs-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	seanpaul-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	ajaynumb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	joshi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	prashanth.g-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	Ajay Kumar <ajaykumar.rs-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH 10/15] drm/panel: s6e8aa0: Add proper definition for prepare and unprepare
Date: Thu, 31 Jul 2014 23:12:09 +0530	[thread overview]
Message-ID: <1406828534-10072-11-git-send-email-ajaykumar.rs@samsung.com> (raw)
In-Reply-To: <1406828534-10072-1-git-send-email-ajaykumar.rs-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Move out code from enable and disable routines to prepare
and unprepare routines, so that functionality is properly
distributed across all the panel functions.

Signed-off-by: Ajay Kumar <ajaykumar.rs-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/gpu/drm/panel/panel-s6e8aa0.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c
index 60694dd..cf4be7f 100644
--- a/drivers/gpu/drm/panel/panel-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c
@@ -889,6 +889,11 @@ static int s6e8aa0_power_off(struct s6e8aa0 *ctx)
 
 static int s6e8aa0_disable(struct drm_panel *panel)
 {
+	return 0;
+}
+
+static int s6e8aa0_unprepare(struct drm_panel *panel)
+{
 	struct s6e8aa0 *ctx = panel_to_s6e8aa0(panel);
 
 	s6e8aa0_dcs_write_seq_static(ctx, MIPI_DCS_ENTER_SLEEP_MODE);
@@ -900,18 +905,8 @@ static int s6e8aa0_disable(struct drm_panel *panel)
 	return s6e8aa0_power_off(ctx);
 }
 
-static int s6e8aa0_unprepare(struct drm_panel *panel)
-{
-	return 0;
-}
-
 static int s6e8aa0_prepare(struct drm_panel *panel)
 {
-	return 0;
-}
-
-static int s6e8aa0_enable(struct drm_panel *panel)
-{
 	struct s6e8aa0 *ctx = panel_to_s6e8aa0(panel);
 	int ret;
 
@@ -923,11 +918,16 @@ static int s6e8aa0_enable(struct drm_panel *panel)
 	ret = ctx->error;
 
 	if (ret < 0)
-		s6e8aa0_disable(panel);
+		s6e8aa0_unprepare(panel);
 
 	return ret;
 }
 
+static int s6e8aa0_enable(struct drm_panel *panel)
+{
+	return 0;
+}
+
 static int s6e8aa0_get_modes(struct drm_panel *panel)
 {
 	struct drm_connector *connector = panel->connector;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-07-31 17:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 17:41 [PATCH 00/15] drm/panel: Add prepare and unprepare routines Ajay Kumar
2014-07-31 17:42 ` [PATCH 03/15] drm/panel: ld9040: Add dummy " Ajay Kumar
2014-07-31 17:42 ` [PATCH 04/15] drm/panel: s6e8aa0: " Ajay Kumar
2014-07-31 17:42 ` [PATCH 05/15] drm/panel: simple: " Ajay Kumar
     [not found] ` <1406828534-10072-1-git-send-email-ajaykumar.rs-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-07-31 17:42   ` [PATCH 01/15] drm/panel: add " Ajay Kumar
2014-08-05  9:00     ` Andrzej Hajda
2014-08-05  9:11     ` Andrzej Hajda
2014-07-31 17:42   ` [PATCH 02/15] drm/panel: Add get_modes helper Ajay Kumar
2014-07-31 17:42   ` [PATCH 06/15] drm/exynos: dpi: Add support for panel prepare and unprepare routines Ajay Kumar
2014-08-01  9:04     ` Thierry Reding
2014-08-01  9:24       ` Inki Dae
2014-08-01 10:22         ` Thierry Reding
2014-07-31 17:42   ` [PATCH 07/15] drm/exynos: dsi: " Ajay Kumar
2014-08-01  9:05     ` Thierry Reding
2014-08-03  7:58       ` Inki Dae
2014-08-05 10:03     ` Andrzej Hajda
2014-08-05 16:11       ` Ajay kumar
2014-07-31 17:42   ` Ajay Kumar [this message]
2014-07-31 17:42   ` [PATCH 14/15] drm/exynos: Move DP setup into commit() Ajay Kumar
2014-08-01  9:18     ` Thierry Reding
2014-08-01  9:41       ` Ajay kumar
2014-08-01 10:21         ` Thierry Reding
2014-07-31 17:42 ` [PATCH 08/15] drm/tegra: Add support for panel prepare and unprepare routines Ajay Kumar
2014-07-31 17:42 ` [PATCH 09/15] drm/panel: ld9040: Add proper definition for prepare and unprepare Ajay Kumar
2014-07-31 17:42 ` [PATCH 11/15] drm/panel: simple: " Ajay Kumar
2014-07-31 17:42 ` [PATCH 12/15] drm/panel: simple: Support usage of delays in panel functions Ajay Kumar
2014-07-31 17:42 ` [PATCH 13/15] drm/panel: simple: Add support for auo_b133htn01 panel Ajay Kumar
2014-07-31 17:42 ` [PATCH 15/15] drm/exynos: dp: Modify driver to support drm_panel Ajay Kumar
2014-08-01  9:09   ` Thierry Reding
2014-08-01  9:26     ` Inki Dae
2014-08-01 10:59 ` [PATCH 00/15] drm/panel: Add prepare and unprepare routines Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406828534-10072-11-git-send-email-ajaykumar.rs@samsung.com \
    --to=ajaykumar.rs-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=ajaynumb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=joshi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=prashanth.g-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=seanpaul-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.