Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp819856ybl; Wed, 4 Dec 2019 11:24:25 -0800 (PST) X-Google-Smtp-Source: APXvYqwsPfyQmyYh1mHKgSz0AgkfgBAdOBhP7NHT40TfeVpzWNta9wT1Pe/csOPol0Kl3L2cb28s X-Received: by 2002:a9d:3d05:: with SMTP id a5mr3907776otc.295.1575487465116; Wed, 04 Dec 2019 11:24:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575487465; cv=none; d=google.com; s=arc-20160816; b=dv7825FOscINMBmO3oXqTS73omy8kxGU7GqZalIom0vg9b+OMjbyDebmq9V1E5VnnL FH05zvfmoWoi45nu8Jw4xtQ7OFL4D/DGTFnsIR+wC+reSPT0Kw3wF0b+PELWTWCFt652 zZAh/oQg6LImNsrpB0Ts4YV45IioAmqJfPTyDlrPNrJABjZ8VFkSH02N1yWuUssVAhhP 5gTW7cDXtloGglVutaVcHayRoGaG3s1yR+uYcXftRUPnESsS2bYbKONMiH0JJxXtVlQn I6tYP0Tzstd5cf1UaBRBjz8ItwshR1Aw1kV1gLeZ3eTttW5rnc+pQXNhnGI94Zq3l/cr pEdg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FXkJB2Z016S3vIo91J6p3Alc+NLsNuSccCKr38eAQ3g=; b=JuOQA+LBM4Px9e9Im6h7eWkjHxJmXHX0qnD0f7ci2nnMwhQ39q6r7XG/YR0cyuwQ4w So7GPoac1UAYCIeH4bWbMQ3mV5rQ3lUbZjw5anP7XP5aLk6FOhNx1aCGc2UROj8b5Jqx yZembP2FBlwtvLPh7j3p792LyxEXWEXXR/Ba/8bfDmObKhcMycyjX/zAxngevtxMU2jp h/peMRwl0IlFDCOEIZ881h0Ym+r1tbv7+l8s/KW5lnUPxNHOqVZ8uvbDqAdE69kiF73O BrMjKs0NraklgiuTpTbsxjGMBPxkQvs67BDTUua0avX0YPjR2hYFxzHxLckoIJ/ZRj2x oQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ik0dD3H5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v67si3473183oia.26.2019.12.04.11.24.13; Wed, 04 Dec 2019 11:24:25 -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=Ik0dD3H5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731286AbfLDSKe (ORCPT + 99 others); Wed, 4 Dec 2019 13:10:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:37846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731277AbfLDSKb (ORCPT ); Wed, 4 Dec 2019 13:10:31 -0500 Received: from localhost (unknown [217.68.49.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73BA1206DF; Wed, 4 Dec 2019 18:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483030; bh=IPTb/noze68zxc4Ep0YinQYWP6168edJf7Te72FHfnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ik0dD3H5/TxwwkJgWT2SCmkUnktvBYVfGQwy6uYlGCDQtHjvku1Gl45q9UP35Wpje WWoiWna2afvT5oua3SEK003NSpGp86/YypJQFCy/CtJFFR2z0C5YeB+qlfgp3NJwqS xl8kS5Zv+0zmeG4kW/2nhqc3j/OuUeGileuB9i6Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.9 023/125] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value Date: Wed, 4 Dec 2019 18:55:28 +0100 Message-Id: <20191204175319.121388614@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 8e38249311bdf..a9158858f54cd 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -448,12 +448,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