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

incorrect channel type (in, out, in_out?) #373

Closed
rgetz opened this issue Feb 11, 2020 · 4 comments
Closed

incorrect channel type (in, out, in_out?) #373

rgetz opened this issue Feb 11, 2020 · 4 comments
Assignees

Comments

@rgetz
Copy link
Contributor

rgetz commented Feb 11, 2020

I'm not sure if this is kernel issue or a libiio one.

iio_attr -a -c ad9361-phy out
Using auto-detected IIO context at URI "usb:3.20.5"
dev 'ad9361-phy', channel 'out' (input), attr 'voltage_filter_fir_en', value '0'

an input channel called out?

we have:

in_voltage_filter_fir_en
out_voltage_filter_fir_en

which follow the normal constructs for global voltage[n] attributes, but then we also have:

in_out_voltage_filter_fir_en

which I think effects both inputs and output channels, but might break the kernel ABI? or is libiio just not handling in_out channels?

?

rgetz added a commit that referenced this issue Feb 11, 2020
A few issues (#366, #373)  have popped up recently when
     iio_channel_get_type(ch) == IIO_CHAN_TYPE_UNKNOWN

This helps bring that to the top by easily notifing kernel developers
when they are doing things that aren't understood by the library.

Signed-off-by: Robin Getz <[email protected]>
@mhennerich
Copy link
Contributor

This convention is used for things that are both directions. It's only used once. It's not mainline and thus libiio doesn't handle it. I would have reverted it but I didn't want to break the API.
We have some workaround here:
https://github.com/analogdevicesinc/libad9361-iio/blob/master/ad9361_baseband_auto_rate.c#L64

@rgetz
Copy link
Contributor Author

rgetz commented Feb 11, 2020

OK - I will keep this open until we decide that the "in_out" (bidirectional attributes) are going upstream (and we should extend libiio) or if they aren't (and we should just leave it alone).

-Robin

@rgetz
Copy link
Contributor Author

rgetz commented Feb 13, 2020

Ok - now iio_info gives:

                        out:  (input, WARN:iio_channel_get_type()=UNKNOWN)
                        1 channel-specific attributes found:
                                attr  0: voltage_filter_fir_en value: 0

as a polite reminder...

cristi-iacob pushed a commit to cristi-iacob/libiio that referenced this issue Feb 18, 2020
A few issues (analogdevicesinc#366, analogdevicesinc#373)  have popped up recently when
     iio_channel_get_type(ch) == IIO_CHAN_TYPE_UNKNOWN

This helps bring that to the top by easily notifing kernel developers
when they are doing things that aren't understood by the library.

Signed-off-by: Robin Getz <[email protected]>
@rgetz
Copy link
Contributor Author

rgetz commented Feb 17, 2022

closing - since this is a kernel driver issue.

@rgetz rgetz closed this as completed Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants