Re: [PATCH v8 6/7] power: supply: power-supply-leds: Add charging_orange_full_green trigger for RGB LED

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

 



On Fri, May 3, 2024 at 12:14 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> From: Kate Hsuan <hpa@xxxxxxxxxx>
>
> Add a charging_orange_full_green LED trigger and the trigger is based on
> led_mc_trigger_event() which can set an RGB LED when the trigger is
> triggered. The LED will show orange when the battery status is charging.
> The LED will show green when the battery status is full.

...


> +       psy->charging_orange_full_green_trig_name = kasprintf(GFP_KERNEL,
> +               "%s-charging-orange-full-green", psy->desc->name);
> +       if (!psy->charging_orange_full_green_trig_name)
> +               goto charging_red_full_green_failed;

Side note(s): Actually this function (as I can see the current code)
can be made neater with a temporary variable for allocated memory, but
also entire file can be converted to cleanup.h at some point.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux