From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 2F276C432C0 for ; Fri, 22 Nov 2019 06:18:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED33420707 for ; Fri, 22 Nov 2019 06:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574403510; bh=gcm9D1eUheQLlw2fc2wABD7hVL2JXYAau9rxESbVgN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=waVm6Ie1KvHLnDA86crYry6KY5e/N10nZJh4Ub0B7JHJXAlf0HQ5kIcNlxQBNBJue yo0Dh1rLLue4+WVV+8wpr8JSNBviimXyryP60uYs/12BsBAwweV31Mz54BQLvRiiOa T/kg2iSiDGhrm7ILgYIzh+It1HcNYP1QQ/Cyyg/g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726018AbfKVGS2 (ORCPT ); Fri, 22 Nov 2019 01:18:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:50338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728767AbfKVGNM (ORCPT ); Fri, 22 Nov 2019 01:13:12 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A8B720707; Fri, 22 Nov 2019 06:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574403191; bh=gcm9D1eUheQLlw2fc2wABD7hVL2JXYAau9rxESbVgN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=in7WL6mXX4UbhgStcFugnI5hcdkyPeRzabbDbtYg1zryWO8/lv8mE8vYmKHLqHkpl VDv/kX6rKMrOeexPeGCI1PkEQ8FnZdz+/aZOJghiYg+0DA8tHrbElbgmXx6WQh8AFD Ijd3R4IvSxscYurNq/BUnbEiKhCXNfj+WF3EDq6U= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , "Rafael J . Wysocki" , Sasha Levin , linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 09/68] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value Date: Fri, 22 Nov 2019 01:12:02 -0500 Message-Id: <20191122061301.4947-8-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122061301.4947-1-sashal@kernel.org> References: <20191122061301.4947-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Hans de Goede [ Upstream commit 1a2fa02f7489dc4d746f2a15fb77b3ce1affade8 ] Ignore acpi_device_fix_up_power() return value. If we return an error we end up with acpi_default_enumeration() still creating a platform- device for the device and we end up with the device still being used but without the special LPSS related handling which is not useful. Specicifically ignoring the error fixes the touchscreen no longer working after a suspend/resume on a Prowise PT301 tablet. This tablet has a broken _PS0 method on the touchscreen's I2C controller, causing acpi_device_fix_up_power() to fail, causing fallback to standard platform-dev handling and specifically causing acpi_lpss_save/restore_ctx to not run. The I2C controllers _PS0 method does actually turn on the device, but then does some more nonsense which fails when run during early boot trying to use I2C opregion handling on another not-yet registered I2C controller. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpi_lpss.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 572755e557d6a..e54e6170981b4 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -405,12 +405,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev, * have _PS0 and _PS3 without _PSC (and no power resources), so * acpi_bus_init_power() will assume that the BIOS has put them into D0. */ - ret = acpi_device_fix_up_power(adev); - if (ret) { - /* Skip the device, but continue the namespace scan. */ - ret = 0; - goto err_out; - } + acpi_device_fix_up_power(adev); adev->driver_data = pdata; pdev = acpi_create_platform_device(adev); -- 2.20.1