diff mbox series

[2/3] x86: apuv2: fix input dependencies

Message ID 20190304201930.1622839-2-arnd@arndb.de
State New
Headers show
Series [1/3] phy: allwinner: allow compile testing | expand

Commit Message

Arnd Bergmann March 4, 2019, 8:19 p.m. UTC
We cannot select KEYBOARD_GPIO_POLLED if CONFIG_INPUT or CONFIG_INPUT_KEYBOARD
are disabled:

WARNING: unmet direct dependencies detected for KEYBOARD_GPIO_POLLED
  Depends on [n]: !UML && INPUT [=y] && INPUT_KEYBOARD [=n] && GPIOLIB [=y]
  Selected by [y]:
  - PCENGINES_APU2 [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y]

This could be fixed using either a dependency or a 'select' statement.
I'm chosen 'depends on' here since it is simpler has a lower risk of
introducing circular dependencies.

Fixes: f8eb0235f659 ("x86: pcengines apuv2 gpio/leds/keys platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/platform/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)

-- 
2.20.0

Comments

Andy Shevchenko March 5, 2019, 1:56 p.m. UTC | #1
On Tue, Mar 5, 2019 at 3:50 PM Enrico Weigelt, metux IT consult
<lkml@metux.net> wrote:
> On 05.03.19 09:23, Arnd Bergmann wrote:


> > 1. try to use 'depends on' if you can

>

> Well, this has the unpleasant side effect that we often have to enable

> a lot of things, just to even see the individual driver. For people who

> just wanna configure a kernel for their board, this is a bit nasty.

>

> But, okay, I'm going to do this w/ my own tool - I've written a small

> tool that allows easy kernel reconfiguration on a higher level: you

> can just pick some board templates and enable high level features like

> eth, gpu, etc - it automatically creates a .config for you. I'm going

> announce it on lkml soon.


Darren gave a talk about merging kernel configs to get something like
you want to.
This tool is quite long already lying around. merge_config.sh in your
kernel source tree.

-- 
With Best Regards,
Andy Shevchenko
Arnd Bergmann March 5, 2019, 4:46 p.m. UTC | #2
On Tue, Mar 5, 2019 at 2:50 PM Enrico Weigelt, metux IT consult
<lkml@metux.net> wrote:
>

> On 05.03.19 09:23, Arnd Bergmann wrote:

>

> hmm, if circular deps happen, wouldn't that mean we've got some deeper

> problems in here ? IMHO, dependencies should always form a DAG (except

> for some really rare cases).

>

> Do you recall any actual problem w/ input vs gpio vs. drivers ?

> I'd like to have a closer look at it.


Not with gpio. Most of the circular dependencies I've seen tend to
revolve around drivers/gpu/drm, which uses more 'select' statements
than most other subsystems. Those dependencies often touch
backlight, acpi, fbdev and other things then.

       Arnd
diff mbox series

Patch

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 851ea921a58d..4d65d37b0c86 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1305,6 +1305,7 @@  config HUAWEI_WMI
 
 config PCENGINES_APU2
 	tristate "PC Engines APUv2/3 front button and LEDs driver"
+	depends on INPUT && INPUT_KEYBOARD
 	select GPIO_AMD_FCH
 	select KEYBOARD_GPIO_POLLED
 	select LEDS_GPIO