Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adi: adf4371: add debugfs support #616

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading