Searched hist:"9 ce7cb170f97f83a78dc948bf7d25690f15e1328" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/leds/ |
H A D | leds-lp5521.c | diff c0e5e9b542d134eb43ea4ebc83446e6f2f63089a Wed Aug 07 23:41:40 CDT 2013 Milo Kim <milo.kim@ti.com> leds: lp5521: restore legacy device attributes
git commit 9ce7cb170f97f83a78dc948bf7d25690f15e1328 may cause an application confict, engineN_mode and engineN_load. This interface should be maintained for compatibility.
Restored device attributes are 'engineN_mode' and 'engineN_load'. A 'selftest' attribute macro is replaced with LP55xx common macro.
Use a mutex in lp5521_update_program_memory() : This function is called when an user-application writes a 'engineN_load' file or pattern data is loaded from generic firmware interface. So, writing program memory should be protected. If an error occurs on accessing this area, just it returns as -EINVAL quickly. This error code is exact same as old driver function, lp5521_do_store_load() because it should be kept for an user-application compatibility. Even the driver is changed, we can use the application without re-compiling sources.
'led_pattern' attribute is not included : engineN_mode and _load were created for custom user-application. 'led_pattern' is an exception. I added this attribute not for custom application but for simple test. Now it is used only in LP5562 driver, not LP5521.
Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com> diff 9ce7cb170f97f83a78dc948bf7d25690f15e1328 Tue Feb 05 04:18:10 CST 2013 Milo(Woogyom) Kim <milo.kim@ti.com> leds-lp5521: use generic firmware interface
LP55xx common driver provides generic firmware interface for running a LED pattern. LP5521 and LP5523 have many device attributes for running patterns. This patch cleans up those complex code.
Removed device attributes: engine1_mode engine2_mode engine3_mode engine1_load engine2_load engine3_load led_pattern
All device attributes and functions are replaced with two callback functions, 'firmware_cb' and 'run_engine'.
New engine functions: lp5521_load/stop/run_engine(), lp5521_update_program_memory() and lp5521_wait_opmode_done()
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
|