[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1568299189-11074-1-git-send-email-akinobu.mita@gmail.com>
Date: Thu, 12 Sep 2019 23:39:48 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Akinobu Mita <akinobu.mita@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>
Subject: [PATCH] leds: fix /sys/class/leds/<led>/trigger
Reading /sys/class/leds/<led>/trigger returns all available LED triggers.
However, the size of this file is limited to PAGE_SIZE because of the
limitation for sysfs attribute.
Enabling LED CPU trigger on systems with thousands of CPUs easily hits
PAGE_SIZE limit, and makes it impossible to see all available LED triggers
and which trigger is currently activated.
This patch converts /sys/class/leds/<led>/trigger to bin attribute and
removes the PAGE_SIZE limitation.
The first version of this seris provided the new api that follows the
"one value per file" rule of sysfs. This second version dropped it because
there have been a number of problems and it turns out that the new api
should be submitted separately.
* v2
- Update commit message
- Drop patches for new api
Akinobu Mita (1):
leds: remove PAGE_SIZE limit of /sys/class/leds/<led>/trigger
drivers/leds/led-class.c | 8 ++--
drivers/leds/led-triggers.c | 90 ++++++++++++++++++++++++++++++++++-----------
drivers/leds/leds.h | 6 +++
include/linux/leds.h | 5 ---
4 files changed, 79 insertions(+), 30 deletions(-)
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc: Pavel Machek <pavel@....cz>
Cc: Dan Murphy <dmurphy@...com>
--
2.7.4
Powered by blists - more mailing lists