Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c Add the standard compat string from the Device T...



details:   https://anonhg.NetBSD.org/src/rev/31fadaa0d727
branches:  trunk
changeset: 950754:31fadaa0d727
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jan 30 17:38:57 2021 +0000

description:
Add the standard compat string from the Device Tree bindings.

diffstat:

 sys/dev/i2c/s390.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r ed385c6cea3a -r 31fadaa0d727 sys/dev/i2c/s390.c
--- a/sys/dev/i2c/s390.c        Sat Jan 30 17:38:27 2021 +0000
+++ b/sys/dev/i2c/s390.c        Sat Jan 30 17:38:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: s390.c,v 1.6 2020/01/02 19:00:34 thorpej Exp $ */
+/*     $NetBSD: s390.c,v 1.7 2021/01/30 17:38:57 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2011 Frank Wille.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: s390.c,v 1.6 2020/01/02 19:00:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s390.c,v 1.7 2021/01/30 17:38:57 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -62,13 +62,18 @@
 static int s390rtc_write(struct s390rtc_softc *, int, uint8_t *, size_t);
 static uint8_t bitreverse(uint8_t);
 
+static const struct device_compatible_entry compat_data[] = {
+       { .compat = "sii,s35390a" },
+       DEVICE_COMPAT_EOL
+};
+
 static int
 s390rtc_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 */



Home | Main Index | Thread Index | Old Index