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>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2] sh: sh7785lcr: register the PCA9564 as I2C bus 0
Date: Sun, 4 Oct 2026 20:46:44 +0200 [thread overview]
Message-ID: <20261004184644.90750-1-kmehltretter@gmail.com> (raw)
Before commit 44454baa7ca7 ("i2c: Dynamically assign adapter id if it
wasn't explictly specified"), a negative ID was replaced by zero, and
I2C bus zero was instantiated. Since that commit, a negative ID is passed
verbatim, instantiating an I2C bus with a dynamic number. As SH boards
still use i2c_register_board_info(0, ...) to register I2C devices, they
rely on the I2C bus being bus zero.
The SH7785LCR is the only SH board whose I2C adapter has a negative ID.
Its PCA9564 becomes i2c-1, causing registration of the R2025S/D RTC to
fail, and hwclock finds no /dev/rtc0.
Set the platform device ID to 0, so that the adapter is registered as
bus zero again.
Fixes: 44454baa7ca7 ("i2c: Dynamically assign adapter id if it wasn't explictly specified")
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
v2:
- Rewrite the commit message based on Geert's suggested wording.
- Add the tags from Adrian and Geert.
- No code change.
v1: https://lore.kernel.org/r/20261003082833.21511-1-kmehltretter@gmail.com/
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-04 18:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 18:46 Karl Mehltretter [this message]
2026-10-04 20:34 ` John Paul Adrian Glaubitz
2026-10-13 17:25 ` 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=20261004184644.90750-1-kmehltretter@gmail.com \
--to=kmehltretter@gmail.com \
--cc=dalias@libc.org \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.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®