mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: Kelly French <kfrench@federalhill.net>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jacek Anaszewski <j.anaszewski@samsung.com>
Subject: Re: [PATCH v3] leds: Introduce userspace leds driver
Date: Fri, 9 Sep 2016 15:44:34 -0500	[thread overview]
Message-ID: <90740877-e729-38c0-cc8b-0f80050125e7@lechnology.com> (raw)
In-Reply-To: <alpine.LRH.2.20.1609091525060.22407@federalhill.net>

On 09/09/2016 02:30 PM, Kelly French wrote:
>
> Replying privately, as I'm not involved in the kernel community.
>

By offering your opinion, you are now involved in the community. No need 
to be shy. :-)

> I'm looking forward to this functionality.  I'm a little worried about
> the interface.  Is it possible to create the new uled devices in some
> other way?
>
> Maybe one insmod per uled device?  Maybe a new /proc/ entry (yuck) where
> you can echo the name into it, which will trigger udev to create the
> appropraite /dev/uled-name device?
>
> I'm hoping that the final interface is something I can just "cat
> /dev/uled-name" instead of having to write a binary struct into it at
> the beginning.  I'm even ok with just echoing text into the dev entry
> before reading.  It's the binary struct that's bugging me.
>


I originally considered using configfs to setup new LEDs[1], which would 
be very much like what you are suggesting, but I find the way my current 
patch works to be much simpler.

With this patch, you can create multiple LEDs. You just have to open a 
file handle to /dev/uleds for each LED that you want to create. Also, 
the LED device is automatically destroyed when the file handle is 
closed. I think this is nice because if the program that created it 
crashes, then it is automatically cleaned up.

I agree it would be much more convenient to not use a binary struct, but 
I think the complexity of implementing it outweighs any benefit to be 
gained. And it is easy enough to use an interactive python shell to 
handle the things that bash can't if the interactive part is what you 
really want.



[1]: https://lkml.org/lkml/2016/7/25/505

  parent reply	other threads:[~2016-09-09 20:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 16:49 David Lechner
     [not found] ` <alpine.LRH.2.20.1609091525060.22407@federalhill.net>
2016-09-09 20:44   ` David Lechner [this message]
     [not found] ` <CGME20160912081846eucas1p255044e49034685ad44400d6830ef0b95@eucas1p2.samsung.com>
2016-09-12  8:18   ` Jacek Anaszewski
2016-09-12 14:58     ` David Lechner
2016-09-15 13:08     ` Pavel Machek
2016-09-15 13:35       ` Pavel Machek
2016-09-15 14:54         ` Jacek Anaszewski
2016-09-16  6:09           ` Pavel Machek
2016-09-15 14:54       ` Jacek Anaszewski
2016-09-15 15:31         ` David Lechner
2016-09-15 15:35           ` David Lechner
2016-09-16  5:51           ` Pavel Machek
2016-09-16 15:18             ` David Lechner
2016-09-16  5:59           ` Pavel Machek
2016-09-16 15:32             ` David Lechner
2016-09-16  6:07           ` Pavel Machek
2016-09-16 15:41             ` David Lechner
2016-09-15 16:34         ` David Lechner
2016-09-16  5:50           ` Pavel Machek
2016-09-16  7:07             ` Jacek Anaszewski
2016-09-16 15:09               ` David Lechner
2016-09-16 19:29                 ` 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=90740877-e729-38c0-cc8b-0f80050125e7@lechnology.com \
    --to=david@lechnology.com \
    --cc=j.anaszewski@samsung.com \
    --cc=kfrench@federalhill.net \
    --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

all inboxes | Powered by JetHome®