diff mbox series

HID: HID_APPLETB_BL and HID_APPLETB_KBD should depend on X86

Message ID 4b046ce1cae2170453037c7ea006c91c12383dab.1744190441.git.geert+renesas@glider.be (mailing list archive)
State New
Delegated to: Jiri Kosina
Headers show
Series HID: HID_APPLETB_BL and HID_APPLETB_KBD should depend on X86 | expand

Commit Message

Geert Uytterhoeven April 9, 2025, 9:21 a.m. UTC
The Apple Touch Bar is only present on x86 MacBook Pros.  Hence add a
dependency on X86, to prevent asking the user about this driver when
configuring a kernel for a different architecture.

Fixes: 1fd41e5e3d7cc556 ("HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars")
Fixes: 93a0fc48948107e0 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/hid/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Aditya Garg April 9, 2025, 2:35 p.m. UTC | #1
On 09-04-2025 02:51 pm, Geert Uytterhoeven wrote:
> The Apple Touch Bar is only present on x86 MacBook Pros.  Hence add a
> dependency on X86, to prevent asking the user about this driver when
> configuring a kernel for a different architecture.
> 
> Fixes: 1fd41e5e3d7cc556 ("HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars")
> Fixes: 93a0fc48948107e0 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")

Nit:

The commit SHA should have only the first 12 characters.

https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

Also, hid-appletb-kbd fix should be:

Fixes: 8e9b9152cfbd ("HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch Bars")

I would also prefer having them as 2 separate patches.
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/hid/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index a503252702b7b43c..43859fc757470caf 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -151,6 +151,7 @@ config HID_APPLEIR
>  config HID_APPLETB_BL
>  	tristate "Apple Touch Bar Backlight"
>  	depends on BACKLIGHT_CLASS_DEVICE
> +	depends on X86 || COMPILE_TEST
>  	help
>  	  Say Y here if you want support for the backlight of Touch Bars on x86
>  	  MacBook Pros.
> @@ -163,6 +164,7 @@ config HID_APPLETB_KBD
>  	depends on USB_HID
>  	depends on BACKLIGHT_CLASS_DEVICE
>  	depends on INPUT
> +	depends on X86 || COMPILE_TEST
>  	select INPUT_SPARSEKMAP
>  	select HID_APPLETB_BL
>  	help
Geert Uytterhoeven April 10, 2025, 8:08 a.m. UTC | #2
Hi Aditya,

On Wed, 9 Apr 2025 at 16:35, Aditya Garg <gargaditya08@live.com> wrote:
> On 09-04-2025 02:51 pm, Geert Uytterhoeven wrote:
> > The Apple Touch Bar is only present on x86 MacBook Pros.  Hence add a
> > dependency on X86, to prevent asking the user about this driver when
> > configuring a kernel for a different architecture.
> >
> > Fixes: 1fd41e5e3d7cc556 ("HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars")
> > Fixes: 93a0fc48948107e0 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")
>
> Nit:
>
> The commit SHA should have only the first 12 characters.
>
> https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

"at least the first 12 characters"
(I know, because I made that change lately ;-)

> Also, hid-appletb-kbd fix should be:
>
> Fixes: 8e9b9152cfbd ("HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch Bars")
>
> I would also prefer having them as 2 separate patches.

OK, will do.

Gr{oetje,eeting}s,

                        Geert
Aditya Garg April 10, 2025, 8:14 a.m. UTC | #3
> On 10 Apr 2025, at 1:39 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> Hi Aditya,
> 
>> On Wed, 9 Apr 2025 at 16:35, Aditya Garg <gargaditya08@live.com> wrote:
>>> On 09-04-2025 02:51 pm, Geert Uytterhoeven wrote:
>>> The Apple Touch Bar is only present on x86 MacBook Pros.  Hence add a
>>> dependency on X86, to prevent asking the user about this driver when
>>> configuring a kernel for a different architecture.
>>> 
>>> Fixes: 1fd41e5e3d7cc556 ("HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars")
>>> Fixes: 93a0fc48948107e0 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")
>> 
>> Nit:
>> 
>> The commit SHA should have only the first 12 characters.
>> 
>> https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes
> 
> "at least the first 12 characters"

Ah interesting. I remember being ranted by some kernel dev about this before. Didn't know it changed.
> (I know, because I made that change lately ;-)
> 
>> Also, hid-appletb-kbd fix should be:
>> 
>> Fixes: 8e9b9152cfbd ("HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch Bars")
>> 
>> I would also prefer having them as 2 separate patches.
> 
> OK, will do.
> 
Thanks

> Gr{oetje,eeting}s,
> 
>                        Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index a503252702b7b43c..43859fc757470caf 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -151,6 +151,7 @@  config HID_APPLEIR
 config HID_APPLETB_BL
 	tristate "Apple Touch Bar Backlight"
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on X86 || COMPILE_TEST
 	help
 	  Say Y here if you want support for the backlight of Touch Bars on x86
 	  MacBook Pros.
@@ -163,6 +164,7 @@  config HID_APPLETB_KBD
 	depends on USB_HID
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on INPUT
+	depends on X86 || COMPILE_TEST
 	select INPUT_SPARSEKMAP
 	select HID_APPLETB_BL
 	help