summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2018-01-30 08:27:18 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2018-01-30 08:27:18 +0000
commit66125068ab71d81be8fcc9b09e712f1809ecc5e4 (patch)
treeadc0ef689450afbd66836b811e31776c2ed68848 /sys
parentfc25521843c9bc6c13cf3734b42fee956abd321b (diff)
add i2c_bit_add_bus()
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/drm_linux.c11
-rw-r--r--sys/dev/pci/drm/drm_linux.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c
index 7cabeac05c5..5a26c246833 100644
--- a/sys/dev/pci/drm/drm_linux.c
+++ b/sys/dev/pci/drm/drm_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux.c,v 1.18 2018/01/15 22:24:17 kettenis Exp $ */
+/* $OpenBSD: drm_linux.c,v 1.19 2018/01/30 08:27:17 jsg Exp $ */
/*
* Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org>
* Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org>
@@ -631,6 +631,15 @@ struct i2c_algorithm i2c_bit_algo = {
.functionality = i2c_bb_functionality
};
+int
+i2c_bit_add_bus(struct i2c_adapter *adap)
+{
+ adap->algo = &i2c_bit_algo;
+ adap->retries = 3;
+
+ return 0;
+}
+
#if defined(__amd64__) || defined(__i386__)
/*
diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h
index 2321c51edc0..483c5ca5b9c 100644
--- a/sys/dev/pci/drm/drm_linux.h
+++ b/sys/dev/pci/drm/drm_linux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux.h,v 1.68 2018/01/30 08:25:06 jsg Exp $ */
+/* $OpenBSD: drm_linux.h,v 1.69 2018/01/30 08:27:17 jsg Exp $ */
/*
* Copyright (c) 2013, 2014, 2015 Mark Kettenis
* Copyright (c) 2017 Martin Pieuchot
@@ -1647,6 +1647,8 @@ i2c_set_adapdata(struct i2c_adapter *adap, void *data)
adap->data = data;
}
+int i2c_bit_add_bus(struct i2c_adapter *);
+
#define memcpy_toio(d, s, n) memcpy(d, s, n)
#define memcpy_fromio(d, s, n) memcpy(d, s, n)
#define memset_io(d, b, n) memset(d, b, n)