Subject: Re: [PATCH v21 3/4] i2c: ast2600: Add controller driver for new
register layout
On Fri, Nov 07, 2025 at 06:26:39AM +0000, Ryan Chen wrote:
quoted
quoted
On 27/10/2025 07:12, Ryan Chen wrote:
...
quoted
Add new file i2c-aspeed-core.c to do legacy probe and i2c-ast2600 probe.
if (of_device_is_compatible(dev_of_node(dev), "aspeed,ast2600-i2c-bus")
&&
if (device_is_compatible(dev, "aspeed,ast2600-i2c-bus") &&
quoted
of_parse_phandle(dev_of_node(dev), "aspeed,global-regs", 0)) {
Not sure why do you need this. Isn't it as simple as
device_property_present(dev, "aspeed,global-regs", 0)) {
or something between these lines?
Thanks Andy.
I will update logic as:
if (device_is_compatible(dev, "aspeed,ast2600-i2c-bus") &&
device_property_present(dev, "aspeed,global-regs"))
ret = ast2600_i2c_probe(pdev);
else
ret = aspeed_i2c_probe(pdev);
quoted
ret = ast2600_i2c_probe(pdev);
} else {
ret = aspeed_i2c_probe(pdev);
}
--
With Best Regards,
Andy Shevchenko