From 76b6ef85cded5e576dca6cd2840aeb0da9512287 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 6 Aug 2020 05:17:59 +0300 Subject: 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 Signed-off-by: Tomi Valkeinen --- py/pykms/pykmsbase.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'py/pykms/pykmsbase.cpp') 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()) .def(py::init()) .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 where T is non-copyable, and complains: -- cgit v1.2.3