summaryrefslogtreecommitdiff
path: root/drivers/leds/blink
AgeCommit message (Collapse)AuthorFilesLines
2023-07-28leds: bcm63138: Rename dependency symbol ARCH_BCM4908 to ARCH_BCMBCARafał Miłecki1-2/+2
Symbol ARCH_BCM4908 has been merged/removed without updating leds Kconfig. Fixes: dd5c672d7ca9 ("arm64: bcmbca: Merge ARCH_BCM4908 to ARCH_BCMBCA") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: William Zhang <william.zhang@broadcom.com> Link: https://lore.kernel.org/r/20230714063214.3791-1-zajec5@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2022-11-09leds: lgm-sso: switch to using devm_fwnode_gpiod_get()Dmitry Torokhov1-3/+2
devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2022-07-17leds: leds-bcm63138: get rid of LED_OFFRafał Miłecki1-2/+1
The whole "enum led_brightness" is marked as obsolete. Replace it with a (non-)zero check. Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-07-17leds: add help info about BCM63138 module nameRafał Miłecki1-0/+2
It's what we do for all other LEDs drivers. Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-07-17leds: bcm63138: add support for BCM63138 controllerRafał Miłecki3-0/+321
It's a new controller first introduced in BCM63138 SoC. Later it was also used in BCM4908, some BCM68xx and some BCM63xxx SoCs. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-01-12leds: lgm-sso: Get rid of duplicate of_node assignmentAndy Shevchenko1-1/+0
GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove assignment here. For the details one may look into the of_gpio_dev_init() implementation. Call graph: --> sso_gpio_gc_init() --> devm_gpiochip_add_data --> devm_gpiochip_add_data_with_key --> gpiochip_add_data_with_key() --> of_gpio_dev_init() Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-08-07leds: lgm-sso: Propagate error codes from callee to callerAndy Shevchenko1-4/+8
The one of the latest change to the driver reveals the problem that the error codes from callee aren't propagated to the caller of __sso_led_dt_parse(). Fix this accordingly. Fixes: 9999908ca1ab ("leds: lgm-sso: Put fwnode in any case during ->probe()") Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-08-04leds: lgm-sso: Convert to use list_for_each_entry*() APIAndy Shevchenko1-9/+4
Convert to use list_for_each_entry*() API insted of open coded variants. It saves few lines of code and makes iteasier to read and maintain. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-08-04leds: lgm-sso: Remove explicit managed GPIO resource cleanupAndy Shevchenko1-3/+0
The idea of managed resources is that they will be cleaned up automatically and in the proper order. Remove explicit GPIO cleanup. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-08-04leds: lgm-sso: Don't spam logs when probe is deferredAndy Shevchenko1-1/+1
When requesting GPIO line the probe can be deferred. In such case don't spam logs with an error message. This can be achieved by switching to dev_err_probe(). Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-08-04leds: lgm-sso: Put fwnode in any case during ->probe()Andy Shevchenko1-4/+7
fwnode_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. All the same in fwnode_for_each_child_node() case. Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-06-24leds: lgm: Fix up includesLinus Walleij1-2/+3
This driver is including the legacy GPIO header <linux/gpio.h> but the only thing it is using from that header is the wrong define for GPIOF_DIR_OUT. Fix it up by using GPIO_LINE_DIRECTION_OUT and including the correct consumer and driver headers. Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28leds: lgm-sso: Drop duplicate NULL check for GPIO operationsAndy Shevchenko1-1/+1
Since GPIO operations are NULL-aware, we don't need to duplicate this check. Remove it and fold the rest of the code. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28leds: lgm-sso: Remove unneeded of_match_ptr()Andy Shevchenko1-1/+1
LGM SSO is an OF dependent driver, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28leds: lgm-sso: Fix clock handlingAndy Shevchenko1-27/+17
The clock handling has a few issues: - when getting second clock fails, the first one left prepared and enabled - on ->remove() clocks are unprepared and disabled twice Fix all these by converting to use bulk clock operations since both clocks are mandatory. Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-04-25leds: LEDS_BLINK_LGM should depend on X86Geert Uytterhoeven1-4/+2
The Intel Lightning Mountain (LGM) Serial Shift Output controller (SSO) is only present on Intel Lightning Mountain SoCs. Hence add a dependency on X86, to prevent asking the user about this driver when configuring a kernel without Intel Lightning Mountain platform support. While at it, merge the other dependencies into a single statement. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-04-25leds: lgm: Fix spelling mistake "prepate" -> "prepare"Colin Ian King1-1/+1
There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-03-25leds: lgm: Improve Kconfig helpRahul Tanwar2-20/+18
Remove unnecessary Kconfig symbol LEDS_BLINK Improve Kconfig help text to make it more useful. Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-03-09leds: lgm: fix gpiolib dependencyArnd Bergmann1-0/+1
Without gpiolib, the driver fails to build: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip' struct gpio_chip chip; ^ include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip' struct gpio_chip; ^ drivers/leds/blink/leds-lgm-sso.c:263:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration] gpiod_set_value(led->gpiod, val); ^ drivers/leds/blink/leds-lgm-sso.c:263:3: note: did you mean 'gpio_set_value'? include/linux/gpio.h:168:20: note: 'gpio_set_value' declared here static inline void gpio_set_value(unsigned gpio, int value) ^ drivers/leds/blink/leds-lgm-sso.c:345:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration] gpiod_set_value(led->gpiod, 1); ^ Add the dependency in Kconfig. Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-02-19leds: lgm: Add LED controller driver for LGM SoCAmireddy Mallikarjuna reddy3-0/+910
Parallel to serial conversion, which is also called SSO controller, can drive external shift register for LED outputs, reset or general purpose outputs. This driver enables LED support for Serial Shift Output Controller (SSO). Signed-off-by: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>