All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: linux-leds@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>,
	linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	Paul Fertser <fercerpav@gmail.com>
Subject: Re: proper framework for meter sink?
Date: Wed, 3 Jan 2018 13:23:26 +0100	[thread overview]
Message-ID: <20180103122326.GB28083@amd> (raw)
In-Reply-To: <649fa764-6598-8f05-90c0-e10a4d36b08f@rempel-privat.de>

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

Hi!

> I wont to use existing LED triggers by setting multiple LEDs on trigger.
> The triggers should use brightness value by different trigger intensity
> and the driver should set different amount of LEDs depending on
> brightness value.

Well... we don't really have "trigger intensities" inside the kernel.

Are you sure this is something kernel should do?

> With other words LED meter controller by kernel LED framework. It should
> be possible to configure LED arrays by Device Tree.
> Initially i was thinking about some kind of extended leds-gpio.c driver
> which will convert brightness value to LED position. But one my friend
> pointed me that metes exist in different configurations and it make no
> sense to bind it to LED framework.
> 
> Do you have any ideas, suggestions, tips? I know there are lot of user
> space based variants. On other hand kernel already have almost every
> thing what I need.


We could have triggers like "on if value is above X", and then you
could use few of them to implement a meter.

But I guess this would be better done in userspace... Why not do it there?

									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 --]

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
Cc: linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Sakari Ailus <sakari.ailus-X3B1VOXEql0@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Peter Meerwald-Stadler
	<pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
	Oleksij Rempel <o.rempel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Paul Fertser <fercerpav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: proper framework for meter sink?
Date: Wed, 3 Jan 2018 13:23:26 +0100	[thread overview]
Message-ID: <20180103122326.GB28083@amd> (raw)
In-Reply-To: <649fa764-6598-8f05-90c0-e10a4d36b08f-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>

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

Hi!

> I wont to use existing LED triggers by setting multiple LEDs on trigger.
> The triggers should use brightness value by different trigger intensity
> and the driver should set different amount of LEDs depending on
> brightness value.

Well... we don't really have "trigger intensities" inside the kernel.

Are you sure this is something kernel should do?

> With other words LED meter controller by kernel LED framework. It should
> be possible to configure LED arrays by Device Tree.
> Initially i was thinking about some kind of extended leds-gpio.c driver
> which will convert brightness value to LED position. But one my friend
> pointed me that metes exist in different configurations and it make no
> sense to bind it to LED framework.
> 
> Do you have any ideas, suggestions, tips? I know there are lot of user
> space based variants. On other hand kernel already have almost every
> thing what I need.


We could have triggers like "on if value is above X", and then you
could use few of them to implement a meter.

But I guess this would be better done in userspace... Why not do it there?

									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:[~2018-01-03 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 11:48 proper framework for meter sink? Oleksij Rempel
2018-01-03 12:23 ` Pavel Machek [this message]
2018-01-03 12:23   ` Pavel Machek

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=20180103122326.GB28083@amd \
    --to=pavel@ucw.cz \
    --cc=fercerpav@gmail.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=o.rempel@pengutronix.de \
    --cc=pmeerw@pmeerw.net \
    --cc=sakari.ailus@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.