Hi
I was looking at the Zephyr for Greybus https://github.com/cfriedt/greybus-for-zephyr/ work, and realized that the actual spec for greybus doesn't actually have support for ADC. My usecase is to use the ADCs on an attached microcontroller as if they are native ADCs on a Linux machine.
I understand this is more complicated than it looks - because unlike a GPIO, or I2C, there's no such thing as a native ADC for the Linux side of things. Have I understood that correctly?
I stumbled into the IIO subsystem for such requirements where there's some analog sensor that would need to be read - but that would not work through a microcontroller like my use case.
If one were to look at adding such support, what would they need? Is this something that's been discussed before? Would love to understand this a bit more, and potentially contribute.
On Thu, May 27, 2021 at 01:32:57PM +0530, Anuj Deshpande wrote:
Hi
I was looking at the Zephyr for Greybus https://github.com/cfriedt/greybus-for-zephyr/ work, and realized that the actual spec for greybus doesn't actually have support for ADC. My usecase is to use the ADCs on an attached microcontroller as if they are native ADCs on a Linux machine.
I understand this is more complicated than it looks - because unlike a GPIO, or I2C, there's no such thing as a native ADC for the Linux side of things. Have I understood that correctly?
I stumbled into the IIO subsystem for such requirements where there's some analog sensor that would need to be read - but that would not work through a microcontroller like my use case.
If one were to look at adding such support, what would they need? Is this something that's been discussed before? Would love to understand this a bit more, and potentially contribute.
This was talked about unofficially when we were creating the protocol and we considered making an IIO driver, or maybe a IIO-HID driver (for the types that HID supports), but it never got very far.
You could always just use the serial class and talk to the device like a "fake serial device" if that works, but then you loose all of the IIO user/kernel api functionality.
So, sorry, there isn't a solution for this yet, but if you wanted to work on creating such a class device, I know I would not object :)
thanks,
greg k-h