aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/Kconfig
AgeCommit message (Collapse)Author
2024-03-07leds: expresswire: Don't depend on NEW_LEDSDuje Mihanović
The ExpressWire library does not depend on NEW_LEDS and selecting it from a subsystem other than LEDs may cause Kconfig warnings: WARNING: unmet direct dependencies detected for LEDS_EXPRESSWIRE Depends on [n]: NEW_LEDS [=n] && GPIOLIB [=y] Selected by [y]: - BACKLIGHT_KTD2801 [=y] && HAS_IOMEM [=y] && BACKLIGHT_CLASS_DEVICE [=y] Move it out of the "if NEW_LEDS" block to allow selection from other subsystems (in particular backlight) without raising this warning. Reported-by: Arnd Bergmann <arnd@arndb.de> Closes: https://lore.kernel.org/20240212111819.936815-1-arnd@kernel.org Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202402161410.IG9I4odj-lkp@intel.com/ Suggested-by: Daniel Thompson <daniel.thompson@linaro.org> Fixes: 25ae5f5f4168 ("leds: Introduce ExpressWire library") Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> Link: https://lore.kernel.org/r/20240216-expresswire-deps-v2-2-8be59c4a75f5@skole.hr Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07leds: Make flash and multicolor dependencies unconditionalArnd Bergmann
Along the same lines as making devm_led_classdev_register() declared extern unconditional, do the same thing for the two sub-classes that have similar stubs. The users of these interfaces go to great lengths to allow building with both the generic leds API and the extended version, but realistically there is not much use in this, so just simplify it to always rely on it and remove the confusing fallback logic. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240109090715.982332-2-arnd@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07leds: Introduce ExpressWire libraryDuje Mihanović
The ExpressWire protocol is shared between at least KTD2692 and KTD2801 with slight differences such as timings and the former not having a defined set of pulses for enabling the protocol (possibly because it does not support PWM unlike KTD2801). Despite these differences the ExpressWire handling code can be shared between the two, so in preparation for adding KTD2801 support introduce a library implementing this protocol. Suggested-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> Link: https://lore.kernel.org/r/20240125-ktd2801-v5-1-e22da232a825@skole.hr Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-21leds: sun50i-a100: Convert to be agnostic to property providerAndy Shevchenko
Convert the driver to be agnostic to the property provider. LEDS subsytem is not dependent on OF, so no need to make drivers be a such. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20231214192131.1309912-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13leds: aw200xx: Add support for aw20108 deviceGeorge Stark
Add support for the Awinic aw20108 device, which belongs to the same LED drivers family. The new device supports 108 LEDs using a matrix of 12x9 outputs." Signed-off-by: George Stark <gnstark@salutedevices.com> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Link: https://lore.kernel.org/r/20231125200519.1750-10-ddrokosov@salutedevices.com Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13leds: max5970: Add support for max5970Patrick Rudolph
The MAX5970 is hot swap controller and has 4 indication LED. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com> Link: https://lore.kernel.org/r/20231123132803.1107174-1-naresh.solanki@9elements.com Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13leds: aw2013: Select missing dependency REGMAP_I2CDang Huynh
The AW2013 driver uses devm_regmap_init_i2c, so REGMAP_I2C needs to be selected. Otherwise build process may fail with: ld: drivers/leds/leds-aw2013.o: in function `aw2013_probe': leds-aw2013.c:345: undefined reference to `__devm_regmap_init_i2c' Signed-off-by: Dang Huynh <danct12@riseup.net> Acked-by: Nikita Travkin <nikita@trvn.ru> Fixes: 59ea3c9faf32 ("leds: add aw2013 driver") Link: https://lore.kernel.org/r/20231103114203.1108922-1-danct12@riseup.net Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13leds: sun50i-a100: New driver for the A100 LED controllerSamuel Holland
Some Allwinner sunxi SoCs, starting with the A100, contain an LED controller designed to drive RGB LED pixels. Add a driver for it using the multicolor LED framework, and with LEDs defined in the device tree. Acked-by: Guo Ren <guoren@kernel.org> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20231029212738.7871-3-samuel@sholland.org Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01leds: turris-omnia: Support HW controlled mode via private triggerMarek Behún
Add support for enabling MCU controlled mode of the Turris Omnia LEDs via a LED private trigger called "omnia-mcu". Recall that private LED triggers will only be listed in the sysfs trigger file for LEDs that support them (currently there is no user of this mechanism). When in MCU controlled mode, the user can still set LED color, but the blinking is done by MCU, which does different things for different LEDs: - WAN LED is blinked according to the LED[0] pin of the WAN PHY - LAN LEDs are blinked according to the LED[0] output of the corresponding port of the LAN switch - PCIe LEDs are blinked according to the logical OR of the MiniPCIe port LED pins In the future I want to make the netdev trigger to transparently offload the blinking to the HW if user sets compatible settings for the netdev trigger (for LEDs associated with network devices). There was some work on this already, and hopefully we will be able to complete it sometime, but for now there are still multiple blockers for this, and even if there weren't, we still would not be able to configure HW controlled mode for the LEDs associated with MiniPCIe ports. In the meantime let's support HW controlled mode via the private LED trigger mechanism. If, in the future, we manage to complete the netdev trigger offloading, we can still keep this private trigger for backwards compatibility, if needed. We also set "omnia-mcu" to cdev->default_trigger, so that the MCU keeps control until the user first wants to take over it. If a different default trigger is specified in device-tree via the 'linux,default-trigger' property, LED class will overwrite cdev->default_trigger, and so the DT property will be respected. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20230918161104.20860-4-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2023-07-28leds: pca995x: Add support for PCA995X chipsIsai Gaspar
The PCA995x chips are I2C controlled LED drivers. Each chip has up to 16 outputs, each one with an individual 8-bit resolution PWM for brightness control. Signed-off-by: Isai Gaspar <isaiezequiel.gaspar@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> # Basically rewrite the driver Link: https://lore.kernel.org/r/20230713163516.21644-2-marex@denx.de Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-01leds: Add AW20xx driverMartin Kurbanov
This commit adds support for AWINIC AW20036/AW20054/AW20072 LED driver. This driver supports following AW200XX features: - Individual 64-level DIM currents Signed-off-by: Martin Kurbanov <mmkurbanov@sberdevices.ru> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230519130403.212479-3-mmkurbanov@sberdevices.ru Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25leds: Add HAS_IOPORT dependenciesNiklas Schnelle
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends not being declared. We thus need to add HAS_IOPORT as dependency for those drivers using them. Co-developed-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Acked-by: Pavel Machek <pavel@ucw.cz> Link: https://lore.kernel.org/r/20230522105049.1467313-18-schnelle@linux.ibm.com Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25leds: Make LEDS_TI_LMU_COMMON invisibleGeert Uytterhoeven
Currently, LEDS_LM3697 and LEDS_LM36274 depend on LEDS_TI_LMU_COMMON, which contains the common code to support TI LMU devices. This means the user is asked about the common code first, followed by the individual drivers, if their dependencies are met. Simplify this, and reduce the number of questions by making LEDS_TI_LMU_COMMON invisible, and letting it be selected when needed. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Pavel Machek <pavel@ucw.cz> Link: https://lore.kernel.org/r/91f6efaa48c36320e58b6a312025ae9b39ee206b.1683644796.git.geert+renesas@glider.be Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25leds: Add Intel Cherry Trail Whiskey Cove PMIC LED driverYauhen Kharuzhy
Add support for LEDs connected to the Intel Cherry Trail Whiskey Cove PMIC. Charger and general-purpose LEDs are supported. Hardware blinking is implemented, breathing is not. This driver was tested with Lenovo Yoga Book notebook. Changes by Hans de Goede (in response to review of v2): - Since the PMIC is connected to the battery any changes we make to the LED settings are permanent, even surviving reboot / poweroff. Save LED1 register settings on probe() and if auto-/hw-control was enabled on probe() restore the settings on remove() and shutdown(). - Delay switching LED1 to software control mode to first brightness write. - Use dynamically allocated drvdata instead of a global drvdata variable. - Ensure the LED is on when activating blinking. - Fix CHT_WC_LED_EFF_BREATHING val ((3 << 1) rather then BIT(3)). Link: https://lore.kernel.org/r/20190212205901.13037-2-jekhor@gmail.com Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Co-developed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230430195952.862527-2-hdegoede@redhat.com Signed-off-by: Lee Jones <lee@kernel.org>
2023-04-27leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driverAndreas Kemnade
The device provides 6 channels which can be individually turned off and on but groups of two channels share a common brightness register. Limitation: The GPIO to enable the device is not used yet. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230419111806.1100437-3-andreas@kemnade.info
2023-03-16leds: TI_LMU_COMMON: select REGMAP instead of depending on itRandy Dunlap
REGMAP is a hidden (not user visible) symbol. Users cannot set it directly thru "make *config", so drivers should select it instead of depending on it if they need it. Consistently using "select" or "depends on" can also help reduce Kconfig circular dependency issues. Therefore, change the use of "depends on REGMAP" to "select REGMAP". Fixes: 3fce8e1eb994 ("leds: TI LMU: Add common code for TI LMU devices") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230226053953.4681-5-rdunlap@infradead.org
2023-02-23Merge tag 'leds-next-6.3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: "Removed Drivers: - HTC ASIC3 LED New Functionality: - Provide generic led_get() which can be used by both DT and !DT platforms Fix-ups: - Convert a bunch of I2C subsystem users to the new probing API - Explicitly provide missing include files - Make use of led_init_default_state_get() and rid the custom variants - Use simplified fwnode_device_is_compatible() API - Provide some Device Tree additions / adaptions - Fix some trivial spelling issues Bug Fixes: - Prevent device refcount leak during led_put() and of_led_get() - Clear previous data from temporary led_pwm structure before processing next child - Fix Clang's warning about incompatible function types when using devm_add_action*()" * tag 'leds-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (41 commits) leds: Remove ide-disk trigger dt-bindings: leds: Add disk write/read and usb-host/usb-gadget Documentation: leds: Correct spelling dt-bindings: leds: Document Bluetooth and WLAN triggers leds: Remove asic3 driver leds: simatic-ipc-leds-gpio: Make sure we have the GPIO providing driver leds: tca6507: Convert to use fwnode_device_is_compatible() leds: syscon: Get rid of custom led_init_default_state_get() leds: pm8058: Get rid of custom led_init_default_state_get() leds: pca955x: Get rid of custom led_init_default_state_get() leds: mt6360: Get rid of custom led_init_default_state_get() leds: mt6323: Get rid of custom led_init_default_state_get() leds: bcm6358: Get rid of custom led_init_default_state_get() leds: bcm6328: Get rid of custom led_init_default_state_get() leds: an30259a: Get rid of custom led_init_default_state_get() leds: Move led_init_default_state_get() to the global header leds: Add missing includes and forward declarations in leds.h leds: is31fl319x: Wrap mutex_destroy() for devm_add_action_or_rest() leds: turris-omnia: Convert to i2c's .probe_new() leds: tlc591xx: Convert to i2c's .probe_new() ...
2023-01-30leds: Remove asic3 driverArnd Bergmann
Since ASIC3 MFD driver is removed, the LED support is also obsolete. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230105134622.254560-25-arnd@kernel.org
2023-01-16leds: remove s3c24xx driverArnd Bergmann
The s3c24xx platform is gone, so the led driver can be removed as well. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-08-02leds: is31fl319x: Make use of device propertiesAndy Shevchenko
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-07-17leds: clevo-mail: Mark as broken pending interface fixPavel Machek
Setting blink rate using brightness is unusual and should be fixed. Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-07-17leds: clevo-mail: fix Kconfig "its" grammarRandy Dunlap
Use the possessive "its" instead of the contraction "it's" where appropriate. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Lee Jones <lee.jones@linaro.org> Cc: linux-leds@vger.kernel.org Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-05-07leds: Move pwm-multicolor driver into rgb directorySven Schwermer
The drivers/leds/rgb subdirectory is relatively fresh, so we move this new PWM multi-color driver into it. Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-05-05leds: Add PWM multicolor driverSven Schwermer
By allowing to group multiple monochrome PWM LEDs into multicolor LEDs, all involved LEDs can be controlled in-sync. This enables using effects using triggers, etc. Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-05-04leds: Add driver for Qualcomm LPGBjorn Andersson
The Light Pulse Generator (LPG) is a PWM-block found in a wide range of PMICs from Qualcomm. These PMICs typically comes with 1-8 LPG instances, with their output being routed to various other components, such as current sinks or GPIOs. Each LPG instance can operate on fixed parameters or based on a shared lookup-table, altering the duty cycle over time. This provides the means for hardware assisted transitions of LED brightness. A typical use case for the fixed parameter mode is to drive a PWM backlight control signal, the driver therefor allows each LPG instance to be exposed to the kernel either through the LED framework or the PWM framework. A typical use case for the LED configuration is to drive RGB LEDs in smartphones etc, for which the driver supports multiple channels to be ganged up to a MULTICOLOR LED. In this configuration the pattern generators will be synchronized, to allow for multi-color patterns. The idea of modelling this as a LED driver ontop of a PWM driver was considered, but setting the properties related to patterns does not fit in the PWM API. Similarly the idea of just duplicating the lower bits in a PWM and LED driver separately was considered, but this would not allow the PWM channels and LEDs to be configured on a per-board basis. The driver implements the more complex LED interface, and provides a PWM interface on the side of that, in the same driver. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Douglas Anderson <dianders@chromium.org> Tested-by: Luca Weiss <luca@z3ntu.xyz> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Tested-by: Marijn Suijten <marijn.suijten@somainline.org> [On the Sony Xperia Nile Discovery, SDM630] Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-01-12Merge tag 'leds-5.17-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Nothing major is happening here" * tag 'leds-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: lp55xx: initialise output direction from dts ARM: dts: omap3-n900: Fix lp5523 for multi color leds: ktd2692: Drop calling dev_of_node() in ktd2692_parse_dt leds: lgm-sso: Get rid of duplicate of_node assignment leds: tca6507: Get rid of duplicate of_node assignment leds: leds-fsg: Drop FSG3 LED driver leds: lp50xx: remove unused variable dt-bindings: leds: Replace moonlight with indicator in mt6360 example leds: led-core: Update fwnode with device_set_node leds: tca6507: use swap() to make code cleaner leds: Add mt6360 driver dt-bindings: leds: Add bindings for MT6360 LED
2022-01-12leds: leds-fsg: Drop FSG3 LED driverLinus Walleij
The board file using this driver has been deleted and the FSG3 LEDs can be modeled using a system controller and some register bit LEDs in the device tree so this driver is no longer needed. Reported-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Krzysztof Hałasa <khalasa@piap.pl> Cc: Rod Whitby <rod@whitby.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-12-23leds: simatic-ipc-leds: add new driver for Siemens Industial PCsHenning Schild
This driver adds initial support for several devices from Siemens. It is based on a platform driver introduced in an earlier commit. One of the supported machines has GPIO connected LEDs, here we poke GPIO memory directly because pinctrl does not come up. Signed-off-by: Henning Schild <henning.schild@siemens.com> Acked-by: Pavel Machek <pavel@ucw.cz> Link: https://lore.kernel.org/r/20211213120502.20661-3-henning.schild@siemens.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-08-18leds: lp50xx: Fix chip name in KConfigJan Kundrát
The 9-channel one is called LP5009, not LP509. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: ktd2692: Move driver to flash subdirectoryLinus Walleij
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Cc: Ingi Kim <ingi2.kim@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: lm3601x: Move driver to flash subdirectoryLinus Walleij
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Cc: Dan Murphy <dmurphy@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: sgm3140: Move driver to flash subdirectoryLinus Walleij
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Cc: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: max77693: Move driver to flash subdirectoryLinus Walleij
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: as3645a: Move driver to flash subdirectoryLinus Walleij
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: aat1290: Move driver to flash subdirectoryLinus Walleij
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28leds: lt3593: Make use of device propertiesAndy Shevchenko
Device property API allows to gather device resources from different sources, such as ACPI. Convert the driver to unleash the power of device property API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28leds: lm3532: select regmap I2C APIAndy Shevchenko
Regmap APIs should be selected, otherwise link can fail ERROR: modpost: "__devm_regmap_init_i2c" [drivers/leds/leds-lm3532.ko] undefined! Fixes: bc1b8492c764 ("leds: lm3532: Introduce the lm3532 LED driver") Cc: Dan Murphy <dmurphy@ti.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-03-25leds: Kconfig: LEDS_CLASS is usually selected.Pavel Machek
People should really say Y to the LEDS_CLASS prompt. Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-03-25leds: lgm: Improve Kconfig helpRahul Tanwar
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-02-26Merge tag 'leds-5.12-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Besides the usual fixes and new drivers, we are changing CLASS_FLASH to return success to make it easier to work with V4L2 stuff disabled, and we are getting rid of enum that should have been plain integer long time ago. I'm slightly nervous about potential warnings, but it needed to be fixed at some point" * tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: lp50xx: Get rid of redundant explicit casting leds: lp50xx: Update headers block to reflect reality leds: lp50xx: Get rid of redundant check in lp50xx_enable_disable() leds: lp50xx: Reduce level of dereferences leds: lp50xx: Switch to new style i2c-driver probe function leds: lp50xx: Don't spam logs when probe is deferred leds: apu: extend support for PC Engines APU1 with newer firmware leds: flash: Fix multicolor no-ops registration by return 0 leds: flash: Add flash registration with undefined CONFIG_LEDS_CLASS_FLASH leds: lgm: Add LED controller driver for LGM SoC dt-bindings: leds: Add bindings for Intel LGM SoC leds: led-core: Get rid of enum led_brightness leds: gpio: Set max brightness to 1 leds: lm3533: Switch to using the new API kobj_to_dev() leds: ss4200: simplify the return expression of register_nasgpio_led() leds: Use DEVICE_ATTR_{RW, RO, WO} macros
2021-02-19leds: lgm: Add LED controller driver for LGM SoCAmireddy Mallikarjuna reddy
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>
2021-01-31leds: rt8515: Add Richtek RT8515 LED driverLinus Walleij
This adds a driver for the Richtek RT8515 dual channel torch/flash white LED driver. This LED driver is found in some mobile phones from Samsung such as the GT-S7710 and GT-I8190. A V4L interface is added. We do not have a proper datasheet for the RT8515 but it turns out that RT9387A has a public datasheet and is essentially the same chip. We designed the driver in accordance with this datasheet. The day someone needs to drive a RT9387A this driver can probably easily be augmented to handle that chip too. Sakari Ailus, Pavel Machek and Andy Shevchenko helped significantly in getting this driver right. Cc: Sakari Ailus <sakari.ailus@iki.fi> Cc: newbytee@protonmail.com Cc: Stephan Gerhold <stephan@gerhold.net> Cc: linux-media@vger.kernel.org Cc: phone-devel@vger.kernel.org Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: Add driver for Acer Iconia Tab A500Dmitry Osipenko
Acer Iconia Tab A500 is an Android tablet device which has two LEDs embedded into the Power Button. Orange LED indicates "battery charging" status and white LED indicates "wake-up/charge-done" status. The new LED driver provides control over both LEDs to userspace. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ip30: compile if COMPILE_TEST=yMarek Behún
This driver can be compiled on other platforms with small change if COMPILE_TEST=y. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Pavel Machek <pavel@ucw.cz> Cc: Dan Murphy <dmurphy@ti.com> Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: various: compile if COMPILE_TEST=yMarek Behún
These drivers can be compiled without modification when COMPILE_TEST=y: cobalt-qube, cobalt-raq, netxbig, ns2 and s3c24xx Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Pavel Machek <pavel@ucw.cz> Cc: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-08-17leds: lp50xx: Add the LP50XX family of the RGB LED driverDan Murphy
Introduce the LP5036/30/24/18/12/9 RGB LED driver. The difference in these parts are the number of LED outputs where the: LP5036 can control 36 LEDs LP5030 can control 30 LEDs LP5024 can control 24 LEDs LP5018 can control 18 LEDs LP5012 can control 12 LEDs LP5009 can control 9 LEDs The device has the ability to group LED outputs into control banks so that multiple LED banks can be controlled with the same mixing and brightness. Or the LED outputs can also be controlled independently. Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-08-17leds: LP55XX_COMMON needs to depend on LEDS_CLASSRandy Dunlap
With these kernel configs: CONFIG_LEDS_CLASS=m # CONFIG_LEDS_CLASS_MULTICOLOR is not set CONFIG_LEDS_LP55XX_COMMON=y CONFIG_LEDS_LP5521=m CONFIG_LEDS_LP5562=m leds-lp55xx-common.c has a build error because it is builtin and calls an interface that is built as a loadable module (due to LEDS_CLASS=m). By making LEDS_LP55XX_COMMON depend on LEDS_CLASS, this config combination cannot happen, thus preventing the build error. ld: drivers/leds/leds-lp55xx-common.o: in function `lp55xx_register_leds': leds-lp55xx-common.c:(.text+0xc5f): undefined reference to `devm_led_classdev_register_ext' Fixes: 33b3a561f417 ("leds: support new LP8501 device - another LP55xx common") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Dan Murphy <dmurphy@ti.com> Cc: Milo Kim <milo.kim@ti.com> Cc: linux-leds@vger.kernel.org Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-07-28Make LEDS_LP55XX_COMMON depend on I2C to fix build errors:Randy Dunlap
leds-lp55xx-common.c:(.text+0x9d): undefined reference to `i2c_smbus_read_byte_data' leds-lp55xx-common.c:(.text+0x8fc): undefined reference to `i2c_smbus_write_byte_data' These errors happened when I2C=m and LEDS_LP55XX_COMMON=y, so prevent that from being possible. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Dan Murphy <dmurphy@ti.com> Cc: linux-leds@vger.kernel.org Cc: Milo Kim <milo.kim@ti.com> Cc: Mathias Nyman <mathias.nyman@nokia.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-07-24leds: initial support for Turris Omnia LEDsMarek Behún
This adds basic support for LEDs on the front side of CZ.NIC's Turris Omnia router. There are 12 RGB LEDs. The controller supports HW triggering mode for the LEDs, but this driver does not support it yet, and sets all the LEDs defined in device-tree into SW mode upon probe. This driver uses the multicolor LED framework. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-07-22leds: lp55xx: Add multicolor framework support to lp55xxDan Murphy
Add multicolor framework support for the lp55xx family. Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>