summaryrefslogtreecommitdiff
path: root/drivers/led
AgeCommit message (Collapse)Author
2017-06-01dm: core: Update device_bind_driver_to_node() to use ofnodeSimon Glass
Adjust this function to us an ofnode instead of an offset, so it can be used with livetree. This involves updating all callers. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: Rename dev_addr..() functionsSimon Glass
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing functions to avoid confusion. In the end we will have: 1. dev_read_addr...() - works on devices, supports flat/live tree 2. devfdt_get_addr...() - current functions, flat tree only 3. of_get_address() etc. - new functions, live tree only All drivers will be written to use 1. That function will in turn call either 2 or 3 depending on whether the flat or live tree is in use. Note this involves changing some dead code - the imx_lpi2c.c file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-10dm: led: add BCM6358 led driverÁlvaro Fernández Rojas
This driver is a simplified version of linux/drivers/leds/leds-bcm6358.c Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10dm: led: add BCM6328 led driverÁlvaro Fernández Rojas
This driver is a simplified version of linux/drivers/leds/leds-bcm6328.c, simplified to remove HW leds and blink fallbacks. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-15dm: led: Add support for blinking LEDsSimon Glass
Allow LEDs to be blinked if the driver supports it. Enable this for sandbox so that the tests run. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-15dm: led: Support toggling LEDsSimon Glass
Add support for toggling an LED into the uclass interface. This can be efficiently implemented by the driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-15dm: led: Add support for getting the state of an LEDSimon Glass
It is useful to be able to read the LED as well as write it. Add this to the uclass and update the GPIO driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-15dm: led: Adjust the LED uclassSimon Glass
At present this is very simple, supporting only on and off. We want to also support toggling and blinking. As a first step, change the name of the main method and use an enum to indicate the state. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-15dm: led: Rename struct led_uclass_platSimon Glass
These structures are normally named with 'uc' instead of 'uclass'. Change this one for consistency. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-15dm: led: Add a missing blank line in the Kconfig fileSimon Glass
There should be a blank line between each option. Add one before LED_GPIO. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-02-08dm: core: Replace of_offset with accessorSimon Glass
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-21status_led: Kconfig migration - introductionUri Mashiach
Move all of the status LED feature to drivers/led/Kconfig. doc/README.LED updated to reflect the Kconfig implementation. Tested boards: CL-SOM-AM57x, CM-T335 Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
2015-09-03dm: led: Tidy up SPL options for the led and led-gpioSimon Glass
At present SPL does not have its own option. But these features can increase SPL code size. Adjust the Kconfig and Makefile so that separate a SPL option can be selected. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-08-18led: rename CONFIG_SPL_LED_SUPPORT to CONFIG_SPL_LEDMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2015-08-13drivers: hierarchize drivers Kconfig menuMasahiro Yamada
The menuconfig for drivers are getting more and more cluttered and unreadable because too many entries are displayed in a single flat menu. Use hierarchic menu for each category. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Update to apply again in a few places, drop USB hunk] Signed-off-by: Tom Rini <trini@konsulko.com>
2015-07-21dm: test: Add a test for the LED uclassSimon Glass
Add a test to confirm that we can adjust LEDs using the led_gpio driver. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21led: Return -ENODEV if the LED device cannot be foundSimon Glass
We normally use -ENODEV for a missing device, rather than -ENOENT. The latter is reserved for when we have a device but cannot find something within it. Also avoid looking at the root LED device since it is only a container. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: led: Add a driver for GPIO-controlled LEDsSimon Glass
Add a simple driver which allows use of LEDs attached to GPIOs. The linux device tree binding is used. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: Add support for LEDsSimon Glass
Add a simple uclass for LEDs, so that these can be controlled by the device tree and activated when needed. LEDs are referred to by their label. This implementation requires a driver for each type of LED (e.g GPIO, I2C). Signed-off-by: Simon Glass <sjg@chromium.org>