linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Yauhen Kharuzhy <jekhor@gmail.com>,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v2 1/2] leds: Add Intel Cherry Trail Whiskey Cove PMIC LEDs
Date: Fri, 15 Feb 2019 14:02:07 +0100	[thread overview]
Message-ID: <20190215130207.GB32198@amd> (raw)
In-Reply-To: <2a5e2002-e5f1-6da3-8a43-317801b69657@redhat.com>

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

Hi!

> >Hardware can automatically control the LED according to the charging
> >status, or it can be used as normal software-controlled LED.
> >
> >I believe we should use trigger to select if hardware controls it or
> >not (and then add driver-specific files to describe the
> >details). Other proposal is in the mail thread, too.
> 
> Right, so there are really 2 orthogonal issues here:

For completeness, there are actually 3 issues:

> 1) With this hardware the LED is either turned on/off automatically
> by the PMIC based on charging state; or it is under user control.
> 
> This is different from the led_classdev_notify_brightness_hw_changed
> case, where the hardware may update the state underneath the driver,
> but the driver can still always update the state itself. In this case
> if the LED is in hw-control mode then the driver cannot turn it on/off.
> 
> Pavel suggested modeling this with a new "hardware' trigger, where
> setting the trigger to this trigger will enable the hw-controlled
> mode and setting any other trigger will switch thing to the user-controlled
> mode.
> 
> 2) This hardware can do blinking / breathing. There are various issues with
> this:
> 
> 2.1) Blinking is more or less covered by the timer trigger. But breathing is
> not the pattern trigger is a poor match since there is only 1 fixed pattern
> 
> 2.2) The supported blinking frequencies are very limited, so it might be better
> to keep the standard software blinking mode and have a special sysfs attribute
> to select the hardware blink support
> 
> 2.3) The user can also select between continuous on / blinking / breathing
> when the LED is under hardware control (it will then be on / blinking / breathing)
> when charging.

3) Your hardware supports "composed" triggers:

You can do "breathing while charging", can do "blinking while
charging" and you probably could do "blinking while disk is active" or
"breathing while microphone is muted".

We don't have such support in LED subsystem, AFAICT. Anyway, I'd say
3) Does not need to be solved now...

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2019-02-15 13:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 20:58 [PATCH v2 0/2] Intel Cherry Trail Whiskey Cove LEDs support Yauhen Kharuzhy
2019-02-12 20:59 ` [PATCH v2 1/2] leds: Add Intel Cherry Trail Whiskey Cove PMIC LEDs Yauhen Kharuzhy
2019-02-13 22:43   ` Hans de Goede
2019-02-13 23:07     ` Pavel Machek
2019-02-13 23:25       ` Hans de Goede
2019-02-13 23:38         ` Pavel Machek
2019-02-14  9:57           ` Hans de Goede
2019-02-14 11:14             ` Pavel Machek
2019-02-14 11:31               ` Hans de Goede
2019-02-14 12:28                 ` Pavel Machek
2019-02-15 21:41                   ` Jacek Anaszewski
2019-02-15 23:26                     ` Pavel Machek
2019-02-14 21:46                 ` Jacek Anaszewski
2019-02-14 23:03                   ` Pavel Machek
2019-02-15  7:27                     ` Yauhen Kharuzhy
2019-02-15 21:43                       ` Jacek Anaszewski
2019-02-16 11:26                         ` Yauhen Kharuzhy
2019-02-15 11:27                     ` Hans de Goede
2019-02-15 13:02                       ` Pavel Machek [this message]
2019-02-15 21:42                       ` Jacek Anaszewski
2019-02-15 22:26                         ` Hans de Goede
2019-02-15 22:31                           ` Jacek Anaszewski
2019-02-15 23:14                             ` Hans de Goede
2019-02-16 17:02                               ` Jacek Anaszewski
2019-02-16 19:01                                 ` Hans de Goede
2019-02-16 19:37                                   ` Pavel Machek
2019-02-16 20:55                                     ` Hans de Goede
2019-02-17  0:08                                       ` Pavel Machek
2019-02-17 14:10                                         ` Hans de Goede
2019-02-17 17:45                                           ` Pavel Machek
2019-02-18 11:12                                             ` Hans de Goede
2019-02-18 21:59                                               ` Jacek Anaszewski
2019-02-16 21:54                                     ` Jacek Anaszewski
2019-02-16 22:03                                       ` Hans de Goede
2019-02-17 12:40                                         ` Jacek Anaszewski
2019-02-14 11:28             ` Pavel Machek
2019-02-14 21:34             ` Yauhen Kharuzhy
2019-02-14  6:55     ` Yauhen Kharuzhy
2019-02-14 10:04     ` Hans de Goede
2019-02-12 20:59 ` [PATCH v2 2/2] mfd: Add leds MFD cell for intel_soc_pmic_chtwc Yauhen Kharuzhy
2019-02-13 21:24   ` Jacek Anaszewski
2019-03-20  9:56   ` Lee Jones
2019-03-20  9:57     ` Lee Jones
2019-04-21 19:28 ` [PATCH v2 0/2] Intel Cherry Trail Whiskey Cove LEDs support Hans de Goede
2019-04-24 18:32   ` Yauhen Kharuzhy

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=20190215130207.GB32198@amd \
    --to=pavel@ucw.cz \
    --cc=hdegoede@redhat.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jekhor@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.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).