-/* $OpenBSD: amliic.c,v 1.2 2020/12/18 22:13:06 kettenis Exp $ */
+/* $OpenBSD: amliic.c,v 1.3 2021/03/11 09:15:25 patrick Exp $ */
/*
* Copyright (c) 2019 Mark Kettenis <kettenis@openbsd.org>
*
{
int iba_node = *(int *)arg;
struct i2c_attach_args ia;
- char name[32];
+ char name[32], status[32];
uint32_t reg[1];
int node;
for (node = OF_child(iba_node); node; node = OF_peer(node)) {
memset(name, 0, sizeof(name));
+ memset(status, 0, sizeof(status));
memset(reg, 0, sizeof(reg));
if (OF_getprop(node, "compatible", name, sizeof(name)) == -1)
if (name[0] == '\0')
continue;
+ if (OF_getprop(node, "status", status, sizeof(status)) > 0 &&
+ strcmp(status, "disabled") == 0)
+ continue;
+
if (OF_getprop(node, "reg", ®, sizeof(reg)) != sizeof(reg))
continue;
-/* $OpenBSD: bcm2835_bsc.c,v 1.1 2020/04/25 22:28:12 kettenis Exp $ */
+/* $OpenBSD: bcm2835_bsc.c,v 1.2 2021/03/11 09:15:25 patrick Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
{
int iba_node = *(int *)arg;
struct i2c_attach_args ia;
- char name[32];
+ char name[32], status[32];
uint32_t reg[1];
int node;
for (node = OF_child(iba_node); node; node = OF_peer(node)) {
memset(name, 0, sizeof(name));
+ memset(status, 0, sizeof(status));
memset(reg, 0, sizeof(reg));
if (OF_getprop(node, "compatible", name, sizeof(name)) == -1)
if (name[0] == '\0')
continue;
+ if (OF_getprop(node, "status", status, sizeof(status)) > 0 &&
+ strcmp(status, "disabled") == 0)
+ continue;
+
if (OF_getprop(node, "reg", ®, sizeof(reg)) != sizeof(reg))
continue;
-/* $OpenBSD: imxiic_fdt.c,v 1.1 2020/11/17 14:30:13 patrick Exp $ */
+/* $OpenBSD: imxiic_fdt.c,v 1.2 2021/03/11 09:15:25 patrick Exp $ */
/*
* Copyright (c) 2013 Patrick Wildt <patrick@blueri.se>
*
int iba_node = *(int *)aux;
extern int iic_print(void *, const char *);
struct i2c_attach_args ia;
- char name[32];
+ char name[32], status[32];
uint32_t reg[1];
int node;
for (node = OF_child(iba_node); node; node = OF_peer(node)) {
memset(name, 0, sizeof(name));
+ memset(status, 0, sizeof(status));
memset(reg, 0, sizeof(reg));
if (OF_getprop(node, "compatible", name, sizeof(name)) == -1)
if (name[0] == '\0')
continue;
+ if (OF_getprop(node, "status", status, sizeof(status)) > 0 &&
+ strcmp(status, "disabled") == 0)
+ continue;
+
if (OF_getprop(node, "reg", ®, sizeof(reg)) != sizeof(reg))
continue;
-/* $OpenBSD: mviic.c,v 1.2 2019/09/07 13:27:40 patrick Exp $ */
+/* $OpenBSD: mviic.c,v 1.3 2021/03/11 09:15:25 patrick Exp $ */
/*
* Copyright (c) 2019 Patrick Wildt <patrick@blueri.se>
*
int iba_node = *(int *)aux;
extern int iic_print(void *, const char *);
struct i2c_attach_args ia;
- char name[32];
+ char name[32], status[32];
uint32_t reg[1];
int node;
for (node = OF_child(iba_node); node; node = OF_peer(node)) {
memset(name, 0, sizeof(name));
+ memset(status, 0, sizeof(status));
memset(reg, 0, sizeof(reg));
if (OF_getprop(node, "compatible", name, sizeof(name)) == -1)
if (name[0] == '\0')
continue;
+ if (OF_getprop(node, "status", status, sizeof(status)) > 0 &&
+ strcmp(status, "disabled") == 0)
+ continue;
+
if (OF_getprop(node, "reg", ®, sizeof(reg)) != sizeof(reg))
continue;
-/* $OpenBSD: sxitwi.c,v 1.12 2020/10/08 20:57:52 patrick Exp $ */
+/* $OpenBSD: sxitwi.c,v 1.13 2021/03/11 09:15:25 patrick Exp $ */
/* $NetBSD: gttwsi_core.c,v 1.2 2014/11/23 13:37:27 jmcneill Exp $ */
/*
* Copyright (c) 2008 Eiji Kawauchi.
{
int iba_node = *(int *)arg;
struct i2c_attach_args ia;
- char name[32];
+ char name[32], status[32];
uint32_t reg[1];
int node;
for (node = OF_child(iba_node); node; node = OF_peer(node)) {
memset(name, 0, sizeof(name));
+ memset(status, 0, sizeof(status));
memset(reg, 0, sizeof(reg));
if (OF_getprop(node, "compatible", name, sizeof(name)) == -1)
if (name[0] == '\0')
continue;
+ if (OF_getprop(node, "status", status, sizeof(status)) > 0 &&
+ strcmp(status, "disabled") == 0)
+ continue;
+
if (OF_getprop(node, "reg", ®, sizeof(reg)) != sizeof(reg))
continue;