Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3202841pxk; Mon, 21 Sep 2020 07:47:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCCqRNhJ5NTNWMQEVXCWrM4KZ1K8dpfYPSfyVt5L069qRnDHaqkqdasQvS4hklzXXgjd1A X-Received: by 2002:aa7:db47:: with SMTP id n7mr53028260edt.315.1600699627299; Mon, 21 Sep 2020 07:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600699627; cv=none; d=google.com; s=arc-20160816; b=Ap1atSo6rYydS2/rlFUtDTUXCUb8u13Noq56knUqklSWezE0fJiIva2kXBkInf3uU9 XiBcFptR2LNkmC+u9oF2kB7jNCcU/XkwBeThwCeY7vBZXKghwwAJ9bNdk7rvi42D1/eL 4haP8zrB1AMvmrdwCM9KcT9yx2TPa2KaC/lo1HGMNQ6a2277nwJEI8ycW5D+Vv/EeweJ OQjeVnY81ZIOLND2z75zUgBUiH+ILQYyjBc/Hc1RXc+pF110CrxmuV/K7cl661U3NMAw 9DZopIloPc/Xisp/ijMmMqNT6W/O60WZIQyzO9CqpFqVj4gGFIGhvNxoVtXK9WophE4k q3lA== 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=ICE6N0Oq2867N3meFH8m0z1VZ3o6d8oX/VDN8xf3zGc=; b=kC05eR/qyHn910yyhOaUal3LXDHuxqBJcgyHnF5oqub5Ii8lD8QRFZ243zArJnKUxa WYUW8ErHbkO/4gBmnNIsNjjfY6AFKeh3PU30lSIidCC6NVRFVN9j9XAhFj0P6SGpgZFN nj6j2G4Q/iiP8rG0yhVDXkl4vm69DNmdE5Zsgn9ZUGs62E9tF0oLixZcE2Ble9FTQ0nw EmQC4DdKetVwWuQkACDKuwVv2e1XhQwDYgI5MqfgE5WJhOhyxIM1kAMgJ+aLSMnJxW5s YA4ptgMpuY4/iiYHEJeyB1TTYuYyDMLh8bGcCTFv57eGy3d+a7ALBZvXMqYDj/w1a2xT iPsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DVw1jjbW; 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 i11si8832797edl.230.2020.09.21.07.46.39; Mon, 21 Sep 2020 07:47:07 -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=DVw1jjbW; 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 S1728183AbgIUOmk (ORCPT + 99 others); Mon, 21 Sep 2020 10:42:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:50342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727998AbgIUOlN (ORCPT ); Mon, 21 Sep 2020 10:41:13 -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 EDA5923718; Mon, 21 Sep 2020 14:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600699272; bh=lvWXTjqEtX4tVeRkz5R6kR7ZQS2JVMCI3uTA9lD3JE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVw1jjbW7eC5Kjd5q7MNtCKuISK55net5bEOlpyOfZL5w0eJFgh0aaY9mqa6Plzj4 jHpLhyS5AZ3YgQ3fW3edmDslsmx9DsFZFXLc2QLJm69Nxx2/73MxEhJ69tBgOD2Tam T6MeKAwtIvADkV1ZS1Exd/L5ycn9Bu3Omn1dZ4m4= 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.4 14/15] i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices() Date: Mon, 21 Sep 2020 10:40:53 -0400 Message-Id: <20200921144054.2135602-14-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200921144054.2135602-1-sashal@kernel.org> References: <20200921144054.2135602-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 def62d5b42ca7..2dfe2ffcf8825 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1385,8 +1385,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