Module Name: src Committed By: thorpej Date: Sat Jan 30 17:38:57 UTC 2021
Modified Files: src/sys/dev/i2c: s390.c Log Message: Add the standard compat string from the Device Tree bindings. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/s390.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/s390.c diff -u src/sys/dev/i2c/s390.c:1.6 src/sys/dev/i2c/s390.c:1.7 --- src/sys/dev/i2c/s390.c:1.6 Thu Jan 2 19:00:34 2020 +++ src/sys/dev/i2c/s390.c Sat Jan 30 17:38:57 2021 @@ -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_read(struct s390rtc_s 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 */