libcamera
v0.3.2+116-83c5ad0f
Supporting cameras in Linux since 2019
|
Miscellaneous utility functions to access sysfs. More...
#include <string>
Go to the source code of this file.
Namespaces | |
libcamera | |
Top-level libcamera namespace. | |
Functions | |
std::string | libcamera::sysfs::charDevPath (const std::string &deviceNode) |
Retrieve the sysfs path for a character device. More... | |
std::string | libcamera::sysfs::firmwareNodePath (const std::string &device) |
Retrieve the path of the firmware node for a device. More... | |
Miscellaneous utility functions to access sysfs.
std::string libcamera::sysfs::charDevPath | ( | const std::string & | deviceNode | ) |
Retrieve the sysfs path for a character device.
[in] | deviceNode | Path to character device node |
std::string libcamera::sysfs::firmwareNodePath | ( | const std::string & | device | ) |
Retrieve the path of the firmware node for a device.
[in] | device | Path in sysfs to search |
Physical devices in a system are described by the system firmware. Depending on the type of platform, devices are identified using different naming schemes. The Linux kernel abstract those differences with "firmware nodes". This function retrieves the firmware node path corresponding to the device.
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.