mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	andy.shevchenko@gmail.com, mchehab+huawei@kernel.org,
	mauro.chehab@huawei.com, linux-leds@vger.kernel.org,
	Jafar Akhondali <jafar.akhoondali@gmail.com>
Subject: Re: LEDs with hardware-accelerated patterns, suspend indication
Date: Fri, 4 Jun 2021 22:28:48 +0200	[thread overview]
Message-ID: <5fbbab4f-3e22-5a4a-eea8-2531ee165cc4@redhat.com> (raw)
In-Reply-To: <20210526153040.GA4537@amd>

Hi Pavel,

On 5/26/21 5:30 PM, Pavel Machek wrote:
> Hi!
> 
> We have hardware trigger for arbitrary patterns... but then we have
> common hardware that can do few simple patterns but not arbitrary
> ones.
> 
> Proposal:
> 
> Have a new hardware trigger "lpattern" that will allow selection of
> patterns hardware can commonly provide. I guess that is "off", "on",
> "blinking", "breathing". Maybe with variations like "slow" and "fast".

Adding Jafar, who has been working on adding support for the hardware
patterns on the Acer Helios 300 RGB keyboard.

Quoting from his patch for this:

Backlight modes:
1: Breath
2: Neon
3: Wave
4: Shifting
5: Zoom

So it looks like we need some more patterns for this to also be
usable for his case, although patterns like wave, shifting and zoom
sound like they are multi-LED patterns.

Jafar can you explain how this works in a bit more detail. I get
the feeling that from a hardware-API pov there are no individual
addressable LEDs, yet some effects do program individual LEDs
differently then their neighbors ?  Or am I just misunderstanding
what some of the effects do ?

> It should provide software fallbacks, so we have reference how the
> patterns should look like and behave.

I think that we should probably define a couple of standard
patterns with sw-fallbacks but also allow drivers to add
driver specific pattern names, which won't have a sw fallback,
this could then be combined with a lpatterns_available sysfs
file or some such which lists the standard patterns + the
driver specific patterns.

This could then e.g. be used by the Acer Helios 300 RGB keyboard
case.

> It is quite common to provide LED with charging activity.
> 
> Proposal:
> 
> Have a trigger called "charging" which would provide three
> subdirectories "charged", "charging" and "discharging" with interface
> similar to the new "lpattern" trigger.

When you say similar, you mean that each dir will have a lpattern
file which can have one of the (standard) lpattern values ?

This sounds good to me (this should work well for the whiskey-cove
PMIC case which we discussed a while ago.

> It is very common to have combined LED for power and suspend.
> 
> Proposal:
> 
> Have a trigger called "sysstate" with three subdirectories "off", "on"
> and "suspended", with interfaces similar to the "lpattern" trigger.

Regards,

Hans


  reply	other threads:[~2021-06-04 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 15:30 Pavel Machek
2021-06-04 20:28 ` Hans de Goede [this message]
     [not found]   ` <CAMW3L+19tP_9=+8j8LLjqCGDaaVZ86UMm9NwLbbpA77zOYnr1Q@mail.gmail.com>
     [not found]     ` <79988fe2-7b3d-7485-131c-4f654ec6d8b8@redhat.com>
     [not found]       ` <CAMW3L+13O4jXyp1LVtuxhpXP_fkfWXi9JoNS8FYUAMHaJBGKZg@mail.gmail.com>
2021-06-15 12:17         ` Hans de Goede
2021-06-23 20:39           ` Pavel Machek
2021-06-25  9:18             ` Hans de Goede

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=5fbbab4f-3e22-5a4a-eea8-2531ee165cc4@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jafar.akhoondali@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mauro.chehab@huawei.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=pavel@ucw.cz \
    /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

all inboxes | Powered by JetHome®