* [PATCH v2] rtc: pcf8563: add SMBus support
@ 2026-10-08 7:13 Michael Walle
2026-10-08 7:15 ` Michael Walle
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Walle @ 2026-10-08 7:13 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: linux-rtc, linux-kernel, Michael Walle
Since commit 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap") the driver
uses regmap to access the RTC. Regmap itself will figure out if there is
a suitable I2C or SMBus host controllers. Thus, don't restict the driver
to just I2C controllers and make it work on SMBus controllers supporting
i2c block accesses, too.
This was tested on a custom x86 board.
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
drivers/rtc/rtc-pcf8563.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 7eebdb058067..56e75664c7b4 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -479,7 +479,8 @@ static int pcf8563_probe(struct i2c_client *client)
dev_dbg(&client->dev, "%s\n", __func__);
- if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C) &&
+ !i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK))
return -ENODEV;
pcf8563 = devm_kzalloc(&client->dev, sizeof(struct pcf8563),
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] rtc: pcf8563: add SMBus support
2026-10-08 7:13 [PATCH v2] rtc: pcf8563: add SMBus support Michael Walle
@ 2026-10-08 7:15 ` Michael Walle
2026-10-08 7:19 ` sashiko-bot
2026-10-08 8:13 ` Alexandre Belloni
2 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2026-10-08 7:15 UTC (permalink / raw)
To: Michael Walle, Alexandre Belloni; +Cc: linux-rtc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
On Thu Oct 8, 2026 at 9:13 AM CEST, Michael Walle wrote:
> Since commit 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap") the driver
> uses regmap to access the RTC. Regmap itself will figure out if there is
> a suitable I2C or SMBus host controllers. Thus, don't restict the driver
> to just I2C controllers and make it work on SMBus controllers supporting
> i2c block accesses, too.
>
> This was tested on a custom x86 board.
>
> Signed-off-by: Michael Walle <mwalle@kernel.org>
> ---
Sorry forgot the changelog:
v2:
- instead of dropping the check altogether, check for either i2c or
smbus block support.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] rtc: pcf8563: add SMBus support
2026-10-08 7:13 [PATCH v2] rtc: pcf8563: add SMBus support Michael Walle
2026-10-08 7:15 ` Michael Walle
@ 2026-10-08 7:19 ` sashiko-bot
2026-10-08 8:13 ` Alexandre Belloni
2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-10-08 7:19 UTC (permalink / raw)
To: Michael Walle; +Cc: linux-rtc, Alexandre Belloni
> Since commit 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap") the driver
> uses regmap to access the RTC. Regmap itself will figure out if there is
> a suitable I2C or SMBus host controllers. Thus, don't restict the driver
> to just I2C controllers and make it work on SMBus controllers supporting
> i2c block accesses, too.
>
> This was tested on a custom x86 board.
>
> Signed-off-by: Michael Walle <mwalle@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008071408.3548442-1-mwalle@kernel.org?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] rtc: pcf8563: add SMBus support
2026-10-08 7:13 [PATCH v2] rtc: pcf8563: add SMBus support Michael Walle
2026-10-08 7:15 ` Michael Walle
2026-10-08 7:19 ` sashiko-bot
@ 2026-10-08 8:13 ` Alexandre Belloni
2 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2026-10-08 8:13 UTC (permalink / raw)
To: Michael Walle; +Cc: linux-rtc, linux-kernel
On Thu, 08 Oct 2026 09:13:05 +0200, Michael Walle wrote:
> Since commit 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap") the driver
> uses regmap to access the RTC. Regmap itself will figure out if there is
> a suitable I2C or SMBus host controllers. Thus, don't restict the driver
> to just I2C controllers and make it work on SMBus controllers supporting
> i2c block accesses, too.
>
> This was tested on a custom x86 board.
>
> [...]
Applied, thanks!
[1/1] rtc: pcf8563: add SMBus support
https://git.kernel.org/abelloni/c/237378fd6be4
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-08 8:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 7:13 [PATCH v2] rtc: pcf8563: add SMBus support Michael Walle
2026-10-08 7:15 ` Michael Walle
2026-10-08 7:19 ` sashiko-bot
2026-10-08 8:13 ` Alexandre Belloni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.