Hi Andy, On Thu, Jun 14, 2018 at 12:18 PM, Daniel Drake <drake@xxxxxxxxxxxx> wrote: > On Tue, Jun 5, 2018 at 3:16 PM, Andy Shevchenko > <andy.shevchenko@xxxxxxxxx> wrote: >> The other part is to carefully crafted Kconfig line for dependency >> that allows you to handle that corner case. I don't remember by hart >> how to cook that, but we have some examples in kernel. >> I would check if I can find one. Though you may try to find yourself as well. > > I have looked through many Kconfig files under drivers as examples, > and I can't see any way to write the "depends on" line to enforce the > specific required logic of disallowing HID_ASUS=y combined with > ASUS_WMI=m, other than the approach that I already put in the patch: > > config HID_ASUS > tristate "Asus" > depends on LEDS_CLASS > depends on ASUS_WMI > > The alternative is to use "select", but that also deviates away from > your suggestion, and I don't think it's right. Plus "select ASUS_WMI" > causes this circular dependency: > > drivers/platform/x86/Kconfig:627:error: recursive dependency detected! > drivers/platform/x86/Kconfig:627: symbol ASUS_WMI is selected by HID_ASUS > drivers/hid/Kconfig:149: symbol HID_ASUS depends on LEDS_CLASS > drivers/leds/Kconfig:16: symbol LEDS_CLASS is selected by ASUS_WMI > For a resolution refer to Documentation/kbuild/kconfig-language.txt > subsection "Kconfig recursive dependency limitations" > > So if you do prefer "select" we would have to make it like this: > > config HID_ASUS > tristate "Asus" > select LEDS_CLASS > select ASUS_WMI This fix is still blocked on your feedback/review. Any clarifications? Thanks Daniel