Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RC diff to make zaudio(4) of NetBSD/zaurus 9.0_BETA attached properly with the new MI i2c(4) driver
Index: arch/zaurus/zaurus/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/zaurus/zaurus/autoconf.c,v
retrieving revision 1.12
diff -u -p -d -r1.12 autoconf.c
--- arch/zaurus/zaurus/autoconf.c 29 Jul 2012 18:05:47 -0000 1.12
+++ arch/zaurus/zaurus/autoconf.c 3 Nov 2019 18:08:19 -0000
@@ -43,6 +43,8 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
#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 @@ void
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);
+ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.