From: Ryan Chen <ryan_chen@aspeedtech.com>
To: Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>,
Philipp Zabel <p.zabel@pengutronix.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Cc: BMC-SW <BMC-SW@aspeedtech.com>
Subject: RE: [PATCH v3 2/3] dt-bindings: i2c-ast2600: Add bindings for AST2600 i2C driver
Date: Tue, 9 Aug 2022 00:59:01 +0000 [thread overview]
Message-ID: <SEZPR06MB5269B2ACF6D765E214FD6DF2F2629@SEZPR06MB5269.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <cd11b517-ae6c-4a67-9f43-74825812b00b@www.fastmail.com>
Hello,
> -----Original Message-----
> From: Andrew Jeffery <andrew@aj.id.au>
> Sent: Tuesday, August 9, 2022 8:35 AM
> To: Ryan Chen <ryan_chen@aspeedtech.com>; Joel Stanley <joel@jms.id.au>;
> Philipp Zabel <p.zabel@pengutronix.de>; linux-arm-kernel@lists.infradead.org;
> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> openbmc@lists.ozlabs.org
> Cc: BMC-SW <BMC-SW@aspeedtech.com>
> Subject: Re: [PATCH v3 2/3] dt-bindings: i2c-ast2600: Add bindings for AST2600
> i2C driver
>
>
>
> On Tue, 2 Aug 2022, at 18:34, Ryan Chen wrote:
> > Hello,
> >
> >> -----Original Message-----
> >> From: Andrew Jeffery <andrew@aj.id.au>
> >> Sent: Friday, July 29, 2022 11:13 AM
> >> To: Ryan Chen <ryan_chen@aspeedtech.com>; Joel Stanley
> >> <joel@jms.id.au>; Philipp Zabel <p.zabel@pengutronix.de>;
> >> linux-arm-kernel@lists.infradead.org;
> >> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> >> openbmc@lists.ozlabs.org
> >> Cc: BMC-SW <BMC-SW@aspeedtech.com>
> >> Subject: Re: [PATCH v3 2/3] dt-bindings: i2c-ast2600: Add bindings
> >> for AST2600 i2C driver
> >>
> >>
> >>
> >> On Fri, 29 Jul 2022, at 12:33, Ryan Chen wrote:
> >> > Hello Andrew,
> >> >
> >> >> -----Original Message-----
> >> >> From: Andrew Jeffery <andrew@aj.id.au>
> >> >> Sent: Friday, July 29, 2022 10:29 AM
> >> >> To: Ryan Chen <ryan_chen@aspeedtech.com>; Joel Stanley
> >> >> <joel@jms.id.au>; Philipp Zabel <p.zabel@pengutronix.de>;
> >> >> linux-arm-kernel@lists.infradead.org;
> >> >> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> >> >> openbmc@lists.ozlabs.org
> >> >> Cc: BMC-SW <BMC-SW@aspeedtech.com>
> >> >> Subject: Re: [PATCH v3 2/3] dt-bindings: i2c-ast2600: Add bindings
> >> >> for AST2600 i2C driver
> >> >>
> >> >> Hi Ryan,
> >> >>
> >> >> On Mon, 16 May 2022, at 16:18, ryan_chen wrote:
> >> >> > + i2c0: i2c-bus@80 {
> >> >> > + #address-cells = <1>;
> >> >> > + #size-cells = <0>;
> >> >> > + #interrupt-cells = <1>;
> >> >> > + compatible = "aspeed,ast2600-i2c-bus";
> >> >>
> >> >> This isn't quite right with respect to your binding description
> >> >> above
> >> >> :)
> >> > Yes, the compatible need to be " aspeed,ast2600-i2c" is that your point ?
> >>
> >> Yes, but only if we agree that we should have different compatibles
> >> for the different drivers. I'm not convinced about that yet.
> >>
> >> I think it's enough to have different Kconfig symbols, and select the
> >> old driver in aspeed_g4_defconfig, and the new driver in
> >> aspeed_g5_defconfig. Won't that gives us the right outcome without
> requiring a new set of compatibles?
> >>
> > The new driver in aspeed_g5_defconfig.
>
> Right, behind a new Kconfig option.
>
> > And different compatible string
> > claim will
> > Load the new or legacy driver,
>
> I don't think we need this. It's enough to enable the new driver in the defconfig
> (and possibly disable the config option for the old driver).
>
> > it should ok like the different
> > generation SOC. Have
> > different design.
> > Am I right?
>
> We have SoC-specific compatibles already, so the new driver can just bind on
> the compatibles for the SoC revisions that have the new register interface. The
> old driver just binds to the device in the SoCs that have the old register
> interface.
>
> There's an overlap in support between the two drivers, but for people who care
> about which implementation they use they can choose to exclude that driver
> from their kernel config.
>
> None of this requires more compatibles be added.
>
> Does that help?
The kernel device tree driver use compatibles string to separate the driver,
like currently aspeed_g5_defconfig include the ast2500/ast2600.
So use dtsi/dts to separate which driver to loaded. Use can use dts to choice which
driver to loaded.
So keep the dtsi/dts for user implement to loaded should be good, right?
>
> Andrew
next prev parent reply other threads:[~2022-08-09 0:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 6:48 [PATCH v3 0/3] Add ASPEED AST2600 I2C new controller driver ryan_chen
2022-05-16 6:48 ` [PATCH v3 1/3] dt-bindings: i2c-ast2600: Add bindings for AST2600 i2C global register controller ryan_chen
2022-05-16 6:48 ` [PATCH v3 2/3] dt-bindings: i2c-ast2600: Add bindings for AST2600 i2C driver ryan_chen
2022-07-29 2:28 ` Andrew Jeffery
2022-07-29 3:03 ` Ryan Chen
2022-07-29 3:13 ` Andrew Jeffery
2022-08-02 9:04 ` Ryan Chen
2022-08-09 0:34 ` Andrew Jeffery
2022-08-09 0:59 ` Ryan Chen [this message]
2022-05-16 6:49 ` [PATCH v3 3/3] i2c:aspeed:support ast2600 i2c new register mode driver ryan_chen
2022-05-19 19:56 ` [PATCH v3 0/3] Add ASPEED AST2600 I2C new controller driver Peter Delevoryas
2022-05-20 2:46 ` Ryan Chen
2022-05-20 3:01 ` Peter Delevoryas
2022-05-20 3:15 ` Ryan Chen
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=SEZPR06MB5269B2ACF6D765E214FD6DF2F2629@SEZPR06MB5269.apcprd06.prod.outlook.com \
--to=ryan_chen@aspeedtech.com \
--cc=BMC-SW@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=p.zabel@pengutronix.de \
/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®