From: Peng Fan <peng.fan@linux.dev>
To: Andi Shyti <andi.shyti@kernel.org>, Lee Jones <lee@kernel.org>,
Support Opensource <support.opensource@diasemi.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Andreas Kemnade <andreas@kemnade.info>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Matti Vaittinen <mazziesaccount@gmail.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, mfd@lists.linux.dev,
patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 0/2] Add subsys_i2c_driver() helpers and convert MFD I2C drivers
Date: Tue, 01 Dec 2026 17:45:50 +0800 [thread overview]
Message-ID: <20261201-add-i2c-subsys-mfd-v1-0-e7b1db408abf@nxp.com> (raw)
Many I2C drivers open-code their own init/exit functions because they need
to be registered at the subsys_initcall() level when built in, which
prevents them from using module_i2c_driver(). The recently added
subsys_driver() and subsys_platform_driver() helpers address this for
platform drivers; this series adds the I2C equivalents and converts the
MFD users.
Patch 1 adds two macros in <linux/i2c.h>:
- subsys_i2c_driver() for drivers that need an unregister path. It
replaces the subsys_initcall()/module_exit() pair.
- subsys_i2c_driver_probe() for drivers without an exit callback. It
replaces a bare subsys_initcall().
Patch 2 converts 34 MFD driver files: some use subsys_i2c_driver() and
some use subsys_i2c_driver_probe(). The error messages around i2c_add_driver()
are dropped because registration failures are already reported by the
driver core, and initcall_debug can be used to see initcall return values.
No functional change is intended.
Because patch 2 depends on patch 1, I can resend the conversion after the
helper is merged, or the MFD maintainer can take both patches through an
immutable branch.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (2):
i2c: add subsys_i2c_driver() macro
mfd: Convert to subsys_i2c_driver()
drivers/mfd/88pm800.c | 13 +------------
drivers/mfd/88pm805.c | 13 +------------
drivers/mfd/88pm860x-core.c | 18 +-----------------
drivers/mfd/aat2870-core.c | 7 +------
drivers/mfd/act8945a.c | 13 +------------
drivers/mfd/as3711.c | 7 +------
drivers/mfd/da903x.c | 13 +------------
drivers/mfd/da9052-i2c.c | 21 +--------------------
drivers/mfd/da9055-i2c.c | 21 +--------------------
drivers/mfd/lm3533-core.c | 13 +------------
drivers/mfd/lochnagar-i2c.c | 13 +------------
drivers/mfd/lp8788.c | 13 +------------
drivers/mfd/max77843.c | 7 +------
drivers/mfd/max8907.c | 19 +------------------
drivers/mfd/max8925-i2c.c | 13 +------------
drivers/mfd/max8997.c | 7 +------
drivers/mfd/max8998.c | 7 +------
drivers/mfd/mc13xxx-i2c.c | 13 +------------
drivers/mfd/palmas.c | 13 +------------
drivers/mfd/rc5t583.c | 7 +------
drivers/mfd/rohm-bd718x7.c | 13 +------------
drivers/mfd/rohm-bd96801.c | 14 +-------------
drivers/mfd/rsmu_i2c.c | 13 +------------
drivers/mfd/tc3589x.c | 13 +------------
drivers/mfd/tps6105x.c | 13 +------------
drivers/mfd/tps65010.c | 15 +--------------
drivers/mfd/tps6507x.c | 13 +------------
drivers/mfd/tps65090.c | 7 +------
drivers/mfd/tps65217.c | 13 +------------
drivers/mfd/tps6586x.c | 13 +------------
drivers/mfd/tps65910.c | 7 +------
drivers/mfd/wm831x-i2c.c | 13 +------------
drivers/mfd/wm8350-i2c.c | 7 +------
drivers/mfd/wm8400-core.c | 15 +--------------
include/linux/i2c.h | 23 +++++++++++++++++++++++
35 files changed, 57 insertions(+), 386 deletions(-)
---
base-commit: e5aad2bdbbee783611d32599f89cea3f12f9593d
change-id: 20261201-add-i2c-subsys-mfd-120cdb5f68a1
Best regards,
--
Peng Fan <peng.fan@nxp.com>
next reply other threads:[~2026-12-01 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 9:45 Peng Fan [this message]
2026-12-01 9:45 ` [PATCH 1/2] i2c: add subsys_i2c_driver() macro Peng Fan
2026-12-01 9:45 ` [PATCH 2/2] mfd: Convert to subsys_i2c_driver() Peng Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201-add-i2c-subsys-mfd-v1-0-e7b1db408abf@nxp.com \
--to=peng.fan@linux.dev \
--cc=aaro.koskinen@iki.fi \
--cc=andi.shyti@kernel.org \
--cc=andreas@kemnade.info \
--cc=ckeepax@opensource.cirrus.com \
--cc=cw00.choi@samsung.com \
--cc=khilman@baylibre.com \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=mfd@lists.linux.dev \
--cc=patches@opensource.cirrus.com \
--cc=peng.fan@nxp.com \
--cc=rf@opensource.cirrus.com \
--cc=rogerq@kernel.org \
--cc=support.opensource@diasemi.com \
--cc=tony@atomide.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®