lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Oct 2022 13:02:06 +0200
From:   Jacek Anaszewski <jacek.anaszewski@...il.com>
To:     AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        ChiaEn Wu <peterwu.pub@...il.com>, pavel@....cz,
        matthias.bgg@...il.com, jic23@...nel.org, lars@...afoo.de,
        andriy.shevchenko@...ux.intel.com
Cc:     chiaen_wu@...htek.com, alice_chen@...htek.com,
        cy_huang@...htek.com, linux-leds@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-iio@...r.kernel.org, szunichen@...il.com
Subject: Re: [PATCH v14 3/3] leds: flash: mt6370: Add MediaTek MT6370
 flashlight support

On 10/11/22 11:52, AngeloGioacchino Del Regno wrote:
> Il 11/10/22 06:05, ChiaEn Wu ha scritto:
>> From: Alice Chen <alice_chen@...htek.com>
>>
>> The MediaTek MT6370 is a highly-integrated smart power management IC,
>> which includes a single cell Li-Ion/Li-Polymer switching battery
>> charger, a USB Type-C & Power Delivery (PD) controller, dual Flash
>> LED current sources, a RGB LED driver, a backlight WLED driver,
>> a display bias driver and a general LDO for portable devices.
>>
>> Add support for the MT6370 Flash LED driver. Flash LED in MT6370
>> has 2 channels and support torch/strobe mode.
>>
>> Signed-off-by: Alice Chen <alice_chen@...htek.com>
>> Signed-off-by: ChiaEn Wu <chiaen_wu@...htek.com>
>> ---
>>
>> v14
>> - Remove unused 'depend on OF' in Kconfig
>> ---
>>   drivers/leds/flash/Kconfig             |  14 +
>>   drivers/leds/flash/Makefile            |   1 +
>>   drivers/leds/flash/leds-mt6370-flash.c | 631 
>> +++++++++++++++++++++++++++++++++
>>   3 files changed, 646 insertions(+)
>>   create mode 100644 drivers/leds/flash/leds-mt6370-flash.c
>>
>> diff --git a/drivers/leds/flash/Kconfig b/drivers/leds/flash/Kconfig
>> index d3eb689..0dd955c 100644
>> --- a/drivers/leds/flash/Kconfig
>> +++ b/drivers/leds/flash/Kconfig
>> @@ -61,6 +61,20 @@ config LEDS_MT6360
>>         Independent current sources supply for each flash LED support 
>> torch
>>         and strobe mode.
>> +config LEDS_MT6370_FLASH
>> +    tristate "Flash LED Support for MediaTek MT6370 PMIC"
>> +    depends on LEDS_CLASS
>> +    depends on LEDS_CLASS_FLASH || !LEDS_CLASS_FLASH
> 
> This dependency makes no sense, as the options in the Kconfig you're 
> putting
> this into gets parsed only `if LEDS_CLASS_FLASH`.
> Please remove that.

So the Kconfig is buggy. Someone didn't take into account
`config LEDS_MT6360` requirements when moving drivers to the
flash subdirectory.

> 
>> +    depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
> 
> Well, if it depends on that being either y, m or n, it means that it does
> not depend on that at all. Remove.

I disagree. It makes a lot of sense.
This syntax allows creating correct dependencies by depmod for both
cases when V4L2_FLASH_LED_CLASS is enabled or not, since the driver
can work in both cases.

> 
> After which,
> Reviewed-by: AngeloGioacchino Del Regno 
> <angelogioacchino.delregno@...labora.com>
> 
>> +    depends on MFD_MT6370
>> +    help
>> +      Support 2 channels and torch/strobe mode.
>> +      Say Y here to enable support for
>> +      MT6370_FLASH_LED device.
>> +
>> +      This driver can also be built as a module. If so, the module
>> +      will be called "leds-mt6370-flash".
>> +
>>   config LEDS_RT4505
>>       tristate "LED support for RT4505 flashlight controller"
>>       depends on I2C && OF
> 
-- 
Best regards,
Jacek Anaszewski

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ