x86/Kconfig: move and modify CONFIG_I8K
authorMateusz Jończyk <mat.jonczyk@o2.pl>
Sat, 12 Feb 2022 12:56:53 +0000 (13:56 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 28 Feb 2022 01:03:18 +0000 (17:03 -0800)
In Kconfig, inside the "Processor type and features" menu, there is
the CONFIG_I8K option: "Dell i8k legacy laptop support". This is
very confusing - enabling CONFIG_I8K is not required for the kernel to
support old Dell laptops. This option is specific to the dell-smm-hwmon
driver, which mostly exports some hardware monitoring information and
allows the user to change fan speed.

This option is misplaced, so move CONFIG_I8K to drivers/hwmon/Kconfig,
where it belongs.

Also, modify the dependency order - change
        select SENSORS_DELL_SMM
to
        depends on SENSORS_DELL_SMM
as it is just a configuration option of dell-smm-hwmon. This includes
changing the option type from tristate to bool. It was tristate because
it could select CONFIG_SENSORS_DELL_SMM=m .

When running "make oldconfig" on configurations with
CONFIG_SENSORS_DELL_SMM enabled , this change will result in an
additional question (which could be printed several times during
bisecting). I think that tidying up the configuration is worth it,
though.

Next patch tweaks the description of CONFIG_I8K.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Pali Rohár <pali@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Mark Gross <markgross@kernel.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220212125654.357408-1-mat.jonczyk@o2.pl
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
arch/x86/Kconfig
drivers/hwmon/Kconfig

index 9f5bd41..71d4ddd 100644 (file)
@@ -1275,23 +1275,6 @@ config TOSHIBA
          Say Y if you intend to run this kernel on a Toshiba portable.
          Say N otherwise.
 
-config I8K
-       tristate "Dell i8k legacy laptop support"
-       depends on HWMON
-       depends on PROC_FS
-       select SENSORS_DELL_SMM
-       help
-         This option enables legacy /proc/i8k userspace interface in hwmon
-         dell-smm-hwmon driver. Character file /proc/i8k reports bios version,
-         temperature and allows controlling fan speeds of Dell laptops via
-         System Management Mode. For old Dell laptops (like Dell Inspiron 8000)
-         it reports also power and hotkey status. For fan speed control is
-         needed userspace package i8kutils.
-
-         Say Y if you intend to run this kernel on old Dell laptops or want to
-         use userspace package i8kutils.
-         Say N otherwise.
-
 config X86_REBOOTFIXUPS
        bool "Enable X86 board specific fixups for reboot"
        depends on X86_32
index 387253a..fceea53 100644 (file)
@@ -506,6 +506,22 @@ config SENSORS_DELL_SMM
          When option I8K is also enabled this driver provides legacy /proc/i8k
          userspace interface for i8kutils package.
 
+config I8K
+       bool "Dell i8k legacy laptop support"
+       depends on SENSORS_DELL_SMM
+       depends on PROC_FS
+       help
+         This option enables legacy /proc/i8k userspace interface in hwmon
+         dell-smm-hwmon driver. Character file /proc/i8k reports bios version,
+         temperature and allows controlling fan speeds of Dell laptops via
+         System Management Mode. For old Dell laptops (like Dell Inspiron 8000)
+         it reports also power and hotkey status. For fan speed control is
+         needed userspace package i8kutils.
+
+         Say Y if you intend to run this kernel on old Dell laptops or want to
+         use userspace package i8kutils.
+         Say N otherwise.
+
 config SENSORS_DA9052_ADC
        tristate "Dialog DA9052/DA9053 ADC"
        depends on PMIC_DA9052