From patchwork Sun May 2 01:42:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 430655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9223C433B4 for ; Sun, 2 May 2021 01:42:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7F1F61459 for ; Sun, 2 May 2021 01:42:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232021AbhEBBnt (ORCPT ); Sat, 1 May 2021 21:43:49 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:55190 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbhEBBnt (ORCPT ); Sat, 1 May 2021 21:43:49 -0400 Date: Sun, 02 May 2021 01:42:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1619919776; bh=Kl3Jo+OZEZzf10VJacbXDH3A1fF+G/d1ql1pz/OtWqI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=a29YV91YarPuYd+ZgiO2zQf9fSlWHiDHo8E62fQRNqW4dxw2rUuwV3k27xSeHIJun fzVc8h5St4JjOlfqwfIbENSdGZft1O38P3GF9j4iUd65wI8WX/m5R7CxQpp7CTxILR acqjI8EZtPl8usqMEeAjOf2ksUxdHtP7JYiAtLlM= To: caleb@connolly.tech, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter From: Caleb Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Reply-To: Caleb Connolly Subject: [PATCH 2/4] drm: panel: sofef00: remove reset GPIO handling Message-ID: <20210502014146.85642-3-caleb@connolly.tech> In-Reply-To: <20210502014146.85642-1-caleb@connolly.tech> References: <20210502014146.85642-1-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Resetting the panel on fajita causes it to never come back, we aren't quite sure why this is so for now lets remove reset handling as it is effectively broken. It is also not needed on enchilada. Signed-off-by: Caleb Connolly --- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/drm/panel/panel-samsung-sofef00.c index 8cb1853574bb..cfc8b2a19742 100644 --- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c +++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c @@ -23,7 +23,6 @@ struct sofef00_panel { struct drm_panel panel; struct mipi_dsi_device *dsi; struct regulator *supply; - struct gpio_desc *reset_gpio; const struct drm_display_mode *mode; bool prepared; }; @@ -42,16 +41,6 @@ struct sofef00_panel *to_sofef00_panel(struct drm_panel *panel) return ret; \ } while (0) -static void sofef00_panel_reset(struct sofef00_panel *ctx) -{ - gpiod_set_value_cansleep(ctx->reset_gpio, 0); - usleep_range(5000, 6000); - gpiod_set_value_cansleep(ctx->reset_gpio, 1); - usleep_range(2000, 3000); - gpiod_set_value_cansleep(ctx->reset_gpio, 0); - usleep_range(12000, 13000); -} - static int sofef00_panel_on(struct sofef00_panel *ctx) { struct mipi_dsi_device *dsi = ctx->dsi; @@ -132,12 +121,9 @@ static int sofef00_panel_prepare(struct drm_panel *panel) return ret; } - sofef00_panel_reset(ctx); - ret = sofef00_panel_on(ctx); if (ret < 0) { dev_err(dev, "Failed to initialize panel: %d\n", ret); - gpiod_set_value_cansleep(ctx->reset_gpio, 1); return ret; } @@ -155,8 +141,11 @@ static int sofef00_panel_unprepare(struct drm_panel *panel) return 0; ret = sofef00_panel_off(ctx); - if (ret < 0) + + if (ret < 0) { dev_err(dev, "Failed to un-initialize panel: %d\n", ret); + return ret; + } regulator_disable(ctx->supply); @@ -276,13 +265,6 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi) return ret; } - ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(ctx->reset_gpio)) { - ret = PTR_ERR(ctx->reset_gpio); - dev_warn(dev, "Failed to get reset-gpios: %d\n", ret); - return ret; - } - ctx->dsi = dsi; mipi_dsi_set_drvdata(dsi, ctx);