[PATCH v5 0/2] Support for Texas Instruments TPS6131X flash LED driver

Matthias Fend posted 2 patches 7 months ago
.../devicetree/bindings/leds/ti,tps61310.yaml      | 120 +++
MAINTAINERS                                        |   7 +
drivers/leds/flash/Kconfig                         |  11 +
drivers/leds/flash/Makefile                        |   1 +
drivers/leds/flash/leds-tps6131x.c                 | 815 +++++++++++++++++++++
5 files changed, 954 insertions(+)
[PATCH v5 0/2] Support for Texas Instruments TPS6131X flash LED driver
Posted by Matthias Fend 7 months ago
The TPS61310/TPS61311 is a flash LED driver with I2C interface. Its power
stage is capable of supplying a maximum total current of roughly 1500mA.
The TPS6131x provides three constant-current sinks, capable of sinking up
to 2 x 400mA (LED1 and LED3) and 800mA (LED2) in flash mode. In torch mode
each sink (LED1, LED2, LED3) supports currents up to 175m

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
Changes in v5:
- Removed unicode characters
- Link to v4: https://lore.kernel.org/r/20250509-leds-tps6131x-v4-0-2c9563f5b67c@emfend.at

Changes in v4:
- Added/removed/adjusted comments
- Use defines for register defaults
- Updated source format
- Check for error in torch refresh timer
- Return error from tps6131x_parse_node()
- Link to v3: https://lore.kernel.org/r/20250423-leds-tps6131x-v3-0-ca67d346a4ea@emfend.at

Changes in v3:
- Add comment for locking
- Drop handling based on CONFIG_V4L2_FLASH_LED_CLASS
- Stop if getting reset GPIO fails
- Optimize locks
- Fix type of num_channels (u32 -> int)
- Convert a remaining return sequence to dev_err_probe
- Link to v2: https://lore.kernel.org/r/20250318-leds-tps6131x-v2-0-bc09c7a50b2e@emfend.at

Changes in v2:
- Bindings: Extend device description
- Bindings: Drop unused address/size cells
- Bindings: Use fallback compatible 
- Bindings: Corrected minimum current for 50mA steps
- Bindings: Drop node label
- Fix name of REGISTER4 INDC shift define
- Save device instead i2c_client in private data
- Add comment for mutex
- Use macro to convert from uA to mA
- Use defines to describe initial register values
- Add safety delay during reset sequence
- Use fixed value enum to set the mode
- Renamed some local variables
- Re-sorted local variables
- Replaced ifdefs for V4L2_FLASH_LED_CLASS
- Improved some error messages
- Link to v1: https://lore.kernel.org/r/20250228-leds-tps6131x-v1-0-d1071d90f9ea@emfend.at

---
Matthias Fend (2):
      dt-bindings: leds: add Texas Instruments TPS6131x flash LED driver
      leds: tps6131x: add support for Texas Instruments TPS6131X flash LED driver

 .../devicetree/bindings/leds/ti,tps61310.yaml      | 120 +++
 MAINTAINERS                                        |   7 +
 drivers/leds/flash/Kconfig                         |  11 +
 drivers/leds/flash/Makefile                        |   1 +
 drivers/leds/flash/leds-tps6131x.c                 | 815 +++++++++++++++++++++
 5 files changed, 954 insertions(+)
---
base-commit: 9c69f88849045499e8ad114e5e13dbb3c85f4443
change-id: 20250227-leds-tps6131x-a7437883e400

Best regards,
-- 
Matthias Fend <matthias.fend@emfend.at>
Re: [PATCH v5 0/2] Support for Texas Instruments TPS6131X flash LED driver
Posted by Lee Jones 6 months, 4 weeks ago
On Wed, 14 May 2025 12:10:06 +0200, Matthias Fend wrote:
> The TPS61310/TPS61311 is a flash LED driver with I2C interface. Its power
> stage is capable of supplying a maximum total current of roughly 1500mA.
> The TPS6131x provides three constant-current sinks, capable of sinking up
> to 2 x 400mA (LED1 and LED3) and 800mA (LED2) in flash mode. In torch mode
> each sink (LED1, LED2, LED3) supports currents up to 175m
> 
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: leds: add Texas Instruments TPS6131x flash LED driver
      commit: 7790a4d11969fdcc0acf1ad2c59f1f9289b3dbbe
[2/2] leds: tps6131x: add support for Texas Instruments TPS6131X flash LED driver
      commit: 5a2c42a172f92a84ee15efbd630211c4a2817494

--
Lee Jones [李琼斯]