Received: by 2002:ab2:604e:0:b0:1f4:60f3:cb4a with SMTP id a14csp12488lqm; Fri, 5 Apr 2024 07:28:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWp6qy+4kQ+NnTg7sP0ft/1I/Qv6o1hPmEqi3Q8A9ihg+gB1K7D3xWwAn+B2jE47m92S0IY2TYBggYBFCJuuqz67Em9cfvEnxUPGj/d7Q== X-Google-Smtp-Source: AGHT+IGWHs+imZZiOaL6jZy65/+cwZGRJLMGnph0Ii/PuGeKNfeDcAoOKzxSAY68i4olxxGyc6NR X-Received: by 2002:a17:903:11d2:b0:1e2:a2f3:2130 with SMTP id q18-20020a17090311d200b001e2a2f32130mr1834786plh.12.1712327338616; Fri, 05 Apr 2024 07:28:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712327338; cv=pass; d=google.com; s=arc-20160816; b=HXhuPOhLcGdPsh2s5OhJyIGNz8a/ZluGdmlnBeTXHoq1TC0NbGr3SpseeyjYKI5EQx +i6lYnTUrRhEWX9AWM/cckg8T9FFvdULBaeVe8VzEfvH9RGzU5tcv7eKO6+pEMiJ3eLg bciQEl3CitpsgW+N8XFGqXGWHJcI/EQuJZWNMNAjbEWYQ5fe0OSvXeVqtdPOTeSqTsx2 Y1MUxzLX/Yu5nYGmFkh+jDvfCVMehl+70XmVX21lO13f0TGSPuWjHb1wXyJnNmT+Lzfj yMvuC20yNzlKKh7uFZuaFYGrYDLjtUsQS2CUtaCjeWP66Qo2tQ0dqbZJWq1D3AnC/wSB g9Jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=odw3CQ2LtmE4bh3JZxSJGe5rG8gg2NkT3IYngGQQ+c8=; fh=PjctDYiqMfUJMBa8+Zi+hs1Il5ZOeo37eQbVJ7Y6M5k=; b=rHj0buQipNqAfLVzTVpa23WaB70YLwALflIL65OwThme3ng2czIPhg9j9YDsNiC3U3 HjpoRo8qgWADqu751V6J4jijyc1vnFD382D4AjRHrgg+EOvXI3JrkvkPwnHc6+6jq9Gc Kg3BIJp+44a6dBa7YclIPKMOX41Xt/Bv9CVrSJjilW6tOIwGiMaS9fEiM0qUUWDFzySK aAeymMmmEoC+O3Ds5RSr7qcK7nIt1Z5Xh8fMpLsBylyNlbkd3GIG1WYtHcOnDgvWKBui ZOU6rIQYCBAbG/jHGZ/frFqkqtiLy1XnGIl656ZFi0w26wo1X42JKJnbgt8YlB9rCu1p tUCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UTWuCqC+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133152-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133152-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e5-20020a170903240500b001e2c37ac3d4si1452792plo.235.2024.04.05.07.28.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 07:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133152-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UTWuCqC+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133152-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133152-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6072CB2276A for ; Fri, 5 Apr 2024 14:28:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 441CD16EC0A; Fri, 5 Apr 2024 14:28:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UTWuCqC+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60D1116EBEB; Fri, 5 Apr 2024 14:28:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327309; cv=none; b=XaVcdKOhCzVjDwmXeGdDv2RGWzk8hlfOieXsFp9+x7GrwYoW3RMxfYL0DrdwO5+RRwokk4ewgR7izDBCzmwIBq/bliHD/LfYKWl8z/GeboCMW5lxJ1hdTzCX2Jd0TRLM9abvF3cPU0fl2BSfDfr2xoUCMK59lxsJcebMvgvIKZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327309; c=relaxed/simple; bh=F4cLYa35bs+vGQ3otj+tZ+gR8cVZxKEOwbRS5rXqeIs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=cce405HXDMmHtqzY8Zk+bcMCdT7wBMCrQ0St7Rvf6te5RfVNrQiTMrkXBo439aInO3Q+jL1PoDXp2Mmei5UmLIgTfVRb5x7g1TCvd5dT35HXPScP01o7i9HiyGKnsyHRDBw02KLqMWpY4lSqcEkggMBPnC0xMUyuwNVKP/Hi7QY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UTWuCqC+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59386C433C7; Fri, 5 Apr 2024 14:28:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712327308; bh=F4cLYa35bs+vGQ3otj+tZ+gR8cVZxKEOwbRS5rXqeIs=; h=From:To:Cc:Subject:Date:From; b=UTWuCqC+8b5MhYjP6DSeqxRKQ8lNjzTxo8BjDSmC4rmygV3ZmHxeuDm6taFnHcTLi I3dGLOh5C6e97Zb6AG0LIKKU5OrERSHoIrSBNkCmvXd1VzouW2o34NswRB0KaKQfch dfnUFI8zg5l3QUUFil45D2OE/oZpiqQTl199EicMVz0YDf8RjEPDnTRCYJGgjRVrUH tEiDM1SSouzBnlpDBgNaBxG6Nw2xaXul6MyNyqeeeoCpVh1uytcuZft19Nk6RmHCUl EUeFw/49COhyba0lkwpOcAS9CKMVoHLsrcBDNK5UNwUNeAVj4SblpxmNujB+5qd7z0 /ieUcQTLuWqtg== From: Arnd Bergmann To: Andi Shyti , Wim Van Sebroeck , Guenter Roeck , Heiner Kallweit , Wolfram Sang Cc: Arnd Bergmann , Jarkko Nikula , Geert Uytterhoeven , Jean Delvare , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org Subject: [PATCH] i2c: i801: add I2C_MUX dependency Date: Fri, 5 Apr 2024 16:27:43 +0200 Message-Id: <20240405142823.615609-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann When I2C_MUX is a loadable module but I2C_I801 is built-in, the newly added notifier function causes a link error: x86_64-linux-ld: drivers/i2c/busses/i2c-i801.o: in function `i801_notifier_call': i2c-i801.c:(.text+0x1f5): undefined reference to `i2c_root_adapter' This code is only built if I2C_MUX_GPIO is also enabled, so add a conditional dependency that allows building the driver as before if the GPIO part is disabled, but otherwise require the linker dependency at Kconfig level. With the added dependency, the driver cannot be selected by a builtin ITCO_WDT driver when I2C_MUX_GPIO is a loadable module, so remove the 'select' statement in that driver as well. This was apparently never needed at compile-time, and the watchdog driver just needs either the LPC or the I2C drivers, but never both. Configurations that rely on the implied 'select' from the watchdog driver now need to enable all three. Fixes: 71b494e043d2 ("i2c: i801: Call i2c_register_spd for muxed child segments") Signed-off-by: Arnd Bergmann --- drivers/i2c/busses/Kconfig | 1 + drivers/watchdog/Kconfig | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 1872f1995c77..2619018dd756 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -108,6 +108,7 @@ config I2C_HIX5HD2 config I2C_I801 tristate "Intel 82801 (ICH/PCH)" depends on PCI + depends on I2C_MUX || I2C_MUX_GPIO=n select P2SB if X86 select CHECK_SIGNATURE if X86 && DMI select I2C_SMBUS diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 0b0df3fe1efd..4dfb3773e6e2 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -1301,8 +1301,6 @@ config ITCO_WDT select WATCHDOG_CORE depends on I2C || I2C=n depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT - select LPC_ICH if !EXPERT - select I2C_I801 if !EXPERT && I2C help Hardware driver for the intel TCO timer based watchdog devices. These drivers are included in the Intel 82801 I/O Controller -- 2.39.2