All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option
@ 2023-09-17 15:18 Rahul Rameshbabu
  2023-09-18 14:56 ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Rahul Rameshbabu @ 2023-09-17 15:18 UTC (permalink / raw)
  To: Benjamin Tissoires, Jiri Kosina; +Cc: linux-input, 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")
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index e11c1c803676..dc227f477601 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -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.
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option
  2023-09-17 15:18 [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option Rahul Rameshbabu
@ 2023-09-18 14:56 ` Jiri Kosina
  2023-09-18 16:18   ` Rahul Rameshbabu
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2023-09-18 14:56 UTC (permalink / raw)
  To: Rahul Rameshbabu; +Cc: Benjamin Tissoires, linux-input

On Sun, 17 Sep 2023, Rahul Rameshbabu wrote:

> 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")
> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> ---
>  drivers/hid/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index e11c1c803676..dc227f477601 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -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,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option
  2023-09-18 14:56 ` Jiri Kosina
@ 2023-09-18 16:18   ` Rahul Rameshbabu
  2023-10-04 18:49     ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Rahul Rameshbabu @ 2023-09-18 16:18 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Benjamin Tissoires, linux-input

On Mon, 18 Sep, 2023 16:56:49 +0200 Jiri Kosina <jikos@kernel.org> wrote:
> On Sun, 17 Sep 2023, Rahul Rameshbabu wrote:
>
>> 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")
>> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
>> ---
>>  drivers/hid/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
>> index e11c1c803676..dc227f477601 100644
>> --- a/drivers/hid/Kconfig
>> +++ b/drivers/hid/Kconfig
>> @@ -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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option
  2023-09-18 16:18   ` Rahul Rameshbabu
@ 2023-10-04 18:49     ` Jiri Kosina
  2023-10-05 23:54       ` Rahul Rameshbabu
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2023-10-04 18:49 UTC (permalink / raw)
  To: Rahul Rameshbabu; +Cc: Benjamin Tissoires, linux-input

On Mon, 18 Sep 2023, Rahul Rameshbabu wrote:

> >> 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")
> >> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> >> ---
> >>  drivers/hid/Kconfig | 1 +
> >>  1 file changed, 1 insertion(+)
> >> 
> >> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> >> index e11c1c803676..dc227f477601 100644
> >> --- a/drivers/hid/Kconfig
> >> +++ b/drivers/hid/Kconfig
> >> @@ -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.

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.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option
  2023-10-04 18:49     ` Jiri Kosina
@ 2023-10-05 23:54       ` Rahul Rameshbabu
  0 siblings, 0 replies; 5+ messages in thread
From: Rahul Rameshbabu @ 2023-10-05 23:54 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Benjamin Tissoires, linux-input

On Wed, 04 Oct, 2023 20:49:07 +0200 Jiri Kosina <jikos@kernel.org> wrote:
> On Mon, 18 Sep 2023, Rahul Rameshbabu wrote:
>
>> >> 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")
>> >> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
>> >> ---
>> >>  drivers/hid/Kconfig | 1 +
>> >>  1 file changed, 1 insertion(+)
>> >> 
>> >> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
>> >> index e11c1c803676..dc227f477601 100644
>> >> --- a/drivers/hid/Kconfig
>> >> +++ b/drivers/hid/Kconfig
>> >> @@ -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.
>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-05 23:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-17 15:18 [PATCH] HID: nvidia-shield: Select POWER_SUPPLY Kconfig option Rahul Rameshbabu
2023-09-18 14:56 ` Jiri Kosina
2023-09-18 16:18   ` Rahul Rameshbabu
2023-10-04 18:49     ` Jiri Kosina
2023-10-05 23:54       ` Rahul Rameshbabu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.