libcamera: media_device: Add hwRevision method

Add a method 'hwRevision' to return the
info.hw_version reported by the driver.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Dafna Hirschfeld
2021-03-09 07:38:27 +01:00
committed by Laurent Pinchart
parent d3cf0fed3e
commit 3b338aa5e7
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -231,6 +231,7 @@ int MediaDevice::populate()
driver_ = info.driver;
model_ = info.model;
version_ = info.media_version;
hwRevision_ = info.hw_revision;
/*
* Keep calling G_TOPOLOGY until the version number stays stable.
@@ -323,6 +324,15 @@ done:
* \return The MediaDevice API version
*/
/**
* \fn MediaDevice::hwRevision()
* \brief Retrieve the media device hardware revision
*
* The hardware revision is in a driver-specific format.
*
* \return The MediaDevice hardware revision
*/
/**
* \fn MediaDevice::entities()
* \brief Retrieve the list of entities in the media graph