[PATCH v2 0/1] mfd: lm8502: add core MFD driver for TI LM8502

Herman van Hazendonk posted 1 patch 5 days, 1 hour ago
MAINTAINERS                |   9 +
drivers/mfd/Kconfig        |  18 ++
drivers/mfd/Makefile       |   1 +
drivers/mfd/lm8502.c       | 511 +++++++++++++++++++++++++++++++++++++
include/linux/mfd/lm8502.h | 130 ++++++++++
5 files changed, 669 insertions(+)
create mode 100644 drivers/mfd/lm8502.c
create mode 100644 include/linux/mfd/lm8502.h
[PATCH v2 0/1] mfd: lm8502: add core MFD driver for TI LM8502
Posted by Herman van Hazendonk 5 days, 1 hour ago
Apologies for the noise — v1 (Message-ID:
<20260603035411.396383-1-github.com@herrie.org>) was sent as a bare
[PATCH] without a cover letter. This v2 resends with the correct
format. No code changes relative to v1.

---

The TI LM8502 is an I2C-attached combo device combining ten constant-
current LED outputs (D1..D10) with an internal H-bridge for driving a
vibrator motor. Pin D10 is shared between the tenth LED channel and
the haptic output.

This patch adds the MFD core driver:

  - i2c probe with optional vcc regulator (High Power Mode handshake
    for RPM-managed LDOs carrying "regulator-allow-set-load") and
    optional chip-enable GPIO
  - Software reset and post-reset configuration sequence
  - Chip readiness verification via an LP55xx-style write-CHIP_EN-
    then-readback loop (250 ms bound); children only probe once the
    chip is known to be ACKing the bus
  - Devres-ordered teardown: lm8502_power_off() registered via
    devm_add_action_or_reset() *before* devm_mfd_add_devices() so
    devres LIFO unwinds children first (their .remove callbacks issue
    final regmap writes against a still-powered chip), then powers
    off the rail
  - MAINTAINERS entry covering all four driver files

Two children are spawned:

  ti,lm8502-leds   - LED-class outputs D1..D10
  ti,lm8502-haptic - EV_FF / FF_RUMBLE input device

The corresponding child drivers land in subsequent patches.

The DT binding for this device was submitted separately:
  Subject: [PATCH] dt-bindings: mfd: add ti,lm8502 combo LED + haptic controller

Changes since v1:
  - Resend with cover letter; no code changes

Herman van Hazendonk (1):
  mfd: lm8502: add core MFD driver for TI LM8502

 MAINTAINERS                |   9 +
 drivers/mfd/Kconfig        |  18 ++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/lm8502.c       | 511 +++++++++++++++++++++++++++++++++++++
 include/linux/mfd/lm8502.h | 130 ++++++++++
 5 files changed, 669 insertions(+)
 create mode 100644 drivers/mfd/lm8502.c
 create mode 100644 include/linux/mfd/lm8502.h


base-commit: 944125b4c454b58d2fe6e35f1087a932b2050dff
--
2.43.0