Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/zaurus/zaurus Fix attach failure of zaudio(4) WM873...



details:   https://anonhg.NetBSD.org/src/rev/d3ec95cb70f5
branches:  trunk
changeset: 465245:d3ec95cb70f5
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Nov 13 17:48:03 2019 +0000

description:
Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00).

The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY
via device properties.  Fixes PR kern/54658.

Should be pulled up to netbsd-9.

diffstat:

 sys/arch/zaurus/zaurus/autoconf.c |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r fca177efd712 -r d3ec95cb70f5 sys/arch/zaurus/zaurus/autoconf.c
--- a/sys/arch/zaurus/zaurus/autoconf.c Wed Nov 13 16:11:27 2019 +0000
+++ b/sys/arch/zaurus/zaurus/autoconf.c Wed Nov 13 17:48:03 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $    */
+/*     $NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $    */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $");
 
 #include "opt_md.h"
 
@@ -43,6 +43,8 @@
 #include <sys/disk.h>
 #include <sys/kauth.h>
 
+#include <dev/i2c/i2cvar.h>
+
 #include <machine/intr.h>
 #include <machine/bootconfig.h>
 #include <machine/bootinfo.h>
@@ -219,5 +221,13 @@
 device_register(device_t dev, void *aux)
 {
 
-       /* Nothing to do */
+       /*
+        * I2C bus conntected to pxaiic(4) for zaudio(4) devices has
+        * limited capabilities.
+        */
+       if (device_is_a(dev, "iic") &&
+           device_is_a(dev->dv_parent, "ziic")) {
+               (void)prop_dictionary_set_cstring_nocopy(device_properties(dev),
+                   I2C_PROP_INDIRECT_PROBE_STRATEGY, I2C_PROBE_STRATEGY_NONE);
+       }
 }



Home | Main Index | Thread Index | Old Index