From patchwork Tue Oct 17 21:13:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10012883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 64EAC600CC for ; Tue, 17 Oct 2017 21:14:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56FFC28560 for ; Tue, 17 Oct 2017 21:14:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C0EA286D2; Tue, 17 Oct 2017 21:14:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EBD1128560 for ; Tue, 17 Oct 2017 21:14:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66C136E793; Tue, 17 Oct 2017 21:14:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id ED6026E793 for ; Tue, 17 Oct 2017 21:14:19 +0000 (UTC) Received: by mail-it0-x230.google.com with SMTP id n195so4244766itg.0 for ; Tue, 17 Oct 2017 14:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ehhk46OQkCqkCI8+iAwSptirhuEI7XEANx/8DRAtiLA=; b=TqsKoejws0O8L/1De+LmtcR8qaOZeYevenpjTMzcDp9agAjfWTdWyBzF6WuD4mDpS/ vT7UTKOvLCqFzqEVSlyMcTQWQfVUceddKolVxfgHbVU+1j6N7zDd2Q0pDGkgFbLvVaTB FZOODQd+1fSyOrGaI8M/Avn28UEYu9HNqCSxA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ehhk46OQkCqkCI8+iAwSptirhuEI7XEANx/8DRAtiLA=; b=RO5fknZ4nodybu6GEKDOCyxl2ytxkrZr2lMpaOUrUjXIB2xNJ5sPxbxP9nJ5ImvWJj fRVCC4syxyPC4y2orobnXtOQW92yLLA0Wn8hzlGP4Qx5tosH2N21rOyfGljRCeHFPbpP FX8mcYgiWkqW22twneFRYPoeuMSnI98aO84algicjRdoUBbOdlz/u2egNyALfuzO/peg NKGqWAVzOD7kbzhnO4/xFYxKfBqhP58vutc+L+8+rO56GenYG8Mv6MCQ2jLvN3YCK2do CnypClJKZUyr2UT64+FAWYyRrb4ALGtH6n3GPjrCg2AB+o5FF1DQupXYtpyj9ljZYt/A UsCA== X-Gm-Message-State: AMCzsaWyLFnFQ6sw0uqZlhFgI+nFVrPjO+NOzqeA5+d7vYF0hR7yHp+w A1+Ki04rVzjnnST/F43UjEX9Blj48B0= X-Google-Smtp-Source: ABhQp+Rwhc4ii5rV0nFZKFE2WBFzWDPOhK94dH8og5V4yhuTGm/SpMDzQeZrwMBE6+N06z3ZTBa6jA== X-Received: by 10.36.120.136 with SMTP id p130mr2406539itc.54.1508274859068; Tue, 17 Oct 2017 14:14:19 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id f2sm5220677ioj.73.2017.10.17.14.14.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 14:14:18 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 10/12] drm/panel: simple: Remove enabled/prepared state Date: Tue, 17 Oct 2017 17:13:13 -0400 Message-Id: <20171017211321.7992-11-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc1.287.g2b38de12cc-goog In-Reply-To: <20171017211321.7992-1-seanpaul@chromium.org> References: <20171017211321.7992-1-seanpaul@chromium.org> Cc: thierry.reding@gmail.com 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP They're not necessary for atomic drivers, and drm_panel will WARN if the calls are unbalanced Signed-off-by: Sean Paul --- No changes since v1 drivers/gpu/drm/panel/panel-simple.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a3c96d2ea41c..0e1fbca811a0 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -77,8 +77,6 @@ struct panel_desc { struct panel_simple { struct drm_panel base; - bool prepared; - bool enabled; const struct panel_desc *desc; @@ -163,9 +161,6 @@ static int panel_simple_disable(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); - if (!p->enabled) - return 0; - if (p->backlight) { p->backlight->props.power = FB_BLANK_POWERDOWN; p->backlight->props.state |= BL_CORE_FBBLANK; @@ -175,8 +170,6 @@ static int panel_simple_disable(struct drm_panel *panel) if (p->desc->delay.disable) msleep(p->desc->delay.disable); - p->enabled = false; - return 0; } @@ -184,9 +177,6 @@ static int panel_simple_unprepare(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); - if (!p->prepared) - return 0; - gpiod_set_value_cansleep(p->enable_gpio, 0); regulator_disable(p->supply); @@ -194,8 +184,6 @@ static int panel_simple_unprepare(struct drm_panel *panel) if (p->desc->delay.unprepare) msleep(p->desc->delay.unprepare); - p->prepared = false; - return 0; } @@ -204,9 +192,6 @@ static int panel_simple_prepare(struct drm_panel *panel) struct panel_simple *p = to_panel_simple(panel); int err; - if (p->prepared) - return 0; - err = regulator_enable(p->supply); if (err < 0) { dev_err(panel->dev, "failed to enable supply: %d\n", err); @@ -218,8 +203,6 @@ static int panel_simple_prepare(struct drm_panel *panel) if (p->desc->delay.prepare) msleep(p->desc->delay.prepare); - p->prepared = true; - return 0; } @@ -227,9 +210,6 @@ static int panel_simple_enable(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); - if (p->enabled) - return 0; - if (p->desc->delay.enable) msleep(p->desc->delay.enable); @@ -239,8 +219,6 @@ static int panel_simple_enable(struct drm_panel *panel) backlight_update_status(p->backlight); } - p->enabled = true; - return 0; } @@ -301,8 +279,6 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) if (!panel) return -ENOMEM; - panel->enabled = false; - panel->prepared = false; panel->desc = desc; panel->supply = devm_regulator_get(dev, "power");