Re: [PATCH v11 4/9] platform/x86: int3472: tps68470: move Windows MFD setup below the device-type switch

From: Andy Shevchenko

Date: Fri Oct 02 2026 - 09:37:25 EST


On Wed, Sep 30, 2026 at 02:43:16PM -0700, Thierry Chatard wrote:
> The Windows path looks up the board data, builds the tps68470-clk
> platform data and registers the MFD cells; none of this is needed for the
> ChromeOS path, which registers its own cells. Move that handling out of
> the switch and let the ChromeOS case return directly, so the Windows-only
> work is no longer done for ChromeOS and the function reads top to bottom.
>
> While moving the code, use a local struct device *dev to shorten the many
> &client->dev references, and return -ENODATA (rather than -ENODEV) when no
> board data matches this machine, to distinguish it from a missing device.
>
> No functional change for either path.

> Assisted-by: Claude Code:claude-opus-4-8

Assisted-by: LLM

> Signed-off-by: Thierry Chatard <tchatard@xxxxxxxxx>

...

> regmap = devm_regmap_init_i2c(client, &tps68470_regmap_config);
> if (IS_ERR(regmap)) {
> - dev_err(&client->dev, "Failed to create regmap: %ld\n", PTR_ERR(regmap));
> + dev_err(dev, "Failed to create regmap: %ld\n", PTR_ERR(regmap));

This is unrelated to the patch. It belongs to a separate change.
Same for the similar cases below.

--
With Best Regards,
Andy Shevchenko