Linux-i2c Archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Andi Shyti <andi.shyti@kernel.org>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Jean Delvare <jdelvare@suse.de>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] i2c: i801: add I2C_MUX dependency
Date: Mon, 8 Apr 2024 04:42:10 -0700	[thread overview]
Message-ID: <a24a2a8a-2be9-414d-8378-668ba4408c71@roeck-us.net> (raw)
In-Reply-To: <cea58361-16bd-4daf-85eb-4d63d47cb46f@app.fastmail.com>

On Sat, Apr 06, 2024 at 05:45:57PM +0200, Arnd Bergmann wrote:
> On Sat, Apr 6, 2024, at 15:08, Guenter Roeck wrote:
> > On Fri, Apr 05, 2024 at 04:27:43PM +0200, Arnd Bergmann wrote:
> >> 
> >> 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
> >
> > Sorry, I don't understand why LPC_ICH and I2C_I801 are neither a dependency
> > nor need to be selected. What if both LPC_ICH=n and I2C_I801=n, or if one is
> > selected but the other is needed to connect to the watchdog ?
> 
> The Kconfig dependencies are only required if there is a compile-time
> dependencies. In this case, both LPC_ICH and I2C_I801 create a
> platform device that is consumed by ITCO_WDT, but it could in
> theory work with any other such driver providing the device.
> 
> It would be fine to make this explicit by adding
> 'depends on LPC_ICH || I2C_I801' to enforce that the watchdog
> driver can only be selected on if at least one of these
> is present, but we have a lot of examples where we don't
> spell out this type of dependency.
> 

Yes, I know, there are lots of inconsistencies in the kernel and its
configuration. That should not be an excuse to making it worse.

Guenter

      reply	other threads:[~2024-04-08 11:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 14:27 [PATCH] i2c: i801: add I2C_MUX dependency Arnd Bergmann
2024-04-05 19:18 ` Heiner Kallweit
2024-04-05 20:16   ` Arnd Bergmann
2024-04-06  0:31 ` Andi Shyti
2024-04-06 13:08 ` Guenter Roeck
2024-04-06 15:45   ` Arnd Bergmann
2024-04-08 11:42     ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a24a2a8a-2be9-414d-8378-668ba4408c71@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andi.shyti@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=hkallweit1@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@linux-watchdog.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).