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 Mar 24, 2024
1 parent e4b28f6 commit d79ba89
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 @@ -87,20 +87,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 @@ -138,8 +124,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 d79ba89

Please sign in to comment.