Skip to content

Commit

Permalink
adi: adf4371: add debugfs support
Browse files Browse the repository at this point in the history
Add support for direct register access within the adf4371 pyadi
implementation.

Signed-off-by: Antoniu Miclaus <[email protected]>
  • Loading branch information
amiclaus committed Nov 22, 2024
1 parent a073555 commit fe9be81
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions adi/adf4371.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,12 @@ def rf32_frequency(self, value):
def temperature(self):
"""Get the temperature reading"""
return self._get_iio_attr("temp0", "input", False)

def reg_read(self, reg):
"""Direct Register Access via debugfs"""
self._set_iio_debug_attr_str("direct_reg_access", reg, self._ctrl)
return self._get_iio_debug_attr_str("direct_reg_access", self._ctrl)

def reg_write(self, reg, value):
"""Direct Register Access via debugfs"""
self._set_iio_debug_attr_str("direct_reg_access", f"{reg} {value}", self._ctrl)

0 comments on commit fe9be81

Please sign in to comment.