From patchwork Wed Jul 1 08:21:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Zhang X-Patchwork-Id: 6704391 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BB270C05AC for ; Wed, 1 Jul 2015 15:48:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F383F20779 for ; Wed, 1 Jul 2015 15:48:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B0C1620773 for ; Wed, 1 Jul 2015 15:48:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27AC26EB9B; Wed, 1 Jul 2015 08:48:34 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from hqemgate16.nvidia.com (hqemgate16.nvidia.com [216.228.121.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9EA7A6EA8A for ; Wed, 1 Jul 2015 01:22:25 -0700 (PDT) Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Wed, 01 Jul 2015 01:23:08 -0700 Received: from HQMAIL101.nvidia.com ([172.20.187.10]) by hqnvupgp08.nvidia.com (PGP Universal service); Wed, 01 Jul 2015 01:22:25 -0700 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Wed, 01 Jul 2015 01:22:25 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 1 Jul 2015 01:22:24 -0700 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1044.25 via Frontend Transport; Wed, 1 Jul 2015 08:22:24 +0000 Received: from markz-home.nvidia.com (Not Verified[10.19.244.138]) by hqnvemgw01.nvidia.com with MailMarshal (v7, 1, 2, 5326) id ; Wed, 01 Jul 2015 01:22:24 -0700 From: Mark Zhang To: , Subject: [PATCH v2 09/12] drm: panel: Add idle/busy in Sharp lq101r1sx01 driver Date: Wed, 1 Jul 2015 16:21:52 +0800 Message-ID: <1435738915-31973-10-git-send-email-markz@nvidia.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1435738915-31973-1-git-send-email-markz@nvidia.com> References: <1435738915-31973-1-git-send-email-markz@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 01 Jul 2015 08:48:33 -0700 Cc: linux-tegra@vger.kernel.org, Mark Zhang , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index e32f1449b067..64eb437ee7b3 100644 --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c @@ -89,6 +89,18 @@ static __maybe_unused int sharp_panel_read(struct sharp_panel *sharp, return err; } +static int sharp_panel_idle(struct drm_panel *panel) +{ + struct sharp_panel *sharp = to_sharp_panel(panel); + int err = 0; + + err = mipi_dsi_dcs_enter_idle_mode(sharp->link1); + if (err < 0) + dev_err(panel->dev, "failed to enter idle: %d\n", err); + + return err; +} + static int sharp_panel_disable(struct drm_panel *panel) { struct sharp_panel *sharp = to_sharp_panel(panel); @@ -167,6 +179,18 @@ static int sharp_setup_symmetrical_split(struct mipi_dsi_device *left, return 0; } +static int sharp_panel_busy(struct drm_panel *panel) +{ + struct sharp_panel *sharp = to_sharp_panel(panel); + int err = 0; + + err = mipi_dsi_dcs_exit_idle_mode(sharp->link1); + if (err < 0) + dev_err(panel->dev, "failed to exit idle: %d\n", err); + + return err; +} + static int sharp_panel_prepare(struct drm_panel *panel) { struct sharp_panel *sharp = to_sharp_panel(panel); @@ -318,6 +342,8 @@ static int sharp_panel_get_modes(struct drm_panel *panel) } static const struct drm_panel_funcs sharp_panel_funcs = { + .idle = sharp_panel_idle, + .busy = sharp_panel_busy, .disable = sharp_panel_disable, .unprepare = sharp_panel_unprepare, .prepare = sharp_panel_prepare,