[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260107-rustling-pillbug-of-abundance-f63a0e@quoll>
Date: Wed, 7 Jan 2026 08:27:59 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Timothy Pearson <tpearson@...torengineering.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
robh+dt@...nel.org, conor+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
lee@...nel.org, Georgy.Yakovlev@...y.com, sanastasio@...torengineering.com
Subject: Re: [PATCH v6 2/4] mfd: sony-cronos-smc: Add driver for Sony Cronos
SMC
On Tue, Jan 06, 2026 at 06:21:34PM -0600, Timothy Pearson wrote:
> +static const struct of_device_id cronos_smc_dt_ids[] = {
> + {
> + .compatible = "sony,cronos-smc",
> + },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, cronos_smc_dt_ids);
> +
> +static int sony_cronos_i2c_probe(struct i2c_client *i2c)
> +{
> + struct sony_cronos_smc *ddata;
> + int ret;
> +
> + ddata = devm_kzalloc(&i2c->dev, sizeof(*ddata), GFP_KERNEL);
> + if (!ddata)
> + return -ENOMEM;
> +
> + i2c_set_clientdata(i2c, ddata);
> + ddata->dev = &i2c->dev;
> +
> + ddata->regmap = devm_regmap_init_i2c(i2c, &cronos_smc_regmap_config);
> + if (IS_ERR(ddata->regmap)) {
> + return dev_err_probe(ddata->dev, PTR_ERR(ddata->regmap),
> + "Failed to allocate register map\n");
> + }
> +
> + ret = sony_cronos_get_device_type(ddata);
> + if (ret)
> + return ret;
> +
> + ret = mfd_add_devices(ddata->dev, PLATFORM_DEVID_AUTO, cronos_smc_devs,
> + ARRAY_SIZE(cronos_smc_devs), NULL, 0, NULL);
> + if (ret) {
> + dev_err(ddata->dev, "Failed to register child devices\n");
> + return ret;
return dev_err_probe
> + }
> +
> + return ret;
> +}
> +
> +static void sony_cronos_i2c_remove(struct i2c_client *i2c)
> +{
> + struct sony_cronos_smc *ddata = i2c_get_clientdata(i2c);
> +
> + mfd_remove_devices(ddata->dev);
> +}
> +
> +static struct i2c_driver sony_cronos_i2c_driver = {
> + .driver = {
> + .name = "sony-cronos-smc",
> + .of_match_table = of_match_ptr(cronos_smc_dt_ids),
You still have here compile test warnings. Drop of_match_ptr.
> + },
> + .probe = sony_cronos_i2c_probe,
> + .remove = sony_cronos_i2c_remove,
> +};
> +module_i2c_driver(sony_cronos_i2c_driver);
> +
> +MODULE_DESCRIPTION("Device driver for the Sony Cronos system management controller");
> +MODULE_AUTHOR("Raptor Engineering, LLC <tpearson@...torengineering.com>");
> +MODULE_LICENSE("GPL");
> \ No newline at end of file
And still the same warning - since v4 or earlier!
Please read own patches.
Best regards,
Krzysztof
Powered by blists - more mailing lists