From patchwork Wed Dec 9 15:59:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 7809651 Return-Path: X-Original-To: patchwork-linux-fbdev@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 7E32FBEEE1 for ; Wed, 9 Dec 2015 16:00:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98EE9204AE for ; Wed, 9 Dec 2015 16:00:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0F5A203C1 for ; Wed, 9 Dec 2015 16:00:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbbLIQAN (ORCPT ); Wed, 9 Dec 2015 11:00:13 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:34756 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbbLIQAK (ORCPT ); Wed, 9 Dec 2015 11:00:10 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id tB9G07UX017326; Wed, 9 Dec 2015 10:00:07 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB9G07KY029130; Wed, 9 Dec 2015 10:00:07 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Wed, 9 Dec 2015 10:00:05 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB9G02K4028647; Wed, 9 Dec 2015 10:00:04 -0600 From: Tomi Valkeinen To: , Laurent Pinchart CC: Dave Gerlach , Tomi Valkeinen Subject: [PATCH 01/23] OMAPDSS: adopt pinctrl support Date: Wed, 9 Dec 2015 17:59:29 +0200 Message-ID: <1449676791-26304-2-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1449676791-26304-1-git-send-email-tomi.valkeinen@ti.com> References: <1449676791-26304-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 From: Dave Gerlach Update omapdss driver to set the state of the pins to: - "default on resume - "sleep" on suspend By optionally putting the pins into sleep state in the suspend callback we can accomplish two things. - minimize current leakage from pins and thus save power, - prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. Signed-off-by: Dave Gerlach Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dss.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c index 9200a8668b49..f95ff319e68e 100644 --- a/drivers/video/fbdev/omap2/dss/dss.c +++ b/drivers/video/fbdev/omap2/dss/dss.c @@ -1264,12 +1264,18 @@ static int dss_runtime_suspend(struct device *dev) { dss_save_context(); dss_set_min_bus_tput(dev, 0); + + pinctrl_pm_select_sleep_state(dev); + return 0; } static int dss_runtime_resume(struct device *dev) { int r; + + pinctrl_pm_select_default_state(dev); + /* * Set an arbitrarily high tput request to ensure OPP100. * What we should really do is to make a request to stay in OPP100,