Skip to contentSkip to conversation

platform/x86: Kconfig: Make wireless-hotkey depend on RFKILL

PATCH In review Mario Limonciello 2 participants 5 messages Jul 20, 2021 – Jul 28, 2021 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: Kconfig: Make wireless-hotkey depend on RFKILL

This driver can be built on a kernel without rfkill, but events won't work which causes an unexpected experience.

---
 drivers/platform/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
index 7d385c3b2239..22b6e7e3da13 100644
@@ -419,6 +419,7 @@ config WIRELESS_HOTKEY
 	tristate "Wireless hotkey button"
 	depends on ACPI
 	depends on INPUT
+	depends on RFKILL
 	help
 	 This driver provides supports for the wireless buttons found on some AMD,
 	 HP, & Xioami laptops.
Signature · 1 line
2.25.1
#1 lore raw

Hi,

Quoted 4 lines · Mario Limonciello

This driver can be built on a kernel without rfkill, but events won't work which causes an unexpected experience.

Mario I can understand where you are coming from here, but Kconfig dependencies are meant to express true in kernel dependencies.

The wireless-hotkey driver is purely an ACPI based input driver from the kernel pov and as such it works fine without RFKILL being enabled.

So adding a RFKILL dependency is the wrong thing to do here IMHO.

Regards,

Hans

Quoted 17 lines
---
 drivers/platform/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
index 7d385c3b2239..22b6e7e3da13 100644
@@ -419,6 +419,7 @@ config WIRELESS_HOTKEY
 	tristate "Wireless hotkey button"
 	depends on ACPI
 	depends on INPUT
+	depends on RFKILL
 	help
 	 This driver provides supports for the wireless buttons found on some AMD,
 	 HP, & Xioami laptops.
#2 lore raw
Quoted 8 lines · Hans de Goede

Hi,

Quoted 4 lines · Mario Limonciello

This driver can be built on a kernel without rfkill, but events won't work which causes an unexpected experience.

Quoted 9 lines

Mario I can understand where you are coming from here, but Kconfig dependencies are meant to express true in kernel dependencies.

The wireless-hotkey driver is purely an ACPI based input driver from the kernel pov and as such it works fine without RFKILL being enabled.

So adding a RFKILL dependency is the wrong thing to do here IMHO.

Thanks, I get your point. Is there another type of relationship that can be expressed for this? Is SELECT a better idea perhaps?

Quoted 24 lines

Regards,

Hans

Quoted 17 lines
---
  drivers/platform/x86/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
index 7d385c3b2239..22b6e7e3da13 100644
@@ -419,6 +419,7 @@ config WIRELESS_HOTKEY
  	tristate "Wireless hotkey button"
  	depends on ACPI
  	depends on INPUT
+	depends on RFKILL
  	help
  	 This driver provides supports for the wireless buttons found on some AMD,
  	 HP, & Xioami laptops.
#3 lore raw

Hi,

Quoted 12 lines · Mario
Quoted 11 lines · Hans de Goede

Hi,

Quoted 4 lines · Mario Limonciello

This driver can be built on a kernel without rfkill, but events won't work which causes an unexpected experience.

Mario I can understand where you are coming from here, but Kconfig dependencies are meant to express true in kernel dependencies.

Quoted 8 lines
Quoted 6 lines

The wireless-hotkey driver is purely an ACPI based input driver from the kernel pov and as such it works fine without RFKILL being enabled.

So adding a RFKILL dependency is the wrong thing to do here IMHO.

Thanks, I get your point.  Is there another type of relationship that can be expressed for this?

No I'm afraid not.

Quoted 1 line

Is SELECT a better idea perhaps?

No select should only be used when enabling blocks of kernel code which in essence function as a library used by other code. In general either all users of a Kconfig symbol should either use depends on, or select. If different consumers of the functionality mix depends on and select then the Kconfig tools will typically exit with some error due to e.g. circular dependencies.

Regards,

Hans

Quoted 19 lines
Quoted 18 lines
Quoted 17 lines

---
  drivers/platform/x86/Kconfig | 1 +

  1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +0 -0
index 7d385c3b2239..22b6e7e3da13 100644
@@ -419,6 +419,7 @@ config WIRELESS_HOTKEY

      tristate "Wireless hotkey button"
      depends on ACPI
      depends on INPUT
+    depends on RFKILL
      help
       This driver provides supports for the wireless buttons found on some AMD, HP, & Xioami laptops.

#4 lore raw

Hi,

Quoted 26 lines · Hans de Goede

Hi,

Quoted 12 lines · Mario
Quoted 11 lines · Hans de Goede

Hi,

Quoted 4 lines · Mario Limonciello

This driver can be built on a kernel without rfkill, but events won't work which causes an unexpected experience.

Mario I can understand where you are coming from here, but Kconfig dependencies are meant to express true in kernel dependencies.

Quoted 8 lines
Quoted 6 lines

The wireless-hotkey driver is purely an ACPI based input driver from the kernel pov and as such it works fine without RFKILL being enabled.

So adding a RFKILL dependency is the wrong thing to do here IMHO.

Thanks, I get your point.  Is there another type of relationship that can be expressed for this?

No I'm afraid not.

Quoted 8 lines
Quoted 1 line

Is SELECT a better idea perhaps?

No select should only be used when enabling blocks of kernel code which in essence function as a library used by other code. In general either all users of a Kconfig symbol should either use depends on, or select. If different consumers of the functionality mix depends on and select then the Kconfig tools will typically exit with some error due to e.g. circular dependencies.

p.s.

More in general all the config options the kernel has simply offer so much flexiblity that it is impossible to protect users against configurations which may not work for them.

There simply is not much we can do about this. In general Kconfig changes like the one which you propose should only be made to avoid having a possible .config which will not build (typically due to linker errors)

Users should really just stick with def_config-s or distro configs.

Regards,

Hans

Quoted 27 lines

Regards,

Hans

Quoted 19 lines
Quoted 18 lines
Quoted 17 lines

---
  drivers/platform/x86/Kconfig | 1 +

  1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +0 -0
index 7d385c3b2239..22b6e7e3da13 100644
@@ -419,6 +419,7 @@ config WIRELESS_HOTKEY

      tristate "Wireless hotkey button"
      depends on ACPI
      depends on INPUT
+    depends on RFKILL
      help
       This driver provides supports for the wireless buttons found on some AMD, HP, & Xioami laptops.