From: Karl Mehltretter <kmehltretter@gmail.com>
To: Yoshinori Sato <yoshinori.sato@nifty.com>, Rich Felker <dalias@libc.org>
Cc: Karl Mehltretter <kmehltretter@gmail.com>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sh: sh7785lcr: register the PCA9564 as I2C bus 0
Date: Sat, 3 Oct 2026 10:28:33 +0200 [thread overview]
Message-ID: <20261003082833.21511-1-kmehltretter@gmail.com> (raw)
The R2025S/D board information is registered on I2C bus 0. Commit
44454baa7ca7 ("i2c: Dynamically assign adapter id if it wasn't explictly
specified") changed the PCA9564 platform driver to pass negative platform
device IDs to the I2C core. The SH7785LCR device uses ID -1, so the core
assigns it a dynamic bus number. Reserving bus 0 for the board information
makes i2c-1 the first dynamic bus, and the RTC is never instantiated.
Set the platform device ID to 0 so the adapter is registered as i2c-0 and
the RTC board information matches it.
Fixes: 44454baa7ca7 ("i2c: Dynamically assign adapter id if it wasn't explictly specified")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
Tested with 29-bit and 32-bit kernels on a custom QEMU model of the
SH7785LCR. Both registered the controller as i2c-0 and the R2025S/D as
rtc0.
Testing on real hardware is welcome.
arch/sh/boards/board-sh7785lcr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index 25c4968f0d8b..b93423df582f 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -256,7 +256,7 @@ static struct i2c_pca9564_pf_platform_data i2c_platform_data = {
static struct platform_device i2c_device = {
.name = "i2c-pca-platform",
- .id = -1,
+ .id = 0,
.dev = {
.platform_data = &i2c_platform_data,
},
--
2.53.0
next reply other threads:[~2026-10-03 8:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 8:28 Karl Mehltretter [this message]
2026-10-03 8:53 ` John Paul Adrian Glaubitz
2026-10-03 9:07 ` John Paul Adrian Glaubitz
2026-10-03 9:38 ` John Paul Adrian Glaubitz
2026-10-03 9:51 ` Karl Mehltretter
2026-10-03 9:57 ` John Paul Adrian Glaubitz
2026-10-03 12:52 ` Geert Uytterhoeven
2026-10-03 18:17 ` John Paul Adrian Glaubitz
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=20261003082833.21511-1-kmehltretter@gmail.com \
--to=kmehltretter@gmail.com \
--cc=dalias@libc.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=yoshinori.sato@nifty.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®