Thread (2 messages) 2 messages, 2 authors, 2017-08-15

Re: [PATCH v2] leds: add LED driver for CR0014114 board

From: Oleh Kravchenko <hidden>
Date: 2017-08-15 11:37:47
Also in: linux-leds

Hello Rob.

Thank you for review.

On 14.08.17 17:28, Rob Herring wrote:
Please CC DT list for bindings and make bindings a separate patch.
I will do.
On Mon, Aug 14, 2017 at 6:53 AM, Oleh Kravchenko [off-list ref] wrote:
quoted
This patch adds a LED class driver for the RGB LEDs found on
the Crane Merchandising System CR0014114 LEDs board.

Driver creates LED devices with name written using the following
pattern "LABEL-{N}:{red,green,blue}:".

Signed-off-by: Oleh Kravchenko <redacted>
---
 .../devicetree/bindings/leds/leds-cr0014114.txt    |  23 ++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 drivers/leds/Kconfig                               |  12 +
 drivers/leds/Makefile                              |   1 +
 drivers/leds/leds-cr0014114.c                      | 352 +++++++++++++++++++++
 5 files changed, 389 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-cr0014114.txt
 create mode 100644 drivers/leds/leds-cr0014114.c
diff --git a/Documentation/devicetree/bindings/leds/leds-cr0014114.txt b/Documentation/devicetree/bindings/leds/leds-cr0014114.txt
new file mode 100644
index 000000000000..6a399cb65388
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-cr0014114.txt
@@ -0,0 +1,23 @@
+Crane Merchandising System SPI LED board CR0014114
+==================================================
+
+Required properties:
+- compatible: "cms,cr0014114"
+
+Optional properties:
+- label: prefix for LED names. If omitted the label is taken from the node name.
label generally is the full name, not a prefix. It kind of defeats the
point of label if the name is the same. You might as well move this
into the driver.
quoted
+- leds-per-board: RGB leds per board, minimal value is 6
+- num-boards: number of LED boards on SPI bus, usually 1
From the driver, looks like you just need the total led count?

It also appears that the driver knows the color arrangement. Perhaps
you should have child nodes for each LED as the LED binding defines.
reg can have 2 cells if you need to define board# and led#. And label
can be the full label name if you keep label in the DT.
Thanks, it's will be better.
Rob
-- 
Best regards,
Oleh Kravchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help