Commit graph

183 commits

Author SHA1 Message Date
Duje Mihanović
1368d06dd2 leds: Introduce ExpressWire library
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>
2024-03-07 08:45:03 +00:00
Patrick Rudolph
736214b4b0 leds: max5970: Add support for max5970
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-13 11:28:41 +00:00
Samuel Holland
ec95a68dad leds: sun50i-a100: New driver for the A100 LED controller
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-12-13 11:28:30 +00:00
Isai Gaspar
ee4e80b296 leds: pca995x: Add support for PCA995X chips
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-07-28 09:26:28 +01:00
Lukas Bulwahn
f1fb98090b leds: Fix config reference for AW200xx driver
Commit 36a87f371b ("leds: Add AW20xx driver") adds config LEDS_AW200XX
in drivers/leds/Kconfig, but then in drivers/leds/Makefile accidently
refers to CONFIG_LEDS_W200XX; note the missing A!

This typo makes it impossible to add the driver to a kernel build.

Fix this wrong config reference.

Fixes: 36a87f371b ("leds: Add AW20xx driver")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20230609100233.4111-1-lukas.bulwahn@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-15 15:06:54 +01:00
Martin Kurbanov
36a87f371b leds: Add AW20xx driver
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-06-01 19:46:35 +01:00
Yauhen Kharuzhy
047da762b9 leds: Add Intel Cherry Trail Whiskey Cove PMIC LED driver
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-05-25 12:16:11 +01:00
Andreas Kemnade
8325642d27 leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
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-04-27 17:42:33 +01:00
Linus Torvalds
e4bc158895 - Remove 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*()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmP3Kb4ACgkQUa+KL4f8
 d2HUfA//W+DfluN4PzYbcF/dSItfZDIOjKTUOP5ufb6t/jQMvCzXUMbcnELWTVOi
 PZuXW8sFC81EFq7+gglGCZPRBMN+fthlgKHRdbs+rYCntpD7OnMv4GC3OHncTw22
 HXr0R3K/W5/197P89ZhX/I0B60aT+XZhbcIh55std8fSjXXhzb2211sRzg4xemzF
 eUVGygZ8qi7bGQQ9f3VlouSm8V3WJqK0JpyMDpQG6SuwAU8VkXFNexzBnbp2jmDj
 IHlltppS5izNiv2tFy4NCwRMdR33pjreVfYqaT+YlRSeB8SWIvVb5FeGr6NUxi/U
 aerjmjkRKtX3m+YL3+wrEVavO8bl+oXFvefuiCmTCMji8aD/D1d/6Sp7DW0ktV3f
 VTToB+C/Jwj9rKsuL3ImR7vYM3E2wysU5/NfGgIEoUJBkokrTxOsFlg1qBrEKInp
 RAR808jsOxlJeuDLAuj2Z3P2z4REgMhyUUOhvWF2sxNW6oRrwO+vApjjJAcTp/pu
 wbfAdSVoDX1T8Ij3OJVDrct2YYPAg9rwCJ1lYX7WD2ajnOfQMaQ5wDNYwefyW3u6
 Em3qDnDXwv4WTbeijR+wr/6KEKV70xHd59VJbO1z9yPrR2dQZZlMQ3VPY79Wi4LR
 04AMdzNxlOkWDTn9o9ybDGT1X6K0saja5qCUvymhuSRHZqzVvBM=
 =bbUo
 -----END PGP SIGNATURE-----

Merge tag 'leds-next-6.3' of 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-02-23 15:09:31 -08:00
Arnd Bergmann
0ca222c819 leds: Remove asic3 driver
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-30 08:03:44 +00:00
Arnd Bergmann
7d1ec119e3 leds: remove s3c24xx driver
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>
2023-01-16 09:26:06 +01:00
Sven Schwermer
818d03b3d4 leds: Move pwm-multicolor driver into rgb directory
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-07 23:09:31 +02:00
Sven Schwermer
9fa2762110 leds: Add PWM multicolor driver
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-05 10:04:52 +02:00
Bjorn Andersson
24e2d05d1b leds: Add driver for Qualcomm LPG
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-05-04 09:17:31 +02:00
Linus Torvalds
d9b5941bb5 LED updates for 5.17. Nothing major is happening here.
I had to rebase at last moment to fix wrong author of one
 commit. Sorry about that.
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYd8hdwAKCRAw5/Bqldv6
 8m3sAKC20ddEFW04Mk45Tw72qSyud6vhwQCaAnQy6dcd+zV6LOxosgLZdtXkvx0=
 =CU+X
 -----END PGP SIGNATURE-----

Merge tag 'leds-5.17-rc1' of 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-12 16:59:22 -08:00
Linus Walleij
b7f1ac9bb6 leds: leds-fsg: Drop FSG3 LED driver
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>
2022-01-12 19:43:15 +01:00
Henning Schild
8c78e0614e leds: simatic-ipc-leds: add new driver for Siemens Industial PCs
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-12-23 18:09:13 +01:00
Linus Walleij
51f3b2c3d5 leds: ktd2692: Move driver to flash subdirectory
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-12 10:30:06 +02:00
Linus Walleij
61fa67a4e5 leds: lm3601x: Move driver to flash subdirectory
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-12 10:30:06 +02:00
Linus Walleij
9a7c066f6a leds: sgm3140: Move driver to flash subdirectory
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-12 10:30:06 +02:00
Linus Walleij
eb5a4422e4 leds: max77693: Move driver to flash subdirectory
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-12 10:30:05 +02:00
Linus Walleij
f5d69f6290 leds: as3645a: Move driver to flash subdirectory
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-12 10:30:05 +02:00
Linus Walleij
293fee7f60 leds: aat1290: Move driver to flash subdirectory
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-12 10:30:04 +02:00
Rahul Tanwar
a7ed7150f3 leds: lgm: Improve Kconfig help
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-25 11:37:41 +01:00
Linus Torvalds
fecfd01539 Updates for 5.12-rc1. Besides 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAmA2ETMACgkQMOfwapXb+vI0MQCgrQMf02DV2hvyJm2Oj4Vx6WKd
 5VYAn0J/8OKSj4BHiW82s4H4tuP8e1TD
 =GYC4
 -----END PGP SIGNATURE-----

Merge tag 'leds-5.12-rc1' of 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-26 13:56:40 -08:00
Amireddy Mallikarjuna reddy
c3987cd2bc leds: lgm: Add LED controller driver for LGM SoC
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-02-19 11:40:18 +01:00
Linus Walleij
e1c6edcbea leds: rt8515: Add Richtek RT8515 LED driver
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>
2021-01-31 10:38:03 +01:00
Dmitry Osipenko
1ece06acd2 leds: Add driver for Acer Iconia Tab A500
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-26 21:56:42 +02:00
Dan Murphy
242b81170f leds: lp50xx: Add the LP50XX family of the RGB LED driver
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-17 22:33:18 +02:00
Marek Behún
089381b27a leds: initial support for Turris Omnia LEDs
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-24 12:58:55 +02:00
Dan Murphy
55d5d3b46b leds: multicolor: Introduce a multicolor class definition
Introduce a multicolor class that groups colored LEDs
within a LED node.

The multicolor class groups monochrome LEDs and allows controlling two
aspects of the final combined color: hue and lightness. The former is
controlled via the intensity file and the latter is controlled
via brightness file.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
[squashed leds: multicolor: Fix camel case in documentation in]
2020-07-22 14:41:29 +02:00
Nikita Travkin
59ea3c9faf leds: add aw2013 driver
This commit adds support for AWINIC AW2013 3-channel LED driver.
The chip supports 3 PWM channels and is controlled with I2C.

Signed-off-by: Nikita Travkin <nikitos.tr@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-05-25 12:56:39 +02:00
Luca Weiss
cef8ec8cbd leds: add sgm3140 driver
Add a driver for the SGMICRO SGM3140 Buck/Boost Charge Pump LED driver.

This device is controlled by two GPIO pins, one for enabling and the
second one for switching between torch and flash mode.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-04-27 11:44:51 +02:00
Lubomir Rintel
03f613f057 leds: ariel: Add driver for status LEDs on Dell Wyse 3020
This adds support for controlling the LEDs attached to the Embedded
Controller on a Dell Wyse 3020 "Ariel" board.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-04-27 11:35:11 +02:00
Pavel Machek
457386350e leds: sort Makefile entries
Sort Makefile entries to reduce risk of rejects.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-04-06 22:57:10 +02:00
Thomas Bogendoerfer
64d7e23115 leds: add SGI IP30 led support
This patch implemenets a driver to support the front panel LEDs of
SGI Octane (IP30) workstations.

Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-02-26 21:49:32 +01:00
Sven Van Asbroeck
b3b42b4a38 leds: tps6105x: add driver for MFD chip LED mode
This driver adds support for the LED operational mode of the
tps6105x MFD device.

Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-12-21 20:10:02 +01:00
Oleh Kravchenko
fc19967bcb leds: add LED driver for EL15203000 board
This patch adds a LED class driver for the LEDs found on
the Crane Merchandising System EL15203000 LEDs board
(aka RED LEDs board).

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-11-03 17:37:06 +01:00
Jacek Anaszewski
25529edef5 TI LMU LED support rework and introduction of two new drivers
with DT bindings:
 
 - leds-lm3697
 - leds-lm36274
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQUwxxKyE5l/npt8ARiEGxRG/Sl2wUCXQAatQAKCRBiEGxRG/Sl
 2/2KAQDHnHR0rIITh3hH49YutOCzGK4oaut8sXfy+8PTEdKBlQEApQP1O1RJTTws
 /KDS8qpNdwOQOW/KYiYDX5R8GcOeZwg=
 =we/t
 -----END PGP SIGNATURE-----

Merge tag 'ti-lmu-led-drivers' into for-next

Merge immutable branch between LEDs, MFD and REGULATOR due to
TI LMU LED support rework and introduction of two new drivers
with DT bindings.

* tag 'ti-lmu-led-drivers':
  leds: lm36274: Introduce the TI LM36274 LED driver
  dt-bindings: leds: Add LED bindings for the LM36274
  regulator: lm363x: Add support for LM36274
  mfd: ti-lmu: Add LM36274 support to the ti-lmu
  dt-bindings: mfd: Add lm36274 bindings to ti-lmu
  leds: lm3697: Introduce the lm3697 driver
  mfd: ti-lmu: Remove support for LM3697
  dt-bindings: ti-lmu: Modify dt bindings for the LM3697
  leds: TI LMU: Add common code for TI LMU devices
  dt-bindings: mfd: LMU: Add ti,brightness-resolution
  dt-bindings: mfd: LMU: Add the ramp up/down property
2019-06-11 23:46:37 +02:00
Dan Murphy
11e1bbc116 leds: lm36274: Introduce the TI LM36274 LED driver
Introduce the LM36274 LED driver.  This driver uses the ti-lmu
MFD driver to probe this LED driver.  The driver configures only the
LED registers and enables the outputs according to the config file.

The driver utilizes the TI LMU (Lighting Management Unit) LED common
framework to set the brightness bits.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-06-07 20:40:07 +02:00
Dan Murphy
5c1d824cda leds: lm3697: Introduce the lm3697 driver
Introduce the lm3697 LED driver for backlighting and display.

Datasheet location:
http://www.ti.com/lit/ds/symlink/lm3697.pdf

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-05-24 22:40:47 +02:00
Dan Murphy
3fce8e1eb9 leds: TI LMU: Add common code for TI LMU devices
Create a TI LMU common framework for TI LMU devices that share
common features.

Currently the runtime ramp and brightness setting have
been identified as common features with common register settings.

This work is derived from Milo Kims TI LMU MFD code.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-05-24 22:40:45 +02:00
Christian Mauderer
e9a804d7a4 leds: spi-byte: add single byte SPI LED driver
This driver adds support for simple SPI based LED controller which use
only one byte for setting the brightness.

Signed-off-by: Christian Mauderer <oss@c-mauderer.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-05-24 22:19:43 +02:00
Lee Jones
60a7a9a249 Immutable branch between MFD, ARM and Net due for the 5.2 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAlyjBD8ACgkQUa+KL4f8
 d2EpUw/+KZuPkcazjIvRTqWkzk3UcoEfZF79vP2qJbHSXMTcBJTdCM1Ahm7thwii
 2mhtXlBFk8PPtwlVhhggfkY5a3+InozsiAL7qn7GyYyaxk7KHHInG0YQTStHW8Zl
 IOmuo+WFmpAEXJ1vPSJN0xCwiK8BtEpbSenBN6v7OXA+PgRTKIuvTN4ZB3pP9c2Q
 bTT3uB9uCibSP+H+NvMJR1TRtnQUcBevle8qUqK9Y/HTiq2T+KKDMBqs+J4DyGuZ
 pJ2bNziJDGY9AXXO3ndPW7WYoXmRjZMOFZXYegP8uKOD1dRm/OebBZI6raLSreq2
 OcFDLFsdeU5GTc/OcoIITz8GpTbvGQoh0j5F7a1BKflj7GRcvvu8key3onh3V85m
 G6vTdrZhN9Bw2G80KTkCOPGcztCWKxIlU+Xn9er7Q1u1qacx/IYUBf1PjjvP+ZCO
 FY/jJfVf6PiTVkiStdHzras3PYjj+RHUWM83NKw9F9T8ZdLJOd3myd5Zcfa2dJf2
 I/BqsH3JYWLIHOjdcpMLe+FwG2gMKiM0WDpqPYUzjokM6tRfShO/n9SSj/mNcv7J
 64szoH53c841nUAWTE2v/E0n+UB2LGCFkyZlA1NgEMwV3a2wLuNJYYDe4Fj0Y/Fp
 ydiYOa3H3PtFFIRmp+kZu5YWpTNazmf3Obteu/F6l644Yik5d+Q=
 =55X1
 -----END PGP SIGNATURE-----

Merge branches 'ib-mfd-arm-leds-5.2', 'ib-mfd-gpio-input-leds-power-5.2', 'ib-mfd-pinctrl-5.2-2' and 'ib-mfd-regulator-5.2', tag 'ib-mfd-arm-net-5.2' into ibs-for-mfd-merged

Immutable branch between MFD, ARM and Net due for the 5.2 merge window
2019-05-14 08:09:23 +01:00
Bartosz Golaszewski
5be102eb16 leds: max77650: Add LEDs support
This adds basic support for LEDs for the max77650 PMIC. The device has
three current sinks for driving LEDs.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-05-08 12:07:02 +01:00
Dan Murphy
bc1b8492c7 leds: lm3532: Introduce the lm3532 LED driver
Introduce the Texas Instruments LM3532 White LED driver.
The driver supports ALS configurability or manual brightness
control.

The driver also supports associating LED strings with specific
control banks in a group or as individually controlled strings.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-04-07 20:45:49 +02:00
Simon Shields
2d00f35c55 leds: add Panasonic AN30259A support
AN30259A is a 3-channel LED driver which uses I2C. It supports timed
operation via an internal PWM clock, and variable brightness. This
driver offers support for basic hardware-based blinking and brightness
control.

The datasheet is freely available:
https://www.alliedelec.com/m/d/a9d2b3ee87c2d1a535a41dd747b1c247.pdf

Signed-off-by: Simon Shields <simon@lineageos.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-09-10 21:31:11 +02:00
Dan Murphy
57a53297cc leds: lm3601x: Introduce the lm3601x LED driver
Introduce the family of LED devices that can
drive a torch, strobe or IR LED.

The LED driver can be configured with a strobe
timer to execute a strobe flash.  The IR LED
brightness is controlled via the torch brightness
register.

The data sheet for each the LM36010 and LM36011
LED drivers can be found here:
http://www.ti.com/product/LM36010
http://www.ti.com/product/LM36011

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-05-23 21:44:47 +02:00
Baolin Wang
e081c49e30 leds: Add Spreadtrum SC27xx breathing light controller driver
This patch adds Spreadtrum SC27xx PMIC series breathing light controller
driver, which can support 3 LEDs. Each LED can work at normal PWM mode
and breathing mode.

Signed-off-by: Xiaotong Lu <xiaotong.lu@spreadtrum.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-05-14 22:18:34 +02:00
Oleh Kravchenko
9e50d5fb0d leds: add LED driver for CR0014114 board
This patch adds a LED class driver for the RGB LEDs found on
the Crane Merchandising System CR0014114 LEDs board.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-04-16 20:16:24 +02:00