Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457260 > unrolled thread

Re: [RFC] User-defined leds

Started byPavel Machek <pavel@ucw.cz>
First post2016-08-05 22:00 +0200
Last post2016-08-05 22:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC] User-defined leds Pavel Machek <pavel@ucw.cz> - 2016-08-05 22:00 +0200
    Re: [RFC] User-defined leds David Lechner <david@lechnology.com> - 2016-08-05 22:00 +0200
      Re: [RFC] User-defined leds Pavel Machek <pavel@ucw.cz> - 2016-08-05 22:00 +0200

#1457260 — Re: [RFC] User-defined leds

FromPavel Machek <pavel@ucw.cz>
Date2016-08-05 22:00 +0200
SubjectRe: [RFC] User-defined leds
Message-ID<s2TrI-3xr-13@gated-at.bofh.it>
Hi!

> > short version: I have a use case for leds where I want to be able to use the triggers in the leds subsystem without having a physical hardware led.
> > 
> > long version: I am working on a program to make one embedded system (http://fatcatlab.com/product/evb/) compatible with another (http://mindstorms.lego.com). One has physical red/green LEDs, that use the gpio leds driver to control them. The other system does not have physical leds. However, it does have a color screen. So, my idea is
> > to create virtual LEDs on the screen that emulate the physical LEDs on the other device.
> > 
> > I would like to make a userspace program that works the same on both devices. If the leds were simple on-off, then it would of course be simpler to make the virtual leds completely in userspace. However, we are currently using other triggers (disk activity/heatbeat/etc.) with the leds. I would like for the virtual LEDs to be able to use these triggers as well.
> 
> this is funny since I have just written a ledsim.c using debugfs to emulate a LED and read out its state via a simple cat command. I found that useful for testing triggers in the Bluetooth subsystem and see if they behave correctly without bothering to run this on real hardware.
> 

Could the device tree be used to bind LED driver to otherwise unused
gpio?

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

[toc] | [next] | [standalone]


#1457261

FromDavid Lechner <david@lechnology.com>
Date2016-08-05 22:00 +0200
Message-ID<s2TrH-3xr-11@gated-at.bofh.it>
In reply to#1457260
On 08/05/2016 02:51 PM, Pavel Machek wrote:
>
> Could the device tree be used to bind LED driver to otherwise unused
> gpio?
>
> 								Pavel
>

There is already a leds-gpio driver that does this.

https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txt

[toc] | [prev] | [next] | [standalone]


#1457262

FromPavel Machek <pavel@ucw.cz>
Date2016-08-05 22:00 +0200
Message-ID<s2TrI-3xr-19@gated-at.bofh.it>
In reply to#1457261
On Fri 2016-08-05 14:54:33, David Lechner wrote:
> On 08/05/2016 02:51 PM, Pavel Machek wrote:
> >
> >Could the device tree be used to bind LED driver to otherwise unused
> >gpio?
> 
> There is already a leds-gpio driver that does this.
> 
> https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txt

Yeah, I know, that's why I suggested it :-).

What might be missing: simple way to attach leds-gpio driver to
hardware on non-devicetree machines, and perhaps teaching leds-gpio
special gpio value "no gpio" meaning ... that hardware is not actually
updated.

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web