[PATCH v7 12/13] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

Andy Shevchenko andy.shevchenko at gmail.com
Fri Aug 5 06:09:39 PDT 2022


On Fri, Aug 5, 2022 at 9:07 AM ChiaEn Wu <peterwu.pub at gmail.com> wrote:
>
> From: Alice Chen <alice_chen at richtek.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 a support for the MT6370 Flash LED driver. Flash LED in MT6370
> has 2 channels and support torch/strobe mode.

Same comments as per previous LED related patch.

...

> +       /*
> +        * For the flash to turn on/off, we need to wait HW ramping up/down time
> +        * 5ms/500us to prevent the unexpected problem.
> +        */
> +       if (!priv->fled_strobe_used && curr)
> +               usleep_range(5000, 6000);
> +       else if (priv->fled_strobe_used && !curr)
> +               usleep_range(500, 600);

Now it's much better!

...

> +       /*
> +        * Always configure as min level when off to
> +        * prevent flash current spike

/*
 * You need to check the style
 * of multi-line comments like
 * this one.
 */

> +        */

-- 
With Best Regards,
Andy Shevchenko



More information about the Linux-mediatek mailing list