Re: [PATCH 2/4] leds: axp20x: Support charger LED on AXP20x like PMICs

From: Pavel Machek
Date: Wed Feb 26 2020 - 09:09:03 EST


Hi!

> There is single LED that can be turned on and off by the user, or set to
> be controlled by the charger in 2 different modes.
>
> The driver initializes the LED to be controlled by the charger, but
> allows to switch it to user control, and change the mode of charging
> indication via a sysfs.

You'd need to document new "control" file.

But hold on, it is not an only driver with this "user-or-hardware"
feature, and we want to have a common solution. And that solution is
probably to have "hw-charger" trigger _just for this_ LED.

I can easily take a driver that always handles it as a "user" LED, if
you can get ACKs from device tree people on the documentation patches.

> + led->regmap = axp20x->regmap;
> +
> + led->cdev.name = "axp20x-chgarger-led";

typo.

> +static void axp20x_led_shutdown(struct platform_device *pdev)
> +{
> + struct axp20x_led *led = platform_get_drvdata(pdev);
> +
> + /* On shutdown, we want to give LED control back to the PMIC,
> + * so that it doesn't stay on, while the system is off.
> + */

Comment style.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: PGP signature