From: Milo Kim <woogyom.kim@gmail.com>
To: Bryan Wu <cooloney@gmail.com>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
"Milo Kim" <milo.kim@ti.com>
Subject: [PATCH 01/10] leds: lp55xx: add common data structure for program
Date: Thu, 8 Aug 2013 16:59:45 +0900 [thread overview]
Message-ID: <1375948794-6286-2-git-send-email-milo.kim@ti.com> (raw)
In-Reply-To: <1375948794-6286-1-git-send-email-milo.kim@ti.com>
LP55xx family devices have internal three program engines which are used for
loading LED patterns.
To maintain legacy device attributes, specific data structure is used, 'mode'
and 'led_mux'.
The mode is used for showing/storing current engine mode such like disabled,
load and run.
Then led_mux is used for showing/storing current output LED selection.
This is only for LP5523/55231.
Signed-off-by: Milo Kim <milo.kim@ti.com>
---
drivers/leds/leds-lp55xx-common.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h
index dbbf86d..04c1d4f 100644
--- a/drivers/leds/leds-lp55xx-common.h
+++ b/drivers/leds/leds-lp55xx-common.h
@@ -20,6 +20,13 @@ enum lp55xx_engine_index {
LP55XX_ENGINE_1,
LP55XX_ENGINE_2,
LP55XX_ENGINE_3,
+ LP55XX_ENGINE_MAX = LP55XX_ENGINE_3,
+};
+
+enum lp55xx_engine_mode {
+ LP55XX_ENGINE_DISABLED,
+ LP55XX_ENGINE_LOAD,
+ LP55XX_ENGINE_RUN,
};
struct lp55xx_led;
@@ -72,6 +79,16 @@ struct lp55xx_device_config {
};
/*
+ * struct lp55xx_engine
+ * @mode : Engine mode
+ * @led_mux : Mux bits for LED selection. Only used in LP5523
+ */
+struct lp55xx_engine {
+ enum lp55xx_engine_mode mode;
+ u16 led_mux;
+};
+
+/*
* struct lp55xx_chip
* @cl : I2C communication for access registers
* @pdata : Platform specific data
@@ -79,6 +96,7 @@ struct lp55xx_device_config {
* @num_leds : Number of registered LEDs
* @cfg : Device specific configuration data
* @engine_idx : Selected engine number
+ * @engines : Engine structure for the device attribute R/W interface
* @fw : Firmware data for running a LED pattern
*/
struct lp55xx_chip {
@@ -89,6 +107,7 @@ struct lp55xx_chip {
int num_leds;
struct lp55xx_device_config *cfg;
enum lp55xx_engine_index engine_idx;
+ struct lp55xx_engine engines[LP55XX_ENGINE_MAX];
const struct firmware *fw;
};
--
1.7.9.5
next prev parent reply other threads:[~2013-08-08 8:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 7:59 [PATCH 00/10] leds: lp5521,5523: restore device attributes for running LED patterns Milo Kim
2013-08-08 7:59 ` Milo Kim [this message]
2013-08-13 18:56 ` [PATCH 01/10] leds: lp55xx: add common data structure for program Bryan Wu
2013-08-18 22:57 ` Kim, Milo
2013-08-08 7:59 ` [PATCH 02/10] leds: lp55xx: add common macros for device attributes Milo Kim
2013-08-13 19:12 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 03/10] leds: lp5521: restore legacy " Milo Kim
2013-08-13 20:40 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 04/10] leds: lp5521: remove unnecessary writing commands Milo Kim
2013-08-13 20:42 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 05/10] leds: lp5523: make separate API for loading engine Milo Kim
2013-08-13 20:54 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 06/10] leds: lp5523: LED MUX configuration on initializing Milo Kim
2013-08-13 20:56 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 07/10] leds: lp5523: restore legacy device attributes Milo Kim
2013-08-13 20:58 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 08/10] leds: lp5523: remove unnecessary writing commands Milo Kim
2013-08-13 20:59 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 09/10] Documentation: leds-lp5521,lp5523: update device attribute information Milo Kim
2013-08-13 21:00 ` Bryan Wu
2013-08-08 7:59 ` [PATCH 10/10] leds: lp5562: use LP55xx common macros for device attributes Milo Kim
2013-08-13 21:00 ` Bryan Wu
2013-08-13 21:04 ` [PATCH 00/10] leds: lp5521,5523: restore device attributes for running LED patterns Bryan Wu
2013-10-25 16:38 ` Pali Rohár
2013-10-25 17:10 ` Bryan Wu
2013-10-25 18:21 ` Pali Rohár
2013-10-29 23:17 ` Bryan Wu
2013-11-08 5:15 ` Milo Kim
[not found] ` <CAK5ve-KQPxc-xWs1rh6KTgGK8VdLOgHqMLT8D90+mYt8P+xaew@mail.gmail.com>
2013-11-19 10:35 ` Pali Rohár
2013-11-19 19:20 ` Bryan Wu
2013-11-19 22:33 ` Milo Kim
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=1375948794-6286-2-git-send-email-milo.kim@ti.com \
--to=woogyom.kim@gmail.com \
--cc=cooloney@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=milo.kim@ti.com \
--cc=pali.rohar@gmail.com \
/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®