git: 1256067c5c57 - main - ds3231: allow configuration via hints on FDT systems

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Mon, 13 Dec 2021 11:40:25 UTC
The branch main has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=1256067c5c575474e626e5f119f50275ea2d975e

commit 1256067c5c575474e626e5f119f50275ea2d975e
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-12-13 07:21:08 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-12-13 11:40:00 +0000

    ds3231: allow configuration via hints on FDT systems
    
    MFC after:      10 days
---
 sys/dev/iicbus/ds3231.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys/dev/iicbus/ds3231.c b/sys/dev/iicbus/ds3231.c
index bd4142c6291b..d4d0c842527e 100644
--- a/sys/dev/iicbus/ds3231.c
+++ b/sys/dev/iicbus/ds3231.c
@@ -356,16 +356,19 @@ ds3231_en32khz_sysctl(SYSCTL_HANDLER_ARGS)
 static int
 ds3231_probe(device_t dev)
 {
+	int rc;
 
 #ifdef FDT
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
-	if (!ofw_bus_is_compatible(dev, "maxim,ds3231"))
-		return (ENXIO);
+	if (ofw_bus_is_compatible(dev, "maxim,ds3231"))
+		rc = BUS_PROBE_DEFAULT;
+	else
+		rc = BUS_PROBE_NOWILDCARD;
 #endif
 	device_set_desc(dev, "Maxim DS3231 RTC");
 
-	return (BUS_PROBE_DEFAULT);
+	return (rc);
 }
 
 static int