Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1211241lqo; Fri, 17 May 2024 14:38:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhEa27PeEZABTBCAvaUyRogkwSJ2n/uR9oPNGaMsoQSGtET64RYI7xb4S/VK5EribUFxme7Ik1n3NR5LaEggSnRf8kuUIO9bz3Yt1QAQ== X-Google-Smtp-Source: AGHT+IFzJKpNZYukREUwQ0b5TEeZp2GZtUCOKzjMX9RVjZfXhIdBfbNYPcLxKywCCv3+l9Ir/yg4 X-Received: by 2002:a05:6a00:2e02:b0:6f4:9fc7:d239 with SMTP id d2e1a72fcca58-6f69fc6d156mr452946b3a.14.1715981905751; Fri, 17 May 2024 14:38:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715981905; cv=pass; d=google.com; s=arc-20160816; b=yWWoaumd1sndQsCEkhQFjWMnWF8PC2px32ngTT4j9sNuZ/QvG/9pFiBlLhMW93GblJ EFNjo+MaATIVwVwovpdfguvI6lfM0h1/HTgyYgh+T2DJ76GBPbNtbPxjvMMfYgxZH9bQ 3+q8VRRUk5C5oIsHAQA64cT7fIb6VYpRvuDUlRo4C9Cs2o7sW9aixt+EcF3g9Mz5wl0b 9uFZoyrAaE30JvRa83TgQRiStgh4eCZrJEYt7gkpNjHiR3knP2YL7ALHqEBNaRPZRH62 JKMCatxLfyq13ombvR3LGLKQlHITtwDl+MslvbRWrgxwMzTqoVwShcHn9F0TybN2CWH5 ad4A== 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=qdxmCQIjRAvO8BCfViIMJHCflXvR2bqDUxHByEsJNv0=; fh=8l43F49Jgkv2WYPE7ACVfh1v2VmOHemOPp55A/r8fqE=; b=bpB0kaoQW18oifmg1OctMJ3u/T4ugLfpPYH07rZ95vtRkGzTgexYZfELsVtn/E75Ub pOQrp3lS98n+aiX0A9Eoq6G++ug69zTl5IDx/BDJbvi+TNAYIzmzsqZG7poQ/teMqLDT Hk1NPvoiLOLNmrt1z+akNlByESrxggKz1OtxEztBZJ+OsJk/Ja0DF2imH445q0+YAsPz PQxAclRFsb7Xd9XRNea4OL8pXsBDiXTPpQKyIVRv8UeE+GBDT3KNM+wA4ybGy6QSAqw1 56+ERjWklLR1rtVn2gYUGWxy2KqFUdIo4fWqASOQIN0a+KzULjF7Ku0Up3BtZQ6WiCUq 0SSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mFo7Gl7Y; 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-182647-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2aef039si19452159b3a.182.2024.05.17.14.38.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182647-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mFo7Gl7Y; 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-182647-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182647-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 40EC2285DD7 for ; Fri, 17 May 2024 21:38:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB4581422CE; Fri, 17 May 2024 21:37:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mFo7Gl7Y" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 B9E7913E048 for ; Fri, 17 May 2024 21:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981864; cv=none; b=kP1rDFzpSmu3o3Jmi4vD3Du8roYdJtAqkgVIYpsE3S3hV2uYDmYSI/hpdR5GiS0EXVHydJEo9xHEO/X9oTihfdihuCuRFWN0eLuKv9fVVYjANzn5ivzFsZyEwoiaL+jGvu3lu/3w0NZdC+JJ4TE0lmEgub0Y8gEnlwGlk3/nH/M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981864; c=relaxed/simple; bh=ckWQJuqXlhrd6HsiKwZ31CHUqWA+QXm9Sn8Kntfaoik=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lPEoUOLnzI9KI8ViKU75EjCFkVASeuSG7JdH2+o4+RU4XUlsz//1CfM2VfG++ZBWgYNvDDix2mEqMYFChEMSalI48JtlRqAIYvF72xhUV6JXoEMo/nyAJy/wl97+ZWslWq/c3CHf7ACiljgroWN8lzdczkqWlv4eAJ7zSOr5pJI= 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=mFo7Gl7Y; arc=none smtp.client-ip=209.85.210.177 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-f177.google.com with SMTP id d2e1a72fcca58-6f457853950so426325b3a.0 for ; Fri, 17 May 2024 14:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715981862; x=1716586662; 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=qdxmCQIjRAvO8BCfViIMJHCflXvR2bqDUxHByEsJNv0=; b=mFo7Gl7Y5iATgGbX6iD92/I1S6PMcpFFVs07aKCH0FsXMTdGkENwl5nz60X88MQRk/ bdVkYDWGnbbGEJ0qiP0RDdmfnjryqlaadDKejyxTLRilWYfsftsxbj6WCya2xJhU5hAN F5GdYPEhRdOankhQ35zIfk47EGsLqJFW6cVvo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715981862; x=1716586662; 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=qdxmCQIjRAvO8BCfViIMJHCflXvR2bqDUxHByEsJNv0=; b=AJ5vqhFQFXBGy1Yg09pgueRvCyGXT2mSryi3ypkxONKLkLAqPIaKv/FhSn5lGOKyQQ Lo41v+zWitpwm3INjomfyK4A2ax8vbdF+hWKbNm9UKJt8UvGD69JCx00Lno2nnBFa4/4 LIwrRq404kvWsutgaAFh9WswEf3Y80R+rpxpeZTDDZ+7QaUZ9IMES05d8gyn2nz8WXUz Eszk+TItDFZjKqutag3nDc0Junyojtjmn2yszVa0StaY2FkIl9Px4HNuWMmWq3w0o4qb JqJwVDHrHpxIb0h0pzRWpsFBVgty+fsLO3WEWT5qxsCQ2TQnQriVZ0zGmZUCnJfjnDj5 rfng== X-Forwarded-Encrypted: i=1; AJvYcCXHA1e1aI7qQkGqZraxuNCzXCshXLu/CvyzSzyQCxCbHxRqxJ2k8VSjUqkiapFeop+W0cyt1jzPD9i5HDsSKiJcnu7C6tqnj+qOtpE1 X-Gm-Message-State: AOJu0YxTbdQhWj0Cf+Ch4JwcygYkpTm/yxf0rUDQNo/fW4bmmkthLIiw WsEzG2lUjjzdA4KV6j0kBLjG8OPH/ZOVWMKYF2KoXFc46N1UP3sfd8c7nSmCqA== X-Received: by 2002:a05:6a20:d80b:b0:1af:37bf:d7de with SMTP id adf61e73a8af0-1b1ca3bca44mr433294637.7.1715981862038; Fri, 17 May 2024 14:37:42 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:37:41 -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 4/8] drm/panel: ilitek-ili9882t: If prepare fails, disable GPIO before regulators Date: Fri, 17 May 2024 14:36:39 -0700 Message-ID: <20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@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: e2450d32e5fb ("drm/panel: ili9882t: Break out as separate driver") Signed-off-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c index 830d7cfbe857..a2ea25bb6624 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c @@ -495,13 +495,13 @@ static int ili9882t_prepare(struct drm_panel *panel) return 0; poweroff: + gpiod_set_value(ili->enable_gpio, 0); regulator_disable(ili->avee); poweroffavdd: regulator_disable(ili->avdd); poweroff1v8: usleep_range(5000, 7000); regulator_disable(ili->pp1800); - gpiod_set_value(ili->enable_gpio, 0); return ret; } -- 2.45.0.rc1.225.g2a3ae87e7f-goog