linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Ondrej Jirman <megous@megous.com>
Cc: linux-sunxi@googlegroups.com,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Dan Murphy <dmurphy@ti.com>, Rob Herring <robh+dt@kernel.org>,
	Chen-Yu Tsai <wens@csie.org>, Maxime Ripard <mripard@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] leds: axp20x: Support charger LED on AXP20x like PMICs
Date: Wed, 26 Feb 2020 15:08:54 +0100	[thread overview]
Message-ID: <20200226140854.GJ4080@duo.ucw.cz> (raw)
In-Reply-To: <20200223131435.681620-3-megous@megous.com>

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2020-02-26 14:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 13:14 [PATCH 0/4] Add support for charger LED for AXP813 and TBS A711 Tablet Ondrej Jirman
2020-02-23 13:14 ` [PATCH 1/4] dt-bindings: leds: Add a binding for AXP813 charger led Ondrej Jirman
2020-02-25 12:55   ` Dan Murphy
2020-02-26 22:30   ` Rob Herring
2020-02-23 13:14 ` [PATCH 2/4] leds: axp20x: Support charger LED on AXP20x like PMICs Ondrej Jirman
2020-02-25 12:53   ` Dan Murphy
2020-02-26 14:08   ` Pavel Machek [this message]
2020-02-23 13:14 ` [PATCH 3/4] ARM: dts: axp813: Add charger LED Ondrej Jirman
2020-02-25 12:56   ` Dan Murphy
2020-02-23 13:14 ` [PATCH 4/4] ARM: dts: sun8i-a83t-tbs-a711: Enable charging LED Ondrej Jirman
2020-02-23 13:27 ` [PATCH 0/4] Add support for charger LED for AXP813 and TBS A711 Tablet Ondřej Jirman
2020-02-23 13:35   ` Ondřej Jirman
2020-02-24  6:31     ` [linux-sunxi] " Stefan Mavrodiev
2020-02-24 16:28       ` Ondřej Jirman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200226140854.GJ4080@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=megous@megous.com \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).