aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0582-iio-light-veml6070-Add-DT-compatible-string.patch
blob: 437ecae793b8a3c32fd4f492eff5ef201aca5620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From d337a3f310c82341597676d4b8ad51e60aa4a243 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 7 Mar 2023 21:49:30 +0000
Subject: [PATCH] iio: light: veml6070: Add DT compatible string

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 drivers/iio/light/veml6070.c | 7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/iio/light/veml6070.c
+++ b/drivers/iio/light/veml6070.c
@@ -195,9 +195,16 @@ static const struct i2c_device_id veml60
 };
 MODULE_DEVICE_TABLE(i2c, veml6070_id);
 
+static const struct of_device_id veml6070_of_id[] = {
+	{ .compatible = "vishay,veml6070" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, veml6070_of_id);
+
 static struct i2c_driver veml6070_driver = {
 	.driver = {
 		.name   = VEML6070_DRV_NAME,
+		.of_match_table = veml6070_of_id,
 	},
 	.probe  = veml6070_probe,
 	.remove  = veml6070_remove,