aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0579-rtc-ds3232-Add-DT-compatible-string-for-ds3234.patch
blob: 1cd473dd4f5862e3d8e8ca148c703a6128c50662 (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 bff500336ec392a64586aca9e1fc024a5cc159a8 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 7 Mar 2023 20:51:53 +0000
Subject: [PATCH] rtc: ds3232: Add DT compatible string for ds3234

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

--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -701,9 +701,16 @@ static int ds3234_probe(struct spi_devic
 	return ds3232_probe(&spi->dev, regmap, spi->irq, "ds3234");
 }
 
+static const  __maybe_unused struct of_device_id ds3234_of_match[] = {
+	{ .compatible = "dallas,ds3234" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, ds3234_of_match);
+
 static struct spi_driver ds3234_driver = {
 	.driver = {
 		.name	 = "ds3234",
+		.of_match_table = of_match_ptr(ds3234_of_match),
 	},
 	.probe	 = ds3234_probe,
 };