Re: [PATCH 2/2] power: supply: Add Silicon Mitus SM5714 fuel gauge driver

From: Uwe Kleine-König

Date: Fri Nov 13 2026 - 01:59:56 EST


Hello,

On Wed, Nov 11, 2026 at 05:35:00PM +0200, Asdlerto Korry via B4 Relay wrote:
> +#include <linux/i2c.h>
> [...]
> +#include <linux/mod_devicetable.h>

<linux/i2c.h> already provides of_device_id and
<linux/mod_devicetable.h> introduces a lot of unneeded build
dependencies. So please drop the latter.

> +static const struct of_device_id sm5714_fg_of_match[] = {
> + { .compatible = "siliconmitus,sm5714-fuelgauge" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, sm5714_fg_of_match);
> +
> +static struct i2c_driver sm5714_fg_driver = {
> + .driver = {
> + .name = "sm5714-fuelgauge",
> + .of_match_table = sm5714_fg_of_match,
> + },
> + .probe = sm5714_fg_probe,
> +};
> +module_i2c_driver(sm5714_fg_driver);

Don't you need an i2c_device_id table, too?

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature