From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>, Abel Vesa <abelvesa@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Subject: [PATCH v2 0/3] spmi: Drop struct spmi_device_id
Date: Thu, 26 Nov 2026 15:48:10 +0100 [thread overview]
Message-ID: <cover.1795703292.git.u.kleine-koenig@baylibre.com> (raw)
Hello,
my v1 patch
(https://lore.kernel.org/all/20261125112158.938835-2-u.kleine-koenig@baylibre.com/)
is the same as patch #2 here, but without the first patch of this series
this results in a build failure. I kept Pawel's R-b tag I got in v1.
I'm not 100% sure, I grokked the spmi situation completely. As pointed
out in the commit description of patch #1 both driver name and device
name are proper \0-terminated strings with no theoretical length limit.
So only comparing SPMI_NAME_SIZE chars is at least strange. I think
there is no device/driver combo that needs that string comparison to
match.
All spmi devices seem to be instantiated via drivers/spmi/spmi.c from
dtb with the exception of drivers/regulator/mt6363-regulator.c.
spmi_device_add() enforces a device name in the form format("%d-%02x",
sdev->ctrl->nr, sdev->usid) and I didn't find a driver with that name.
mt6363-regulator.c does
sdev = spmi_device_alloc(sparent->ctrl);
dev_set_name(&sdev->dev, "%d-%02x-regulator", sdev->ctrl->nr, sdev->usid);
device_add(&sdev->dev);
but there doesn't seem to be a matching driver for that either.
I discovered the opportunity for the 3rd patch while researching the
above details. I'm not sure about that either as
drivers/regulator/mt6363-regulator.c uses spmi_device_remove() so maybe
it should use spmi_device_add(), too? Also I didn't find the
device_put() that is needed to undo spmi_device_alloc() when the
mt6363-regulator device gets unbound.
Best regards
Uwe
Uwe Kleine-König (3):
spmi: Don't limit device name matchin driver name on SPMI_NAME_SIZE
chars
spmi: Drop struct spmi_device_id
spmi: Don't export locally used function spmi_device_add()
drivers/spmi/spmi.c | 6 ++----
include/linux/device-id/spmi.h | 17 -----------------
include/linux/mod_devicetable.h | 1 -
include/linux/spmi.h | 2 --
4 files changed, 2 insertions(+), 24 deletions(-)
delete mode 100644 include/linux/device-id/spmi.h
base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
--
2.47.3
next reply other threads:[~2026-11-26 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 14:48 Uwe Kleine-König [this message]
2026-11-26 14:48 ` [PATCH v2 1/3] spmi: Don't limit device name matchin driver name on SPMI_NAME_SIZE chars Uwe Kleine-König
2026-11-26 14:48 ` [PATCH v2 2/3] spmi: Drop struct spmi_device_id Uwe Kleine-König
2026-11-26 14:48 ` [PATCH v2 3/3] spmi: Don't export locally used function spmi_device_add() Uwe Kleine-König
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=cover.1795703292.git.u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=abelvesa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pzalewski@thegoodpenguin.co.uk \
--cc=sboyd@kernel.org \
/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®