summaryrefslogtreecommitdiff
path: root/drivers/iio/light/veml6070.c
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-09-29 22:38:51 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-10-05 12:09:15 +0100
commit8a49c373218261258169d422a325e65cb6f57d8b (patch)
tree532536a97d577eb93ddbf2fab3c9e58d973aca9d /drivers/iio/light/veml6070.c
parenteba200d5bf61ec0d6913ca8344b340d659055eda (diff)
downloadlwn-8a49c373218261258169d422a325e65cb6f57d8b.tar.gz
lwn-8a49c373218261258169d422a325e65cb6f57d8b.zip
iio: light: veml6070: add devicetree support
Register the compatible from the dt-bindings. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240929-veml6070-cleanup-v1-6-a9350341a646@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light/veml6070.c')
-rw-r--r--drivers/iio/light/veml6070.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/light/veml6070.c b/drivers/iio/light/veml6070.c
index faba04e1da98..46eafaa9053d 100644
--- a/drivers/iio/light/veml6070.c
+++ b/drivers/iio/light/veml6070.c
@@ -192,9 +192,16 @@ static const struct i2c_device_id veml6070_id[] = {
};
MODULE_DEVICE_TABLE(i2c, veml6070_id);
+static const struct of_device_id veml6070_of_match[] = {
+ { .compatible = "vishay,veml6070" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, veml6070_of_match);
+
static struct i2c_driver veml6070_driver = {
.driver = {
.name = VEML6070_DRV_NAME,
+ .of_match_table = veml6070_of_match,
},
.probe = veml6070_probe,
.id_table = veml6070_id,