Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/dev if there is no 'compatible' property try...
details: https://anonhg.NetBSD.org/src/rev/6f0c48ac4804
branches: trunk
changeset: 356461:6f0c48ac4804
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Sep 27 22:31:53 2017 +0000
description:
if there is no 'compatible' property try to guess the codec from the i2c
address
diffstat:
sys/arch/macppc/dev/deq.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 467be04fc789 -r 6f0c48ac4804 sys/arch/macppc/dev/deq.c
--- a/sys/arch/macppc/dev/deq.c Wed Sep 27 22:18:15 2017 +0000
+++ b/sys/arch/macppc/dev/deq.c Wed Sep 27 22:31:53 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: deq.c,v 1.11 2017/09/27 22:11:31 macallan Exp $ */
+/* $NetBSD: deq.c,v 1.12 2017/09/27 22:31:53 macallan Exp $ */
/*-
* Copyright (C) 2005 Michael Lorenz
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.11 2017/09/27 22:11:31 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.12 2017/09/27 22:31:53 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -90,7 +90,14 @@
sc->sc_address = (ia->ia_addr & 0x7f);
sc->sc_i2c = ia->ia_tag;
if (OF_getprop(sc->sc_node, "compatible", name, 256) <= 0) {
- strcpy(name, "unknown");
+ /* deq has no 'compatible' on my iBook G4 */
+ switch (sc->sc_address) {
+ case 0x35:
+ strcpy(name, "tas3004");
+ break;
+ default:
+ strcpy(name, "unknown");
+ }
}
aprint_normal(" Audio Codec (%s)\n", name);
}
Home |
Main Index |
Thread Index |
Old Index