iio: temperature: maxim_thermocouple: declare missing of table
PATCH v2 1/1 iio: temperature: maxim_thermocouple: declare missing of table
Add missing <of_device_id> table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS.
Before this patch:
modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias
alias: spi:max31855 alias: spi:max6675
After this patch:
modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias
alias: spi:max31855 alias: spi:max6675 alias: of:N*T*Cmaxim,max31855C* alias: of:N*T*Cmaxim,max31855 alias: of:N*T*Cmaxim,max6675C* alias: of:N*T*Cmaxim,max6675
--- drivers/iio/temperature/maxim_thermocouple.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/iio/temperature/maxim_thermocouple.c +10 -0
@@ -10,6 +10,8 @@#include <linux/init.h> #include <linux/mutex.h> #include <linux/err.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> #include <linux/iio/trigger.h>
@@ -262,9 +264,17 @@ static const struct spi_device_id maxim_thermocouple_id[] = { };MODULE_DEVICE_TABLE (spi, maxim_thermocouple_id); +static const struct of_device_id maxim_thermocouple_of_match[] = { + { .compatible ="maxim,max6675" }, + { .compatible ="maxim,max31855" }, + { }, +}; +MODULE_DEVICE_TABLE (of, maxim_thermocouple_of_match); +static struct spi_driver maxim_thermocouple_driver = { .driver = { .name =MAXIM_THERMOCOUPLE_DRV_NAME , + .of_match_table = maxim_thermocouple_of_match, }, .probe = maxim_thermocouple_probe, .remove = maxim_thermocouple_remove,
Signature · 1 line
2.7.4
Quoted 9 lines · Daniel Gomez
Add missing <
of_device_id> table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS.Before this patch:
modinfodrivers/iio/temperature/maxim_thermocouple.ko| grep aliasalias: spi:max31855 alias: spi:max6675
Quoted 8 lines
After this patch:
modinfodrivers/iio/temperature/maxim_thermocouple.ko| grep aliasalias: spi:max31855 alias: spi:max6675 alias: of:N*T*Cmaxim,max31855C* alias: of:N*T*Cmaxim,max31855 alias: of:N*T*Cmaxim,max6675C* alias: of:N*T*Cmaxim,max6675
Heh oops I missed that somehow in initial development.
Quoted 41 lines
Reported-by Javier Martinez Canillas <[email protected]>Signed-off-by Daniel Gomez <[email protected]>--- drivers/iio/temperature/maxim_thermocouple.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/iio/temperature/maxim_thermocouple.c +10
-1@@ -10,6 +10,8 @@#include <linux/init.h> #include <linux/mutex.h> #include <linux/err.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> #include <linux/iio/trigger.h> @@ -262,9 +264,17 @@ static const struct spi_device_id maxim_thermocouple_id[] = { };MODULE_DEVICE_TABLE (spi, maxim_thermocouple_id); +static const struct of_device_id maxim_thermocouple_of_match[] = { + { .compatible ="maxim,max6675" }, + { .compatible ="maxim,max31855" }, + { }, +}; +MODULE_DEVICE_TABLE (of, maxim_thermocouple_of_match); +static struct spi_driver maxim_thermocouple_driver = { .driver = { .name =MAXIM_THERMOCOUPLE_DRV_NAME , + .of_match_table = maxim_thermocouple_of_match, }, .probe = maxim_thermocouple_probe, .remove = maxim_thermocouple_remove, --2.7.4
Quoted 19 lines · On Thu, 25 Apr 2019 09:35:07 +0800 Matt Ranostay <[email protected]>…
Quoted 9 lines · Daniel Gomez
Add missing <
of_device_id> table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS.Before this patch:
modinfodrivers/iio/temperature/maxim_thermocouple.ko| grep aliasalias: spi:max31855 alias: spi:max6675Quoted 8 lines
After this patch:
modinfodrivers/iio/temperature/maxim_thermocouple.ko| grep aliasalias: spi:max31855 alias: spi:max6675 alias: of:N*T*Cmaxim,max31855C* alias: of:N*T*Cmaxim,max31855 alias: of:N*T*Cmaxim,max6675C* alias: of:N*T*Cmaxim,max6675
Quoted 3 lines
Heh oops I missed that somehow in initial development.
Acked-by Matt Ranostay <[email protected]>
Applied to the togreg branch of iio.git. Given timing this may have to wait for the next cycle to go upstream.
Thanks.
Jonathan
Quoted 42 lines
Quoted 42 lines
Reported-by Javier Martinez Canillas <[email protected]>Signed-off-by Daniel Gomez <[email protected]>--- drivers/iio/temperature/maxim_thermocouple.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/iio/temperature/maxim_thermocouple.c +10
-1@@ -10,6 +10,8 @@#include <linux/init.h> #include <linux/mutex.h> #include <linux/err.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> #include <linux/iio/trigger.h> @@ -262,9 +264,17 @@ static const struct spi_device_id maxim_thermocouple_id[] = { };MODULE_DEVICE_TABLE (spi, maxim_thermocouple_id); +static const struct of_device_id maxim_thermocouple_of_match[] = { + { .compatible ="maxim,max6675" }, + { .compatible ="maxim,max31855" }, + { }, +}; +MODULE_DEVICE_TABLE (of, maxim_thermocouple_of_match); +static struct spi_driver maxim_thermocouple_driver = { .driver = { .name =MAXIM_THERMOCOUPLE_DRV_NAME , + .of_match_table = maxim_thermocouple_of_match, }, .probe = maxim_thermocouple_probe, .remove = maxim_thermocouple_remove, --2.7.4