Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3201874pxk; Mon, 21 Sep 2020 07:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRz4cijJHZMywLLdAQkWMB6Wo2cDcURUJCZ7MreYtY+pAwGHsFX3Q1GpUc8J0hFEqwsrFF X-Received: by 2002:a17:906:17c6:: with SMTP id u6mr51210790eje.95.1600699541544; Mon, 21 Sep 2020 07:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600699541; cv=none; d=google.com; s=arc-20160816; b=eLanb3Rz/IM7JtiFYmS6+YwqMOkMswWYVjrB8fC7EztgRej1MAvyO7ivGVMHGeauP+ dyKCE0DFSQW1CXG9OOKiLy30VnxZENhXv0o5Km+x50qpedFaSo+ftm+NVfqhPt1Yo4Ps z6ItmePtF0Ehh3YyYdnWQeB+uhhIeTsEQNlc6rwTTywEok6B+4h0gbJl+LXWKzJ/TD45 ypzm5/b2eQaNPKgQrKkgTQ6wx6Zx4g5Ym+0wcOb/nbAPGuvUpzrSCb5DNXKYrJFjC6J5 hNz+7J8SzdUoBN2lD8bJ3RreXVGdTw3uKRGMIR08xhNsSNlGYcrTsxpsixtvKGSHuhnL X3YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Gru6RTJAdAta9FKDCD5vdccQM2mEE+EMOemUHVfUgWA=; b=uqX9/hjBIYT3lKTYxwYM+WuABO0LLGhY6piaZlgHp7e3ZPgjWiCYo3Z9QgtlMtyWM5 4Io5kgXc8BYg5t6dHU+jxvWwMLled3mmD0FXKYebSwXsHsVax6mUZ5uMJ315VhYfOfkU WkOjOUBv/lbv5OsUErUMYp7B2/DVt5Nzhigd/pXcnh4fG5uLZRC44bS5bRZNwJ7K6T5X +a7nihw48bYLQUrkC13tfvRgHrwdEVZGuyYLbXEA9sYVJdnGv+xxCmYfjUjV8TRLeP/I BuNHz63nfChhz0KZ4aNGz4cRKfI3szlFxSB7fatlsS1wjszoC5p7N+RchVzvyBxKuFnU +KGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HSu8lmEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m21si8372867ejq.199.2020.09.21.07.45.17; Mon, 21 Sep 2020 07:45:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HSu8lmEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728229AbgIUOnO (ORCPT + 99 others); Mon, 21 Sep 2020 10:43:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:49560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbgIUOku (ORCPT ); Mon, 21 Sep 2020 10:40:50 -0400 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 0841223447; Mon, 21 Sep 2020 14:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600699249; bh=E0ekg5aWtYtk64cRZDogsmPhWOTt7xCyRrKTdmYg2Vk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HSu8lmECLBsVICvMBwyxmylO6v2mI9Ok1CiHtLMebKAD2Zs3YwEUX1tfbgEabjaef fPl3ryjvZkjDR0MIWY2OsqVT9pvk+RyJBxJejDPOBclyxZZ1+Bw3xXyIAt2FPgrSb1 6rlz41m82wMamCQFOvJqI3AmXiKkzCp15QT58YAk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Mika Westerberg , Wolfram Sang , Sasha Levin , linux-i2c@vger.kernel.org Subject: [PATCH AUTOSEL 5.8 17/20] i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices() Date: Mon, 21 Sep 2020 10:40:24 -0400 Message-Id: <20200921144027.2135390-17-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200921144027.2135390-1-sashal@kernel.org> References: <20200921144027.2135390-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 21653a4181ff292480599dad996a2b759ccf050f ] Some ACPI i2c-devices _STA method (which is used to detect if the device is present) use autodetection code which probes which device is present over i2c. This requires the I2C ACPI OpRegion handler to be registered before we enumerate i2c-clients under the i2c-adapter. This fixes the i2c touchpad on the Lenovo ThinkBook 14-IIL and ThinkBook 15 IIL not getting an i2c-client instantiated and thus not working. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1842039 Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/i2c-core-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 4f09d4c318287..7031393c74806 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1336,8 +1336,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap) /* create pre-declared device nodes */ of_i2c_register_devices(adap); - i2c_acpi_register_devices(adap); i2c_acpi_install_space_handler(adap); + i2c_acpi_register_devices(adap); if (adap->nr < __i2c_first_dynamic_bus_num) i2c_scan_static_board_info(adap); -- 2.25.1