bcm27xx: 6.1: add kernel patches
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0581-iio-light-tsl4531-Add-DT-compatible-string.patch
1 From 267601d68d4c5184727b4abe1fe64e89157ee8d7 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 7 Mar 2023 21:48:54 +0000
4 Subject: [PATCH] iio: light: tsl4531: Add DT compatible string
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
7 ---
8 drivers/iio/light/tsl4531.c | 7 +++++++
9 1 file changed, 7 insertions(+)
10
11 --- a/drivers/iio/light/tsl4531.c
12 +++ b/drivers/iio/light/tsl4531.c
13 @@ -233,9 +233,16 @@ static const struct i2c_device_id tsl453
14 };
15 MODULE_DEVICE_TABLE(i2c, tsl4531_id);
16
17 +static const struct of_device_id tsl4531_of_id[] = {
18 + { .compatible = "amstaos,tsl4531" },
19 + { }
20 +};
21 +MODULE_DEVICE_TABLE(of, tsl4531_of_id);
22 +
23 static struct i2c_driver tsl4531_driver = {
24 .driver = {
25 .name = TSL4531_DRV_NAME,
26 + .of_match_table = tsl4531_of_id,
27 .pm = pm_sleep_ptr(&tsl4531_pm_ops),
28 },
29 .probe = tsl4531_probe,