summaryrefslogtreecommitdiff
path: root/py/pykms
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-08-06 05:17:59 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2020-08-10 09:44:27 +0300
commit76b6ef85cded5e576dca6cd2840aeb0da9512287 (patch)
tree03761b1ceefea21bf94634ccfe99e514e2f4e0d4 /py/pykms
parent38bee3092f2d477f1baebfcae464f888d3d04bbe (diff)
card: Add a method to retrieve the device minor
The device minor number is needed to access the debugfs directory corresponding to the device. Make it available to users through a dev_minor() method on the Card object. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/pykms')
-rw-r--r--py/pykms/pykmsbase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index c039833..fc72d05 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -24,6 +24,7 @@ void init_pykmsbase(py::module &m)
.def(py::init<const string&>())
.def(py::init<const string&, uint32_t>())
.def_property_readonly("fd", &Card::fd)
+ .def_property_readonly("minor", &Card::dev_minor)
.def_property_readonly("get_first_connected_connector", &Card::get_first_connected_connector)
// XXX pybind11 can't handle vector<T*> where T is non-copyable, and complains: