Re: [PATCH v7 2/3] leds: initial support for Turris Omnia LEDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marek

On 7/24/20 7:08 AM, Marek Behún wrote:
On Fri, 24 Jul 2020 12:58:25 +0200
Pavel Machek <pavel@xxxxxx> wrote:

Hi!

This adds basic support for LEDs on the front side of CZ.NIC's
Turris Omnia router.

There are 12 RGB LEDs. The controller supports HW triggering mode
for the LEDs, but this driver does not support it yet, and sets all
the LEDs defined in device-tree into SW mode upon probe.

This driver uses the multicolor LED framework.

Signed-off-by: Marek Behún <marek.behun@xxxxxx>
Reviewed-by: Dan Murphy <dmurphy@xxxxxx>
---
  drivers/leds/Kconfig             |  11 ++
  drivers/leds/Makefile            |   1 +
  drivers/leds/leds-turris-omnia.c | 295
+++++++++++++++++++++++++++++++ 3 files changed, 307 insertions(+)
  create mode 100644 drivers/leds/leds-turris-omnia.c
Whoever told you to use defines here was evil:
I think it was that way when it was first proposed, sometime last year,
but Dan complained about magic numbers, so I changed it to macros :D

Ah yes I did make a comment about magic numbers but did not explicitly ask for macros, enum would have sufficed and

I was more concerned about the buffer length being consistent in the file since it was hard coded twice in two different functions.

So I am only partially evil.

Dan





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux