From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: <linux-mtd@lists.infradead.org>, <linux-leds@vger.kernel.org>,
Brian Norris <computersforpeace@gmail.com>,
Jacek Anaszewski <j.anaszewski@samsung.com>
Subject: Re: [PATCH 2/2] leds: trigger: Introduce a MTD (NAND/NOR) trigger
Date: Tue, 12 Apr 2016 20:27:32 +0200 [thread overview]
Message-ID: <20160412202732.30d291c2@bbrezillon> (raw)
In-Reply-To: <1460478395-25925-3-git-send-email-ezequiel@vanguardiasur.com.ar>
Hi Ezequiel,
On Tue, 12 Apr 2016 13:26:35 -0300
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> This commit introduces a MTD trigger for flash (NAND/NOR) device
> activity. The implementation is copied from IDE disk.
>
> This deprecates the "nand-disk" LED trigger, but for backwards
> compatibility, we still keep the "nand-disk" trigger around.
>
> The motivation for deprecating the "nand-disk" LED trigger is that
> it only works for NAND drivers, whereas the "mtd" LED trigger
> is more generic (in fact, "nand-disk" currently only works for
> certain NAND drivers).
>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> ---
> drivers/leds/trigger/Kconfig | 8 +++++++
> drivers/leds/trigger/Makefile | 1 +
> drivers/leds/trigger/ledtrig-mtd.c | 49 ++++++++++++++++++++++++++++++++++++++
> drivers/mtd/mtdcore.c | 7 ++++++
> drivers/mtd/nand/nand_base.c | 29 +---------------------
> include/linux/leds.h | 6 +++++
I'd suggest splitting this patch in 2, one adding ledtrig-mtd code, and
another one make use of ledtrig_mtd_activity() and removing
nand-trigger code.
IMHO, we should also factorize ledtrig-ide and ledtrig-mtd code
(after all, you just copied the implementation from ledtrig-ide).
How about renaming the ledtrig-ide into ledtrig-storage and
ledtrig_ide_activity() into ledtrig_storage_activity()?
You can then add a trigger named "storage" in addition to the existing
"nand-disk" and "ide-disk" ones.
Anyway, this is just a suggestion, and I let leds maintainers decide
whether this is appropriate or not.
Best Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-04-12 18:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 16:26 [PATCH 0/2] LED trigger on MTD activity Ezequiel Garcia
2016-04-12 16:26 ` [PATCH 1/2] mtd: Uninline mtd_write_oob and move it to mtdcore.c Ezequiel Garcia
2016-04-12 18:15 ` Boris Brezillon
2016-04-12 18:35 ` Ezequiel Garcia
2016-04-12 16:26 ` [PATCH 2/2] leds: trigger: Introduce a MTD (NAND/NOR) trigger Ezequiel Garcia
2016-04-12 18:27 ` Boris Brezillon [this message]
2016-04-12 18:40 ` Ezequiel Garcia
2016-04-12 19:11 ` Boris Brezillon
2016-04-12 19:35 ` Ezequiel Garcia
2016-04-12 19:46 ` Boris Brezillon
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=20160412202732.30d291c2@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=j.anaszewski@samsung.com \
--cc=linux-leds@vger.kernel.org \
--cc=linux-mtd@lists.infradead.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