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=-14.6 required=3.0 tests=BAYES_00,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 8B1E3C43466 for ; Mon, 21 Sep 2020 14:41:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 515842311D for ; Mon, 21 Sep 2020 14:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600699305; bh=hGw+1Ze6k5/Mdm/F3sQRnWvTlvJENxIxqcdnzezofeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SvBuurRSiEYb7ucAI+kNgkewB5XBZeqzDUgDwutd1yNnRfa7kWSXNb7+enJX7gs72 zIjfeMQxAhRJ7Y1jAb79sPfY67fFAHvxnqHkLvcY2ePGD/UJnkS5z0mbgfyrC+0b+A LXpTgX5L2Z7kaWg7DNFAG8lxMeNJa3ZxO+qEZUdc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728103AbgIUOlo (ORCPT ); Mon, 21 Sep 2020 10:41:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:51020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728078AbgIUOlf (ORCPT ); Mon, 21 Sep 2020 10:41:35 -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 6D236235F8; Mon, 21 Sep 2020 14:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600699295; bh=hGw+1Ze6k5/Mdm/F3sQRnWvTlvJENxIxqcdnzezofeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IEB/aEM9zfzz8S6KRpEZ+jG6h/Sd/sdND+WR4qAm26+sFumFbwWfPxr2VRTwCd68m fIIm8eFWKkiFeYaXcEi098OREoWBkrukyw18peW+BQVN+xUhaWenwXr4R67ozVEglJ eB7o6lq41QCSc1d9Q8YP7JFhLLssmv3JhxQkGv3Q= 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 4.9 2/3] i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices() Date: Mon, 21 Sep 2020 10:41:30 -0400 Message-Id: <20200921144132.2135971-2-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200921144132.2135971-1-sashal@kernel.org> References: <20200921144132.2135971-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.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 80d82c6792d8d..4fd7bfda2f9de 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1858,8 +1858,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