Re: [PATCH v2 2/2] HID: asus: only support backlight when it's not driven by WMI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 17, 2018 at 5:11 PM, Daniel Drake <drake@xxxxxxxxxxxx> wrote:
> 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?

I guess you are looking something like below with corresponding header
that provides stubs in case it's not enabled.

        depends on CHARGER_BQ24190=y || (CHARGER_BQ24190=m && m)

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux