linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Praznik <frank.praznik@gmail.com>
To: simon@mungewell.org
Cc: Frank Praznik <frank.praznik@oh.rr.com>,
	HID CORE LAYER <linux-input@vger.kernel.org>,
	Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH v4 7/7] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs
Date: Fri, 04 Apr 2014 19:41:43 -0400	[thread overview]
Message-ID: <533F4337.8000101@gmail.com> (raw)
In-Reply-To: <a7a124f17fadaebb5c6e42337a25421a.squirrel@mungewell.org>

On 4/4/2014 17:13, simon@mungewell.org wrote:
> I see the driver has a special case/function for setting blink with 
> 'sony_led_blink_set()' which could be made to do funky stuff but that 
> might very rapidly become messy.
>> These software-only triggers are why I'm thinking it would be good to
>> have an extra global control for controlling the whole light bar
>> synchronously.
> A while ago (summer 2012) I messed around with the idea of 'chaining'
> (grouping) leds together into a linked list, such that any actions on the
> head of the list were duplicated to all leds in the chain.
>
> The chain was created by a new trigger 'chain' and given the parameter of
> the led to follow. I got as far as some code (wanted to learn about linked
> lists in the kernel), but don't remember whether it worked properly on
> not.
>
> In this use case we could 'chain' the red->blue, and then have the blue
> trigger set as 'timer' (or 'heartbeat') to cause a 'off->purple' blinking.
> This would remove the contention in your scheme of having two places/leds
> ('red' and 'all') which could be set differently.
>
> I can see if there's still some code on my disk if others are interested
> in the idea.
> Simon.

This sounds kind of like how things work now: The blink function maps 
all blink requests to any of the LEDs to one global value and uses that 
to set the hardware delay on/off values.

I'd be interested in seeing your solution if you still have it, but that 
still sounds like it still wouldn't work in the case of something like 
the heartbeat trigger which doesn't actually use the blink function, 
just runs it's own internal timer and just changes the brightness every 
so often.  The LED code in the module doesn't know where the commands 
are coming from, just that it's being told to change brightness so it 
wouldn't know which commands come from a trigger and should effect 
everything vs which are user commands and should just change the 
brightness of that specific LED.

  reply	other threads:[~2014-04-04 23:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 16:31 [PATCH v4 0/7] HID: sony: More Sony controller fixes and improvements Frank Praznik
2014-04-02 16:31 ` [PATCH v4 1/7] HID: sony: Fix cancel_work_sync mismerge Frank Praznik
2014-04-03 12:24   ` Jiri Kosina
2014-04-02 16:31 ` [PATCH v4 2/7] HID: sony: Use inliners for work queue initialization and cancellation Frank Praznik
2014-04-02 16:31 ` [PATCH v4 3/7] HID: sony: Use a struct for the Sixaxis output report Frank Praznik
2014-04-02 16:31 ` [PATCH v4 4/7] HID: sony: Convert startup and shutdown functions to use a uniform parameter type Frank Praznik
2014-04-02 16:31 ` [PATCH v4 5/7] HID: sony: Use the controller Bluetooth MAC address as the unique value in the battery name string Frank Praznik
2014-04-02 16:31 ` [PATCH v4 6/7] HID: sony: Initialize the controller LEDs with a device ID value Frank Praznik
2014-04-02 16:31 ` [PATCH v4 7/7] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs Frank Praznik
2014-04-04  5:55   ` simon
     [not found]     ` <533EBE48.5010100@oh.rr.com>
2014-04-04 16:11       ` simon
2014-04-04 18:37         ` Frank Praznik
2014-04-04 21:13           ` simon
2014-04-04 23:41             ` Frank Praznik [this message]
2014-04-09  5:51       ` simon
2014-04-09 17:41         ` Frank Praznik
2014-04-02 22:36 ` [PATCH v4 0/7] HID: sony: More Sony controller fixes and improvements Jiri Kosina

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=533F4337.8000101@gmail.com \
    --to=frank.praznik@gmail.com \
    --cc=frank.praznik@oh.rr.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@mungewell.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).