-
Notifications
You must be signed in to change notification settings - Fork 855
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
Move AD2S1210 driver out of staging #2234
Comments
Internal review ongoing. |
Copying the big-picture questions/suggestions from the PR here since they are probably better discussed in an issue (see #2261 for more context): Ideas for additional changes:
|
While un-staging this driver, there might be other braking changes required. While they are in general undesirable, now is the time to do those. And I'm almost sure mainline review will likely as for those as well.
I think the proper IIO way is to use SCALE for that. Make SCALE writable and provide options via SCALE_AVAILABLE to chose different resolutions.
excitation_frequency is better than fexcit. In general this needs to be discussed on the IIO mailing list.
I think this stuff should be moved to the IIO event ABI. In this case they use RAW values and SCALE is used to get to proper units.
IIO_EV_INFO_HYSTERESIS ?
I think we need to be able to control that. Proper naming should be subject of IIO mailing list discussion.
ACK - I think we should support both normal and configuration mode.
/SAMPLE is active low signal. So I think this would make sense.
Sure - mailing list review might ask you this anyways.
Yes, Optional Interrupt support is always desirable.
Yes, triggered buffer support is always desirable. Adding @nunojsa for comments as well. |
In this case, the hysteresis is for damping noise in the position value, so I don't think it works to link it to an event.
|
All of these thresholds are for internal signals in the AD2S1210 chip. Are you saying we should add channels for these internal signals where we can't read the value but can have events? |
This sounds like a good idea, but also tricky because there is only one resolution setting for everything. If you change the scale of the position channel, it will also change the scale of the angle channel as well as the LOT threshold scale. All of these have different scales (and types) so we can't use Perhaps another way to look at this is that the resolution setting depends on the application. It needs to be chosen to fit the maximum speed and/or the minimum precision required for the application. So maybe this is something for devicetree instead? This seems like it is in a gray area between configuration (not appropriate use of devicetree) and describing the hardware (appropriate use of devcietree) but there are properties like Also, regarding the suggestion:
We will already need a device tree property to indicate how the resolution inputs are hard-wired in the case when there are no gpios connected to them. So maybe we just always require this property anyway and only use a fixed resolution described by the devicetree? |
That would work. |
Maybe it's a good idea to propose a device monitoring channel type? |
Fair point
This would work for me as well. |
I also came across #341 which adds a new |
Well - whatever we end up doing it needs to be accepted mainline. |
Upstream recommended using events for the faults so this is the direction I went. The iio maintainer has requested feedback from "someone from Analog" to make sure the proposed changes make sense: https://lore.kernel.org/linux-iio/20230930163209.17ee0020@jic23-huawei/ Could you please take a look @mhennerich or @nunojsa ? |
To summarize the event patches, in the PATCH v3 series, I proposed the following event and register mapping:
What Jonathan has suggested is:
Getting rid of the IMHO, getting rid of the "monitor signal" channel isn't really much of an improvement since it doesn't make for fewer channels or fewer events per channel and we still have to have other "internal" (not really in or out) channels for other events. But really it would be fine either way, I think. |
I really don't have a strong preference here either. One or the other way this needs to be properly documented to make sense and being useful. I understand Jonathan's desire to avoid those 'all or nothing/topsy-turvy' channels, and instead modeling the underlaying behavior as close as possible using existing types. I agree it doesn't make it simpler in this case. |
Move
drivers/staging/iio/resolver/ad2s1210.c
out of staging and integrate into existing drivers as necessary.Tasks
Dependencies
The text was updated successfully, but these errors were encountered: