Skip to content

Commit fe9be81

Browse files
committed
adi: adf4371: add debugfs support
Add support for direct register access within the adf4371 pyadi implementation. Signed-off-by: Antoniu Miclaus <[email protected]>
1 parent a073555 commit fe9be81

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

adi/adf4371.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,12 @@ def rf32_frequency(self, value):
148148
def temperature(self):
149149
"""Get the temperature reading"""
150150
return self._get_iio_attr("temp0", "input", False)
151+
152+
def reg_read(self, reg):
153+
"""Direct Register Access via debugfs"""
154+
self._set_iio_debug_attr_str("direct_reg_access", reg, self._ctrl)
155+
return self._get_iio_debug_attr_str("direct_reg_access", self._ctrl)
156+
157+
def reg_write(self, reg, value):
158+
"""Direct Register Access via debugfs"""
159+
self._set_iio_debug_attr_str("direct_reg_access", f"{reg} {value}", self._ctrl)

0 commit comments

Comments
 (0)