Re: [PATCH v3 2/3] hwmon: (emc1403) Convert to use OF bindings
Svyatoslav Ryhel <[email protected]>
| Newsgroups | org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAPVz0n3WKw74zg0HmBBOo8Z7JV_pku-DjsgKF_74B8EdD5cXgA@mail.gmail.com> |
чт, 23 лип. 2026 р. о 09:28 Uwe Kleine-König <[email protected]> пише: > > Hello, > > On Tue, Jul 21, 2026 at 12:59:34PM +0300, Svyatoslav Ryhel wrote: > > From: Jonas Schwöbel <[email protected]> > > > > Add OF match compatible table to be able to use this driver with Device > > Trees. > > > > Signed-off-by: Jonas Schwöbel <[email protected]> > > Signed-off-by: Svyatoslav Ryhel <[email protected]> > > Reviewed-by: Guenter Roeck <[email protected]> > > Please put your S-o-b line last. > If S-o-b's should be chronological, then this order is correct. Guenter added his reviewed-by after I have added my signed-off-by. > > --- > > drivers/hwmon/emc1403.c | 16 ++++++++++++++-- > > 1 file changed, 14 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c > > index cd753b38709f2..b7ab6069ec7b1 100644 > > --- a/drivers/hwmon/emc1403.c > > +++ b/drivers/hwmon/emc1403.c > > @@ -16,6 +16,7 @@ > > #include <linux/hwmon.h> > > #include <linux/hwmon-sysfs.h> > > #include <linux/err.h> > > +#include <linux/mod_devicetable.h> > > Don't add <linux/mod_devicetable.h> please. struct of_device_id is also > provided by <linux/i2c.h> so adding <linux/mod_devicetable.h> isn't > needed. > > > #include <linux/sysfs.h> > > #include <linux/regmap.h> > > #include <linux/util_macros.h> > > [...] > > @@ -682,10 +683,21 @@ static const unsigned short emc1403_address_list[] = { > > 0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END > > }; > > > > +static const struct of_device_id emc1403_of_match[] = { > > + { .compatible = "smsc,emc1402", .data = (void *)emc1402 }, > > + { .compatible = "smsc,emc1403", .data = (void *)emc1403 }, > > + { .compatible = "smsc,emc1404", .data = (void *)emc1404 }, > > + { .compatible = "smsc,emc1428", .data = (void *)emc1428 }, > > + { } > > + > > Unusual empty line here. > > > +}; > > +MODULE_DEVICE_TABLE(of, emc1403_of_match); > > + > > Best regards > Uwe