Skip to content

Commit

Permalink
Update ad579x driver
Browse files Browse the repository at this point in the history
Add avail attribute for powerdown.
Remove code_select attribute to be in
synch with the Linux drivers.

Signed-off-by: SGudla <[email protected]>
  • Loading branch information
SaikiranGudla committed Feb 23, 2024
1 parent c1aae75 commit 03c6ca0
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions adi/ad579x.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,6 @@ def sampling_frequency(self):
def sampling_frequency(self, value):
self._set_iio_dev_attr_str("sampling_frequency", value)

@property
def code_select(self):
"""AD579x code format config"""
return self._get_iio_dev_attr_str("code_select")

@code_select.setter
def code_select(self, value):
self._set_iio_dev_attr_str("code_select", value)

@property
def code_select_available(self):
"""AD579x code format available"""
return self._get_iio_dev_attr_str("code_select_available")

class _channel(attribute):
"""AD579x channel"""

Expand Down Expand Up @@ -136,8 +122,13 @@ def scale(self, value):
@property
def powerdown(self):
"""AD579x powerdown config"""
return self._get_iio_attr(self.name, "powerdown", True)
return self._get_iio_attr_str(self.name, "powerdown", True)

@powerdown.setter
def powerdown(self, value):
self._set_iio_attr(self.name, "powerdown", True, value)

@property
def powerdown_available(self):
"""AD579x powedown available"""
return self._get_iio_attr_str(self.name, "powerdown_available", True)

0 comments on commit 03c6ca0

Please sign in to comment.