Re: [PATCH v3 3/3] mfd: ensure that AXP20X_I2C will have the right deps on X86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Mon, 18 May 2020 14:17:06 +0200
Hans de Goede <hdegoede@xxxxxxxxxx> escreveu:

> Hi,
> 
> On 5/18/20 1:42 PM, Mauro Carvalho Chehab wrote:
> > The axp20x I2C driver can be used on X86, but also on ARM
> > platforms.
> > 
> > Yet, for X86, it has to be builtin and need ACPI OpRegion
> > support enabled.
> > 
> > So, the dependency chain is diferent for X86 and for other
> > archs.
> > 
> > Change the dependency chain to take this into consideration,
> > ensuring that everything will be set as it should.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>  
> 
> Hmm, last time we tried something like this (it was tried before,
> but in a bit different way) we ran into all kind of dependency /
> select cycles / issues.

Yeah, changes like that could cause troubles, specially where
select is used. With the approach I took, there's just one
new select for "IOSF_MBI".

I double-checked that, on most places, this feature is selected.
After this patch, there will be only three "depends on IOSF_MBI",
that could likely be also converted to "select":

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 0ad7ad8cf8e1..d99ad532e17a 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -740,7 +740,8 @@ config THINKPAD_ACPI_HOTKEY_POLL
 
 config INTEL_ATOMISP2_PM
 	tristate "Intel AtomISP2 dummy / power-management driver"
-	depends on PCI && IOSF_MBI && PM
+	depends on PCI && PM
+	select IOSF_MBI
 	help
 	  Power-management driver for Intel's Image Signal Processor found on
 	  Bay Trail and Cherry Trail devices. This dummy driver's sole purpose
@@ -1185,7 +1186,8 @@ config TOUCHSCREEN_DMI
 
 config INTEL_IMR
 	bool "Intel Isolated Memory Region support"
-	depends on X86_INTEL_QUARK && IOSF_MBI
+	depends on X86_INTEL_QUARK
+	select IOSF_MBI
 	---help---
 	  This option provides a means to manipulate Isolated Memory Regions.
 	  IMRs are a set of registers that define read and write access masks
diff --git a/drivers/powercap/Kconfig b/drivers/powercap/Kconfig
index dc1c1381d7fa..f4a3f110c720 100644
--- a/drivers/powercap/Kconfig
+++ b/drivers/powercap/Kconfig
@@ -21,7 +21,8 @@ config INTEL_RAPL_CORE
 
 config INTEL_RAPL
 	tristate "Intel RAPL Support via MSR Interface"
-	depends on X86 && IOSF_MBI
+	depends on X86
+	select IOSF_MBI
 	select INTEL_RAPL_CORE
 	---help---
 	  This enables support for the Intel Running Average Power Limit (RAPL)

The one for INTEL_IMR could even be dropped, as config 
X86_INTEL_QUARK already selects it too.

> With that said I'm fine with giving this another try, maybe let
> the test builders / rand config builds play with it for a while
> and see what happens?

Yeah, it makes sense to me.

Thanks,
Mauro



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux