Re: [PATCH 2/2] hwmon: (tps38900x) Add driver for TI TPS389004/TPS389006/TPS389008
From: Uwe Kleine-König
Date: Mon Oct 12 2026 - 06:59:10 EST
Hello,
On Tue, Sep 29, 2026 at 04:04:05PM -0700, Luna Hart wrote:
> +#include <linux/i2c.h>
> +#include <linux/mod_devicetable.h>
You can rely on <linux/i2c.h> to provide of_device_id and i2c_device_id
and drop <linux/mod_devicetable.h>.
The mod_devicetable.h header pulls in many unneeded dependencies and is
bad for this reason.
> [...]
> +static const struct i2c_device_id tps38900x_id[] = {
> + { .name = "tps389004", .driver_data = 4 },
> + { .name = "tps389006", .driver_data = 6 },
> + { .name = "tps389008", .driver_data = 8 },
> + {}
> +};
> +MODULE_DEVICE_TABLE(i2c, tps38900x_id);
> +
> +static const struct of_device_id tps38900x_of_match[] = {
> + { .compatible = "ti,tps389004", .data = (void *)4 },
> + { .compatible = "ti,tps389006", .data = (void *)6 },
> + { .compatible = "ti,tps389008", .data = (void *)8 },
> + {}
Please use { } with a space in the list terminator.
Attachment:
signature.asc
Description: PGP signature