From patchwork Mon Sep 28 04:25:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1372339 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=gSmhRgjO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C08h40NY9z9sSn for ; Mon, 28 Sep 2020 14:30:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E42F8247B; Mon, 28 Sep 2020 06:27:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gSmhRgjO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 25FCF823B0; Mon, 28 Sep 2020 06:26:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2A6748234E for ; Mon, 28 Sep 2020 06:26:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x342.google.com with SMTP id q21so8393613ota.8 for ; Sun, 27 Sep 2020 21:26:40 -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 :mime-version:content-transfer-encoding; bh=yrSw6I8mRnOKF32wfDgr8dJsaelseXourIvzNZAkbDo=; b=gSmhRgjOPY/QSFd5MmUqzytZwYEtJhgqqW5vy847v76DH3yDAniAewgidkSUEzxeQA e/E5Ws4sjIKfI5EOwsm/n5hXkY2aHCvoiMI5wwspDTgBbAwx+AKgIKfn6H/0Y01LJE0S 1Je5JB9aT75g9h6XxpPU1bFc46qwwqA+pipNc= 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:mime-version:content-transfer-encoding; bh=yrSw6I8mRnOKF32wfDgr8dJsaelseXourIvzNZAkbDo=; b=sOhsYKSG3N1gSsRaa9AL9jiCoLrZUth3IklCX3nttvbwqgeiKBW+RhTEO6OQ9uVejb 1fl1jZ5UnSSmKFRLFqRmFIu+dxRX2cbTNXzEg0Ux023TCk7p/mCmBxIOosmrpAgu/A7V zVSh4H6N7/4FEgZ1FiIYy/9dyMWryhXqiy8Isjz8nmsIfptNnGj+96uZaSDv5Yf43XSq s1j+4xqtMhYct79b7jbwxBMJM+KyPP3YTr9OlhZ1swn54m1M9YmYRgIGWnXk/aEgAyeg JDWarwjBuMKaNFnpBCj/NazZNJjhrGodYyLRkn9HH4m57u5fK2Hdpbw4akBXQmJGWl4w Fb1A== X-Gm-Message-State: AOAM532ykCLQQlKFzAPZqexu5W85rzTUqmLZq97+1BWoCuw1AZfTqfrG cgvudntofTl/ww4Wo1P42wGc+UE3WVb4Y3mO X-Google-Smtp-Source: ABdhPJxgcq0blIb9k4D/qRK1ibbPGkMGvAUkkbtyG6G2IzfDik86MdAZskX4Gh4oU6SMlCT5fdlZVw== X-Received: by 2002:a9d:65c8:: with SMTP id z8mr16142oth.5.1601267198932; Sun, 27 Sep 2020 21:26:38 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id k51sm2620579otc.46.2020.09.27.21.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 21:26:38 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Andy Shevchenko , Heinrich Schuchardt , Bernhard Messerklinger , Wolfgang Wallner , Walter Lozano , Simon Glass , Bin Meng Subject: [PATCH 19/32] acpi: Correct reset handling in acpi_device_add_power_res() Date: Sun, 27 Sep 2020 22:25:58 -0600 Message-Id: <20200928042611.1696178-18-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog In-Reply-To: <20200928042611.1696178-1-sjg@chromium.org> References: <20200928042611.1696178-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean If there is no reset line, this still emits ACPI code for the reset GPIO. Fix it by updating the check. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- lib/acpi/acpi_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c index 95dfac583fc..c3439a59883 100644 --- a/lib/acpi/acpi_device.c +++ b/lib/acpi/acpi_device.c @@ -422,7 +422,7 @@ int acpi_device_add_power_res(struct acpi_ctx *ctx, u32 tx_state_val, /* Method (_ON, 0, Serialized) */ acpigen_write_method_serialized(ctx, "_ON", 0); - if (reset_gpio) { + if (has_reset) { ret = acpigen_set_enable_tx_gpio(ctx, tx_state_val, dw0_read, dw0_write, &reset, true); if (ret)