Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4596370pja; Thu, 21 Nov 2019 22:32:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzTWCzdGiTyEFCXxGw6Vp7dk8LPVnE6OTQIaJtUsBz6Kazne8gdXXsysBgGDtql8zP3ZH+l X-Received: by 2002:a17:906:938d:: with SMTP id l13mr20292439ejx.74.1574404350757; Thu, 21 Nov 2019 22:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404350; cv=none; d=google.com; s=arc-20160816; b=qjRNGXF5JSutFABrNUw5emWxUKvE702IJsHnkOuG0dJ/YSrKTFJUjmCA+eFq2viA+U 8i7TyH6RjFKbOYDsjcnKGYna35DNfuuGUAKjUN2F6gOg05+Bex4nfRvM062m9daXFqva fNPYTGbWqEtFky9E2nFJx0fJpP9zT13XXwZvI5EFckN9spzLSRgSY/M7PP0nuvkWJZ6T RMTKjd/tWfeFZCnTtrjE4cIKsPqK9mwcdgMSEX/KzAuJcBwZWyvezjo/cARh2m7EtpOB t0WyM/RGGnNEDI9RCBczt0iey4aFx8mEsUWTyhKwjybJqEi+ZTDz1mCMk1h5TapDaab+ uiVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MvTP2cBYTnQzQWyMaS8KyXeMVllojWz57ppI/6MCPiw=; b=aDGvOqD+32BxsJXQiv5o/AEoz917KJDvP/ZkIISO2/IsjqSVxTUaeHDykKgDnhLLeG qygB/6ugZso0WTeQVR/ApGWL3gQbSnb/gst7YfcpO5mcdXWN8xW2BjOGyNoGAeEe83Ga QPFmaV9wUj7JSj8RDKfqNxntqnPLGpnPywTorHC04c7bUFgilno+5Ee1ppUbsCP62n9V 9Ebvo0nUuxkQi0lZArSFu/lHk1vXmFh3OGOA2z8FZbG2BfI1uVm3RPppA7zydpqDrgm4 L2tbgvwkpWhHZTrstCc1MBXqjYgEyxiMBG26K18bBXYVhF1AejzFfTU2ULRrI1ln9KEG x0tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ExA6NxJX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d44si1014979ede.149.2019.11.21.22.32.04; Thu, 21 Nov 2019 22:32:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ExA6NxJX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727345AbfKVFtx (ORCPT + 99 others); Fri, 22 Nov 2019 00:49:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:54082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727269AbfKVFts (ORCPT ); Fri, 22 Nov 2019 00:49:48 -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 69B1B20708; Fri, 22 Nov 2019 05:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401788; bh=TdQPgtFlO5dSn5dVBSQBaPwxIW+NrmCLiLXyK8OT3FI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ExA6NxJXr0plclW3L2s8YKChQfkFYPR35do7NNtPl18JcSFHIfVc8p9+HpvRYITVx fB7KTqDjZJiSNszlBaPStF2JhG02FAuoBN5aBTpiSoBFGB2t4nFB08VGwJQLK30ATD bxvZ4f6Gcg2Q8+9DxbDb7fFz4/SQKgQkYM7R3nx4= 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.19 036/219] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value Date: Fri, 22 Nov 2019 00:46:08 -0500 Message-Id: <20191122054911.1750-29-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 c651e206d7960..d79245e9dff72 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -637,12 +637,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, dev_desc->properties); -- 2.20.1