From patchwork Tue Apr 19 09:22:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 717681 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3J9NAfv020295 for ; Tue, 19 Apr 2011 09:23:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754568Ab1DSJXM (ORCPT ); Tue, 19 Apr 2011 05:23:12 -0400 Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]:57029 "EHLO na3sys009aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491Ab1DSJXH (ORCPT ); Tue, 19 Apr 2011 05:23:07 -0400 Received: from mail-ey0-f176.google.com ([209.85.215.176]) (using TLSv1) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKTa1UeuJsO9K+Q3VRl3UthiaaQfI694wM@postini.com; Tue, 19 Apr 2011 02:23:06 PDT Received: by mail-ey0-f176.google.com with SMTP id 28so2374489eya.35 for ; Tue, 19 Apr 2011 02:23:05 -0700 (PDT) Received: by 10.213.97.30 with SMTP id j30mr2552852ebn.20.1303204985690; Tue, 19 Apr 2011 02:23:05 -0700 (PDT) Received: from deskari (a62-248-131-233.elisa-laajakaista.fi [62.248.131.233]) by mx.google.com with ESMTPS id m55sm4672311eei.8.2011.04.19.02.23.04 (version=SSLv3 cipher=OTHER); Tue, 19 Apr 2011 02:23:04 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 17/19] OMAP: DSS2: Taal: Separate panel reset Date: Tue, 19 Apr 2011 12:22:20 +0300 Message-Id: <1303204942-25450-18-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1303204942-25450-1-git-send-email-tomi.valkeinen@ti.com> References: <1303204942-25450-1-git-send-email-tomi.valkeinen@ti.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 19 Apr 2011 09:23:17 +0000 (UTC) Separate panel reset code to a function of its own. This will keep the code cleaner in the future when panel reset is called from multiple locations. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/displays/panel-taal.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 3192dd7..2f7a223 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -1018,6 +1018,15 @@ static void taal_power_off(struct omap_dss_device *dssdev) td->enabled = 0; } +static int taal_panel_reset(struct omap_dss_device *dssdev) +{ + dev_err(&dssdev->dev, "performing LCD reset\n"); + + taal_power_off(dssdev); + taal_hw_reset(dssdev); + return taal_power_on(dssdev); +} + static int taal_enable(struct omap_dss_device *dssdev) { struct taal_data *td = dev_get_drvdata(&dssdev->dev); @@ -1582,9 +1591,7 @@ static void taal_esd_work(struct work_struct *work) err: dev_err(&dssdev->dev, "performing LCD reset\n"); - taal_power_off(dssdev); - taal_hw_reset(dssdev); - taal_power_on(dssdev); + taal_panel_reset(dssdev); dsi_bus_unlock();