Open
Description
The code inside quad_tracking function is ambiguous to me. It reads in current master :
int quad_tracking(bool enable)
{
struct iio_channel *chn =
iio_device_find_channel(dev_phy, "voltage0", enable);
if (chn == NULL)
return -ENODEV;
iio_channel_attr_write(chn, "quadrature_tracking_en", "0");
chn = iio_device_find_channel(dev_phy_slave, "voltage0", enable);
if (chn == NULL)
return -ENODEV;
iio_channel_attr_write(chn, "quadrature_tracking_en", "0");
return 0;
}
So the enable
parameter is used for selecting the channel direction (tx or rx) when calling iio_device_find_channel
, while I guess the meaning was to use it to configure the value to send in iio_channel_attr_write
. All the more since quadrature_tracking_en
is only a RX channel attr.
Since it is only called later with 0
for the enable
parameter, it does not manifest as a bug.
Do you confirm ?
Metadata
Metadata
Assignees
Labels
No labels