From: Lee Jones <lee@kernel.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 00/20] leds: leds-lp55xx: overhaul driver
Date: Wed, 26 Jun 2024 16:42:55 +0100 [thread overview]
Message-ID: <20240626154255.GC2504017@google.com> (raw)
In-Reply-To: <20240620210401.22053-1-ansuelsmth@gmail.com>
On Thu, 20 Jun 2024, Christian Marangi wrote:
> This long series is (as requested) a big overhaul of the lp55xx based
> LED driver.
>
> As notice for these kind of LED chip there was the bad habit of copy
> the old driver and just modify it enough to make it work with the new
> model. Till v4 I was also doing the same by following the pattern and
> the code format of previous driver.
>
> Since Lee didn't like this, here is the BIG series that generalize
> pretty much anything in the 4 model currently supported.
>
> Indeed, although the LED chip have fundamental difference (page
> support), things can be generalized and produce slimmer drivers by
> putting everything in the lp55xx-common shared module.
>
> This result in the new model lp5569 being very small with only the
> selftest portion to be custom.
>
> Lee also wasn't clear by the meaning of ENGINE in these LED driver,
> so here some simple explaination. This is very common on these TI LED
> chip. The ENGINE (there are always 3) is just some kind of processor
> that execute a program (precompiled code ASM like) loaded in the SRAM.
> Sysfs is used to load the pattern, and to start and stop the engine.
>
> These pattern can do all kind of complex thing with LEDs. Old LED chip
> had 32bytes of space for the pattern but newer one (like lp5569) have
> pages and if correctly configured can have massive pattern.
> These pattern can do all kind of magic like loops that make the LED
> pulse, change color and all kind of stuff.
>
> (For Lee, sorry if you will have to repeat some review that I might
> have missed in the lp5569 driver)
>
> Changes v7:
> - Add Suggested-by tag
> - Fix checkpatch error for complex macro (rework define)
> - Add missing values for fader conversion
> - Align some function with redundant new line
> - Capitalize every commit title
> Changes v6:
> - Fix compilation warning for ret unused in read_poll_timeout
> (no idea why this is flagged only on some particular arch...)
> - Fix missing bitfield.h in lp55x-common.c (again it seems this
> header gets included in the flow if the arch use them or not...)
> Changes v5:
> - Big generalization patch
> - Rework lp5569 driver with new generalized functions
> - Drop all copyright header in lp5569 as the driver got reworked
> entirely and it's not based on previous one anymore.
> Changes v4:
> - Fix reported buffer overflow due to a copypaste error
> - Add comments to describe fw size logic
> Changes v3:
> - Add ACK tag to DT patch
> - Enlarge and support program size up to 128bytes
> Changes v2:
> - Add ACK tag to DT patch
> - Fix compilation error with target that doesn't
> include bitfield.h
>
> Christian Marangi (20):
> dt-bindings: leds-lp55xx: Limit pwr-sel property to ti,lp8501
> dt-bindings: leds-lp55xx: Add new ti,lp5569 compatible
> leds: leds-lp55xx: Generalize stop_all_engine OP
> leds: leds-lp55xx: Generalize probe/remove functions
> leds: leds-lp55xx: Generalize load_engine function
> leds: leds-lp55xx: Generalize load_engine_and_select_page function
> leds: leds-lp55xx: Generalize run_engine function
> leds: leds-lp55xx: Generalize update_program_memory function
> leds: leds-lp55xx: Generalize firmware_loaded function
> leds: leds-lp55xx: Generalize led_brightness function
> leds: leds-lp55xx: Generalize multicolor_brightness function
> leds: leds-lp55xx: Generalize set_led_current function
> leds: leds-lp55xx: Generalize turn_off_channels function
> leds: leds-lp55xx: Generalize stop_engine function
> leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode
> leds: leds-lp55xx: Generalize sysfs engine_leds
> leds: leds-lp55xx: Generalize sysfs master_fader
> leds: leds-lp55xx: Support ENGINE program up to 128 bytes
> leds: leds-lp55xx: Drop deprecated defines
> leds: leds-lp5569: Add support for Texas Instruments LP5569
>
> .../devicetree/bindings/leds/leds-lp55xx.yaml | 11 +
> drivers/leds/Kconfig | 16 +-
> drivers/leds/Makefile | 1 +
> drivers/leds/leds-lp5521.c | 405 +---------
> drivers/leds/leds-lp5523.c | 734 ++---------------
> drivers/leds/leds-lp5562.c | 261 +-----
> drivers/leds/leds-lp5569.c | 544 +++++++++++++
> drivers/leds/leds-lp55xx-common.c | 743 +++++++++++++++++-
> drivers/leds/leds-lp55xx-common.h | 163 ++--
> drivers/leds/leds-lp8501.c | 313 +-------
> 10 files changed, 1540 insertions(+), 1651 deletions(-)
> create mode 100644 drivers/leds/leds-lp5569.c
For whatever reason, this no longer applies.
Please rebase it on Linux -next or for-leds-next and resubmit.
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2024-06-26 15:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 21:03 [PATCH v7 00/20] leds: leds-lp55xx: overhaul driver Christian Marangi
2024-06-20 21:03 ` [PATCH v7 01/20] dt-bindings: leds-lp55xx: Limit pwr-sel property to ti,lp8501 Christian Marangi
2024-06-20 21:03 ` [PATCH v7 02/20] dt-bindings: leds-lp55xx: Add new ti,lp5569 compatible Christian Marangi
2024-06-20 21:03 ` [PATCH v7 03/20] leds: leds-lp55xx: Generalize stop_all_engine OP Christian Marangi
2024-06-20 21:03 ` [PATCH v7 04/20] leds: leds-lp55xx: Generalize probe/remove functions Christian Marangi
2024-06-20 21:03 ` [PATCH v7 05/20] leds: leds-lp55xx: Generalize load_engine function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 06/20] leds: leds-lp55xx: Generalize load_engine_and_select_page function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 07/20] leds: leds-lp55xx: Generalize run_engine function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 08/20] leds: leds-lp55xx: Generalize update_program_memory function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 09/20] leds: leds-lp55xx: Generalize firmware_loaded function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 10/20] leds: leds-lp55xx: Generalize led_brightness function Christian Marangi
2024-06-26 17:48 ` Markus Elfring
2024-06-20 21:03 ` [PATCH v7 11/20] leds: leds-lp55xx: Generalize multicolor_brightness function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 12/20] leds: leds-lp55xx: Generalize set_led_current function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 13/20] leds: leds-lp55xx: Generalize turn_off_channels function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 14/20] leds: leds-lp55xx: Generalize stop_engine function Christian Marangi
2024-06-20 21:03 ` [PATCH v7 15/20] leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode Christian Marangi
2024-06-20 21:03 ` [PATCH v7 16/20] leds: leds-lp55xx: Generalize sysfs engine_leds Christian Marangi
2024-06-20 21:03 ` [PATCH v7 17/20] leds: leds-lp55xx: Generalize sysfs master_fader Christian Marangi
2024-06-20 21:03 ` [PATCH v7 18/20] leds: leds-lp55xx: Support ENGINE program up to 128 bytes Christian Marangi
2024-06-20 21:03 ` [PATCH v7 19/20] leds: leds-lp55xx: Drop deprecated defines Christian Marangi
2024-06-20 21:03 ` [PATCH v7 20/20] leds: leds-lp5569: Add support for Texas Instruments LP5569 Christian Marangi
2024-06-26 15:42 ` Lee Jones [this message]
2024-06-26 15:57 ` [PATCH v7 00/20] leds: leds-lp55xx: overhaul driver Christian Marangi
2024-06-26 16:07 ` Lee Jones
2024-06-26 16:09 ` Lee Jones
2024-06-26 16:11 ` Christian Marangi
2024-06-26 16:02 ` Lee Jones
2024-06-26 16:08 ` Lee Jones
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=20240626154255.GC2504017@google.com \
--to=lee@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jacek.anaszewski@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh@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).