Skip to contentSkip to conversation

HID: nvidia-shield: Select POWER_SUPPLY Kconfig option

PATCH In review Rahul Rameshbabu 2 participants 5 messages Sep 17, 2023 – Oct 5, 2023 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: nvidia-shield: Select POWER_SUPPLY Kconfig option

Battery information reported by the driver depends on the power supply subsystem. Select the required subsystem when the HID_NVIDIA_SHIELD Kconfig option is enabled.

Fixes 3ab196f88237 ("HID: nvidia-shield: Add battery support for Thunderstrike")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -0
index e11c1c803676..dc227f477601 100644
@@ -792,6 +792,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	select POWER_SUPPLY
 	help
 	  Support for NVIDIA SHIELD accessories.
 
Signature · 1 line
2.40.1
maintainer
#1 lore raw
Quoted 15 lines · Rahul Rameshbabu

Battery information reported by the driver depends on the power supply subsystem. Select the required subsystem when the HID_NVIDIA_SHIELD Kconfig option is enabled.

Fixes 3ab196f88237 ("HID: nvidia-shield: Add battery support for Thunderstrike")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +0 -0
index e11c1c803676..dc227f477601 100644

drivers/hid/Kconfig config HID_NVIDIA_SHIELD · line 795

Quoted 4 lines
drivers/hid/Kconfig +1 -0
@@ -792,6 +792,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	select POWER_SUPPLY

Is there a reason not to do it the standard way using 'depends on', and not vice versa?

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 12 lines · On Mon, 18 Sep, 2023 16:56:49 +0200 Jiri Kosina <[email protected]> wrote:
Quoted 10 lines · Rahul Rameshbabu

Battery information reported by the driver depends on the power supply subsystem. Select the required subsystem when the HID_NVIDIA_SHIELD Kconfig option is enabled.

Fixes 3ab196f88237 ("HID: nvidia-shield: Add battery support for Thunderstrike")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

drivers/hid/Kconfig config HID_NVIDIA_SHIELD · line 795

Quoted 9 lines
drivers/hid/Kconfig +1 -0
index e11c1c803676..dc227f477601 100644
@@ -792,6 +792,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	select POWER_SUPPLY

Is there a reason not to do it the standard way using 'depends on', and not vice versa?

I originally used 'depends on' for POWER_SUPPLY. I took a look at drivers/hid/Kconfig and saw that all modules that depended on POWER_SUPPLY in the hid subsystem used 'select' instead. I figured I should follow the trend.

--
Thanks,

Rahul Rameshbabu

maintainer
#3 lore raw
Quoted 23 lines · Rahul Rameshbabu
Quoted 10 lines
Quoted 10 lines

Battery information reported by the driver depends on the power supply subsystem. Select the required subsystem when the HID_NVIDIA_SHIELD Kconfig option is enabled.

Fixes 3ab196f88237 ("HID: nvidia-shield: Add battery support for Thunderstrike")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

drivers/hid/Kconfig config HID_NVIDIA_SHIELD · line 795

Quoted 9 lines
drivers/hid/Kconfig +1 -0
index e11c1c803676..dc227f477601 100644
@@ -792,6 +792,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	select POWER_SUPPLY

Is there a reason not to do it the standard way using 'depends on', and not vice versa?

Quoted 4 lines

I originally used 'depends on' for POWER_SUPPLY. I took a look at drivers/hid/Kconfig and saw that all modules that depended on POWER_SUPPLY in the hid subsystem used 'select' instead. I figured I should follow the trend.

You are right.

I still don't like the fact that we are forcefully selecting POWER_SUPPLY like this, but that's a 6.7 material.

Appplied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs
#4 lore raw
Quoted 30 lines · On Wed, 04 Oct, 2023 20:49:07 +0200 Jiri Kosina <[email protected]> wrote:
Quoted 23 lines · Rahul Rameshbabu
Quoted 10 lines
Quoted 10 lines

Battery information reported by the driver depends on the power supply subsystem. Select the required subsystem when the HID_NVIDIA_SHIELD Kconfig option is enabled.

Fixes 3ab196f88237 ("HID: nvidia-shield: Add battery support for Thunderstrike")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

drivers/hid/Kconfig config HID_NVIDIA_SHIELD · line 795

Quoted 9 lines
drivers/hid/Kconfig +1 -0
index e11c1c803676..dc227f477601 100644
@@ -792,6 +792,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	select POWER_SUPPLY

Is there a reason not to do it the standard way using 'depends on', and not vice versa?

Quoted 4 lines

I originally used 'depends on' for POWER_SUPPLY. I took a look at drivers/hid/Kconfig and saw that all modules that depended on POWER_SUPPLY in the hid subsystem used 'select' instead. I figured I should follow the trend.

Quoted 4 lines

You are right.

I still don't like the fact that we are forcefully selecting POWER_SUPPLY like this, but that's a 6.7 material.

I agree. This bothered me as well, so I am glad you called it out. There were some items I wanted to look at for 6.7. Do you want me to add this to some other patches I am hoping to send out or did you want to take care of this?

--
Thanks,

Rahul Rameshbabu