summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-03 18:35:09 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-05 20:07:13 +0200
commit39efe737746d6da8e4819f41b6e4069c4b09d359 (patch)
tree5dc4a23ce0061e509ffd0d54965500c7eefea0bf /include
parent6ad3258cd34295611e871edf5e8474d4aa79af59 (diff)
libcamera: sysfs: Add helper to lookup device firmware node path
A system's firmware description is recorded differently in sysfs depending if the system uses DT or ACPI. Add a helper to abstract this, allowing users not to care which of the two are used. For DT-based systems, the path is the full name of the DT node that represents the device. For ACPI-based systems, the path is the absolute namespace path to the ACPI object that represents the device. In both cases, the path is guaranteed to be unique and persistent as long as the system firmware is not modified. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/sysfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libcamera/internal/sysfs.h b/include/libcamera/internal/sysfs.h
index 247a376a..bc6c1620 100644
--- a/include/libcamera/internal/sysfs.h
+++ b/include/libcamera/internal/sysfs.h
@@ -15,6 +15,8 @@ namespace sysfs {
std::string charDevPath(const std::string &deviceNode);
+std::string firmwareNodePath(const std::string &device);
+
} /* namespace sysfs */
} /* namespace libcamera */