Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1211426lqo; Fri, 17 May 2024 14:38:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWOAVSQqRMX4f+NgrepTCjTc6erm7PV69Srb8Ew10kRwAT5vGqL0DFOjn1KYOKcgXRtCe3XZPAi4/bn7ziV5qq8jKE67YEc+zpaLsjCw== X-Google-Smtp-Source: AGHT+IHpvyiJOTWoOAHRuGM+2DAxVqh8vcFOwa/xlOib7FmDSmNmJBV4gAGFnAK+WTPlfNsG00pB X-Received: by 2002:a17:90a:f2c7:b0:2bd:4c28:1cbe with SMTP id 98e67ed59e1d1-2bd6037a475mr402166a91.8.1715981938358; Fri, 17 May 2024 14:38:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715981938; cv=pass; d=google.com; s=arc-20160816; b=rNHMDXBp+2jcEZubAm4LYn1IGrQ/ArKr2AzY78fSxsaYJB3OCtqZdEr813okAdIiej Is5WHqgcAzq1UyBaYEBotDehKEjaPYQHou8jdy2nhDSn8E0vILtc/ukfJL/ng2GMeaha 55fhmS0L3U98QYll0c5JRL2foXe+LS6y/0F7ozzk0YKycKQoD3CUyHmqXNtN6yoo/dZI 7LQN7tVU/AsovGgslAVoyeS+WpI0KZqyuU1oTbw73NbZBg6CtuQjJdugMCZx6hZTSrDE 1PJYKX1MtjO1H6enNNJhWLB1NgsKixwwz/+M5n8oKMneZP2L68Low5wx9cpuAorYNJc4 oEZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wMrmoliKPswHzuEojIBGChDP268r8lDTpqZYT1tgrB0=; fh=pOYWENKyu9QB7+oIjJ8gOFLZno480yhoMDW5Jan1LP8=; b=OMpdcM5ouVFf67pnyZ5RL+bJR6zxaWP3pzQoWm8RFnRNVvU1/WemVweQ9n7gn+nhv/ qPf9MLMylcwlS/N1kweRum5L019k042gz739ka2Y62/KtHM7THblBNz79+A+Y35tdwHV nhKzgsEVMefV0Z7PVaZ8CdEC4T1YqArB/UpsODBwV5XCBFjxjP6gXY5oYRo6alUXm4UU /isHxnOZqEDNyKN3fXAxULCUSE/aFI84YnpdHvTwFOmbqQo8eGKa6UOny2Dx9ex3B5F7 g5yL0Cet9PmQsnmTT2y1HHYQlrslMHG44LEZTHPHkgayRn30/p14efOhjEOxb8Q2Jsqi rGLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="QIJ/oLi8"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-182649-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182649-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412a4debfsi17612199a12.756.2024.05.17.14.38.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:38:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182649-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="QIJ/oLi8"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-182649-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182649-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8A95EB2342B for ; Fri, 17 May 2024 21:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0181F14265E; Fri, 17 May 2024 21:37:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QIJ/oLi8" Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF7A3142645 for ; Fri, 17 May 2024 21:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981869; cv=none; b=TgaixTVAjUKsjNjzYqnxbBQjPCLtK0BXNBlh1VsgTi4CiKd7ogHzFJxQgNkiqlnTF20aNJ4Bz62OT8fAMSHcc1p30qmvYhvSv9MknHo6R7P49fiOgj4YKKAn0Msfv0kqcv5+PNwAy+/bSKA+7Xt9tB+el0XTPCVqN4Mtofglh9M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981869; c=relaxed/simple; bh=hxNkIs6yfIKLDJk1aH9dnT73mR+5k0qkAL6JqA+tZXo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SyGm/ZUvdcNdAq8XcqIRDhgc2Q2S8WXp3t9ce8RUgG/R8jvAtHKAt1K+1g5l+ygigVhFQdTvspy+ZdQycBhzsEHpQpq0lUW4nAzoDto4AFPaw3b5PQ+a94Nsdp6p+3e9sNDcx3dYTGiNXWOaZzS5nqYaKohg/67k7iexloPul94= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=QIJ/oLi8; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6f4302187c0so1305066b3a.1 for ; Fri, 17 May 2024 14:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715981867; x=1716586667; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wMrmoliKPswHzuEojIBGChDP268r8lDTpqZYT1tgrB0=; b=QIJ/oLi80IgNec5P9027uUlrT+n1fmfUSmKT9hw1LMMP5GF8G4dtQkdl5CIfADAGJv 9h2Kb2R0h93A0fNeUt0p3IAffpJi/ha840Hh+q2M2w3/etsGtHhfo74t0MSt/dx++olA PG2HGzO8D/zfVHA0LnWTgYU65wtWkDoT1KgNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715981867; x=1716586667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wMrmoliKPswHzuEojIBGChDP268r8lDTpqZYT1tgrB0=; b=fy76wmgtgILEUS4Ob8oIht+fLALq7g1QCwTQ0kJvz3T5+LeJEaufYQqLYPpiVhEIPi 0ZRBg40JuLFcdBdr5ggaVBksPxTjRCk54RKgyYgxL6NORfCHRZXYx7KN6VUAs26lw5ZF hI/pHcS1WynR1uyNPActM+wzRNaUja7vMgfMq7Us119XcXDgIu+6C4PWqTHRLhNwaXuv MOsRC4wOJR2VIl2kqiGtTxEvudBHyF2qm43JNNTH2gtDe5l6Z1zmNccBzTqTDNLj4T5C mdgtUXrvajtExtusid6IMbKZRSl9mIWrxnLHmFxTEtF8yeMwiJ8DpEoSNW5XxFSfcfos EFEg== X-Forwarded-Encrypted: i=1; AJvYcCX3cF4HecwC5Xo8AiSTXlp6GBWVGHi6BeYu93MeFziuMJH3PHlquehquFH2eNR1SFEg6AgTt5svRYUXc2y7R+AVozMYdJzbJD/V71wg X-Gm-Message-State: AOJu0YyKDabBxbDvhcH4B7sSy7SXB90d/h8Wx3Apqz733xcyaSs88dCs vJHQFVNvSMou5sI+3vFTCV6Z8xhYoTzNEJBI6EQJYDNdpKSkB8W6cmkynxjo+A== X-Received: by 2002:a05:6a21:9988:b0:1ad:886e:ef5a with SMTP id adf61e73a8af0-1b1ca42879dmr436290637.19.1715981867162; Fri, 17 May 2024 14:37:47 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:26de:b1dd:5:771c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2b2f8b3sm15168736b3a.211.2024.05.17.14.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:37:46 -0700 (PDT) From: Douglas Anderson To: Neil Armstrong , Jessica Zhang , Sam Ravnborg Cc: Linus Walleij , Dmitry Baryshkov , Douglas Anderson , Cong Yang , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] drm/panel: himax-hx83102: If prepare fails, disable GPIO before regulators Date: Fri, 17 May 2024 14:36:41 -0700 Message-ID: <20240517143643.6.Id0659a80147cf51e0ebb8fe7fee18db86851960d@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240517213712.3135166-1-dianders@chromium.org> References: <20240517213712.3135166-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The enable GPIO should clearly be set low before turning off regulators. That matches both the inverse order that things were enabled and also the order in unprepare(). Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver") Signed-off-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-himax-hx83102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c index 1a6975937f30..4ac7f9d8b232 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx83102.c +++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c @@ -578,13 +578,13 @@ static int hx83102_prepare(struct drm_panel *panel) return 0; poweroff: + gpiod_set_value(ctx->enable_gpio, 0); regulator_disable(ctx->avee); poweroffavdd: regulator_disable(ctx->avdd); poweroff1v8: usleep_range(5000, 7000); regulator_disable(ctx->pp1800); - gpiod_set_value(ctx->enable_gpio, 0); return ret; } -- 2.45.0.rc1.225.g2a3ae87e7f-goog