aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp55xx-common.c
diff options
context:
space:
mode:
authorMilo Kim <milo.kim@ti.com>2015-06-28 17:39:14 -0700
committerBryan Wu <cooloney@gmail.com>2015-06-29 10:10:57 -0700
commitb67893206fc0a0e8af87130e67f3d8ae553fc87c (patch)
tree118122716bde9f3da96cf400856317e4602bb8f6 /drivers/leds/leds-lp55xx-common.c
parentleds: fix max77693-led build errors (diff)
downloadlinux-dev-b67893206fc0a0e8af87130e67f3d8ae553fc87c.tar.xz
linux-dev-b67893206fc0a0e8af87130e67f3d8ae553fc87c.zip
leds:lp55xx: fix firmware loading error
LP55xx driver uses not firmware file but raw data to load program through the firmware interface.(Documents/leds/leds-lp55xx.txt) For example, here is how to run blinking green channel pattern. (The second engine is seleted and MUX is mapped to 'RGB' mode) echo 2 > /sys/bus/i2c/devices/xxxx/select_engine echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux echo 1 > /sys/class/firmware/lp5562/loading echo "4000600040FF6000" > /sys/class/firmware/lp5562/data echo 0 > /sys/class/firmware/lp5562/loading echo 1 > /sys/bus/i2c/devices/xxxx/run_engine However, '/sys/class/firmware/<device name>' is not created after the firmware loader user helper was introduced. This feature is used in the case below. As soon as the firmware download is requested by the driver, firmware class subsystem tries to find the binary file. If it gets failed, then it just falls back to user helper to load raw data manually. Here, you can see the device file under /sys/class/firmware/. To make it happen, LP55xx driver requires two configurations. 1. Enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK in Kconfig 2. Set option, 'FW_OPT_USERHELPER' on requesting the firmware data. It means the second option should be 'false' in request_firmware_nowait(). This option enables to load firmware data manually by calling fw_load_from_user_helper(). Cc: linux-leds@vger.kernel.org Signed-off-by: Milo Kim <milo.kim@ti.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.c')
-rw-r--r--drivers/leds/leds-lp55xx-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
index 77c26bc32eed..96d51e9879c9 100644
--- a/drivers/leds/leds-lp55xx-common.c
+++ b/drivers/leds/leds-lp55xx-common.c
@@ -223,7 +223,7 @@ static int lp55xx_request_firmware(struct lp55xx_chip *chip)
const char *name = chip->cl->name;
struct device *dev = &chip->cl->dev;
- return request_firmware_nowait(THIS_MODULE, true, name, dev,
+ return request_firmware_nowait(THIS_MODULE, false, name, dev,
GFP_KERNEL, chip, lp55xx_firmware_loaded);
}