summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2021-01-30 17:38:27 +0000
committerthorpej <thorpej@NetBSD.org>2021-01-30 17:38:27 +0000
commit149dcf80d3ccfab8f138643426ba047db73f14fd (patch)
tree19ccd529e18622291ba969174eb712824fad847e /sys/dev/i2c
parent7d1939919e0e07b44c94e666e30124c879ca106e (diff)
Add standard compat strings from the Device Tree bindings.
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/rs5c372.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/i2c/rs5c372.c b/sys/dev/i2c/rs5c372.c
index 8dff7dedf1f..bc838eac902 100644
--- a/sys/dev/i2c/rs5c372.c
+++ b/sys/dev/i2c/rs5c372.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rs5c372.c,v 1.16 2020/01/02 17:17:36 thorpej Exp $ */
+/* $NetBSD: rs5c372.c,v 1.17 2021/01/30 17:38:27 thorpej Exp $ */
/*-
* Copyright (C) 2005 NONAKA Kimihiro <nonaka@netbsd.org>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rs5c372.c,v 1.16 2020/01/02 17:17:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rs5c372.c,v 1.17 2021/01/30 17:38:27 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -61,13 +61,19 @@ static int rs5c372rtc_clock_write(struct rs5c372rtc_softc *, struct clock_ymdhms
static int rs5c372rtc_gettime_ymdhms(todr_chip_handle_t, struct clock_ymdhms *);
static int rs5c372rtc_settime_ymdhms(todr_chip_handle_t, struct clock_ymdhms *);
+static const struct device_compatible_entry compat_data[] = {
+ { .compat = "ricoh,rs5c372a" },
+ { .compat = "ricoh,rs5c372b" },
+ DEVICE_COMPAT_EOL
+};
+
static int
rs5c372rtc_match(device_t parent, cfdata_t cf, void *arg)
{
struct i2c_attach_args *ia = arg;
int match_result;
- if (iic_use_direct_match(ia, cf, NULL, &match_result))
+ if (iic_use_direct_match(ia, cf, compat_data, &match_result))
return match_result;
/* indirect config - check typical address */