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 a proper compat string for this device, foll...



details:   https://anonhg.NetBSD.org/src/rev/c5f1e68cedea
branches:  trunk
changeset: 950737:c5f1e68cedea
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jan 30 01:23:08 2021 +0000

description:
Add a proper compat string for this device, following the standard
conventions.

diffstat:

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

diffs (39 lines):

diff -r 51192503c0b8 -r c5f1e68cedea sys/dev/i2c/sgsmix.c
--- a/sys/dev/i2c/sgsmix.c      Sat Jan 30 01:22:06 2021 +0000
+++ b/sys/dev/i2c/sgsmix.c      Sat Jan 30 01:23:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sgsmix.c,v 1.9 2018/06/16 21:22:13 thorpej Exp $       */
+/*     $NetBSD: sgsmix.c,v 1.10 2021/01/30 01:23:08 thorpej Exp $      */
 
 /*-
  * Copyright (C) 2005 Michael Lorenz.
@@ -31,7 +31,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.9 2018/06/16 21:22:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.10 2021/01/30 01:23:08 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -75,6 +75,11 @@
 CFATTACH_DECL_NEW(sgsmix, sizeof(struct sgsmix_softc),
     sgsmix_match, sgsmix_attach, NULL, NULL);
 
+static const struct device_compatible_entry compat_data[] = {
+       { .compat = "st,tda7433" },
+       DEVICE_COMPAT_EOL
+};
+
 static int
 sgsmix_match(device_t parent, cfdata_t cf, void *aux)
 {
@@ -83,7 +88,7 @@
        uint8_t out[2] = {1, 0x20};
        int match_result;
 
-       if (iic_use_direct_match(args, cf, NULL, &match_result))
+       if (iic_use_direct_match(args, cf, compat_data, &match_result))
                return match_result;
 
        /* see if we can talk to something at address 0x8a */



Home | Main Index | Thread Index | Old Index