linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Molloy <philip@philipmolloy.com>
To: "linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>
Subject: Abstraction for dual LED driver override feature
Date: Thu, 25 Jul 2019 19:43:24 +0000	[thread overview]
Message-ID: <-SZHSFMkCZILLVhmVPIa2HVHWpZN2OId3iixPCrsBNWCmtyC2bt5ATy3iOTlNuD_12k6xRBcXwUf7_WT3Ij7ccp0357LdxUUSjojm2_LFUc=@philipmolloy.com> (raw)

Hello,

I'm writing a driver for the TI LM3644 dual current flash LED driver[1] and could use some advice on how to abstract a feature of the device that allows the user to fix the brightness of the 2nd LED to the brightness of the 1st.

Bit 7 of the LED1 torch brightness register signifies whether the LED2 torch current should be set to the LED1 torch current. By default this override is enabled.

Is it worth exposing this feature to userspace? And what might a good way to do that be?

Or alternatively, hide the feature by setting bit 7 of the LED1 torch brightness register to 0 every time I write to the LED2 torch brightness register?

Unfortunately, I couldn't find an example of similar functionality in any of the mainline LED kernel modules.

Best,
Philip

[1]: http://www.ti.com/lit/ds/symlink/lm3644.pdf

             reply	other threads:[~2019-07-25 19:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 19:43 Philip Molloy [this message]
2019-07-25 20:12 ` Abstraction for dual LED driver override feature Jacek Anaszewski
2019-07-25 20:26 ` Dan Murphy

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='-SZHSFMkCZILLVhmVPIa2HVHWpZN2OId3iixPCrsBNWCmtyC2bt5ATy3iOTlNuD_12k6xRBcXwUf7_WT3Ij7ccp0357LdxUUSjojm2_LFUc=@philipmolloy.com' \
    --to=philip@philipmolloy.com \
    --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).