From 757499353aa98c9742e0ba640e78a8e5755a22a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 23 Mar 2020 15:20:04 +0100 Subject: [PATCH] kernel: add data_acquisition mapping for input devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit busses/i2c needs to be probed also for acpi devices Change-Id: Ib75b6e8db27361e395560d069dcbf136571b7a8e Reviewed-on: https://review.haiku-os.org/c/haiku/+/2463 Reviewed-by: Jérôme Duval --- .../kernel/device_manager/device_manager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/system/kernel/device_manager/device_manager.cpp b/src/system/kernel/device_manager/device_manager.cpp index f057377b18..bc6600c8e7 100644 --- a/src/system/kernel/device_manager/device_manager.cpp +++ b/src/system/kernel/device_manager/device_manager.cpp @@ -1660,6 +1660,16 @@ device_node::_GetNextDriverPath(void*& cookie, KPath& _path) break; } break; + case PCI_data_acquisition: + switch (subType) { + case PCI_data_acquisition_other: + _AddPath(*stack, "busses", "i2c"); + break; + default: + _AddPath(*stack, "drivers"); + break; + } + break; default: if (sRootNode == this) { _AddPath(*stack, "busses/pci"); @@ -1677,6 +1687,7 @@ device_node::_GetNextDriverPath(void*& cookie, KPath& _path) _AddPath(*stack, "busses"); } _AddPath(*stack, "drivers", sGenericContextPath); + _AddPath(*stack, "busses/i2c"); _AddPath(*stack, "busses/scsi"); _AddPath(*stack, "busses/random"); } @@ -1959,6 +1970,9 @@ device_node::Probe(const char* devicePath, uint32 updateCycle) matches = type == PCI_multimedia && subType == PCI_video; } else if (!strcmp(devicePath, "power")) { matches = type == PCI_data_acquisition; + } else if (!strcmp(devicePath, "input")) { + matches = type == PCI_data_acquisition + && subType == PCI_data_acquisition_other; } } else { // This driver does not support types, but still wants to its