From: Rustam Adilov <adilov@disroot.org>
To: Michael Zavertkin <misha.zavertkin@mail.ru>
Cc: linux-i2c@vger.kernel.org,
Chris Packham <chris.packham@alliedtelesis.co.nz>,
Andi Shyti <andi.shyti@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] i2c: rtl9300: add realtek,rtl9607c-i2c compatible
Date: Sun, 15 Nov 2026 09:32:35 +0000 [thread overview]
Message-ID: <29914fda0f8aac515458d9f4d7862270@disroot.org> (raw)
In-Reply-To: <3012533a43fd32d1c526e5a90385457f8b46f111.1794728344.git.misha.zavertkin@mail.ru>
On 2026-11-15 08:08, Michael Zavertkin wrote:
> RTL9607C was already supported by realtek,rtl9607-i2c, which is
> confusing, because there are another SoCs such as RTL9607F, RTL9607
> (without letter) and a few more. So more correct compatible was added.
Yeah, that makes sense. Yesterday i spent some time documenting the rtl960x
tree [1] and rtl9607 falls into apollomp rather than rtl9607c family.
We should ideally check if RTL9607 and RTL9607C have similar enough i2c
controllers to use same compatible but maybe for another time. Cause if
it turns out they are different then the rtl9607-i2c should not be
deprecated? I don't know what the rules are for this particular case
where due to lack of knowledge at a time we have been using a wrong
compatible all this time.
[1] https://github.com/Anime4000/RTL960x#rtl960x-families-and-their-subtypes
> New compatible doesn't use IO_MODE_EN register, leaving it to pinctrl
> driver. Old one left for backward compatibility.
>
> Signed-off-by: Michael Zavertkin <misha.zavertkin@mail.ru>
> ---
> drivers/i2c/busses/i2c-rtl9300.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
> index a9dd85a286d4..ae20fbdc307a 100644
> --- a/drivers/i2c/busses/i2c-rtl9300.c
> +++ b/drivers/i2c/busses/i2c-rtl9300.c
> @@ -200,10 +200,12 @@ static int rtl9607_i2c_config_chan(struct rtl9300_i2c *i2c, struct rtl9300_i2c_c
> if (ret)
> return ret;
>
> - drv_data = device_get_match_data(i2c->dev);
> - ret = drv_data->select_scl(i2c, i2c->scl_num);
> - if (ret)
> - return ret;
> + if (device_is_compatible(i2c->dev, "realtek,rtl9607-i2c")) {
> + drv_data = device_get_match_data(i2c->dev);
> + ret = drv_data->select_scl(i2c, i2c->scl_num);
> + if (ret)
> + return ret;
> + }
>
> i2c->sda_num = chan->sda_num;
> return 0;
> @@ -494,6 +496,10 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
> scl_num = 0;
> i2c->scl_num = (u8)scl_num;
>
> + if (device_is_compatible(i2c->dev, "realtek,rtl9607-i2c"))
> + dev_warn(dev, "Compatible 'realtek,rtl9607-i2c' is deprecated. "
> + "Use 'realtek,rtl9607c-i2c' instead\n");
> +
> platform_set_drvdata(pdev, i2c);
>
> drv_data = device_get_match_data(i2c->dev);
> @@ -652,6 +658,7 @@ static const struct of_device_id i2c_rtl9300_dt_ids[] = {
> { .compatible = "realtek,rtl9312-i2c", .data = (void *) &rtl9310_i2c_drv_data },
> { .compatible = "realtek,rtl9313-i2c", .data = (void *) &rtl9310_i2c_drv_data },
> { .compatible = "realtek,rtl9607-i2c", .data = (void *) &rtl9607_i2c_drv_data },
> + { .compatible = "realtek,rtl9607c-i2c", .data = (void *) &rtl9607_i2c_drv_data },
> {}
> };
> MODULE_DEVICE_TABLE(of, i2c_rtl9300_dt_ids);
next prev parent reply other threads:[~2026-11-15 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 8:08 [PATCH v3 0/2] i2c: rtl9300: remove IO_MODE configuration Michael Zavertkin
2026-11-15 8:08 ` [PATCH v3 1/2] i2c: rtl9300: add realtek,rtl9607c-i2c compatible Michael Zavertkin
2026-11-15 9:32 ` Rustam Adilov [this message]
2026-11-15 8:08 ` [PATCH v3 2/2] dt-bindings: i2c: rtl9300: add 'rtl9607c-i2c' Michael Zavertkin
2026-11-15 8:20 ` sashiko-bot
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=29914fda0f8aac515458d9f4d7862270@disroot.org \
--to=adilov@disroot.org \
--cc=andi.shyti@kernel.org \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=misha.zavertkin@mail.ru \
--cc=robh@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 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.