My board has two 4ch 8bit I2C-ADC devices for monitoring some board voltages. Now I set up the DT with the driver of my ADC and I have access to the values by sysfs. But sysfs only gives the raw digit values (0-254). I want to write a driver that have access to the ADC, convert the digit values to voltage values and write them to the sysfs.
Is it possible to organize that similar to the gpio-controller?
DT
+-> I2C
| +-> ADC1
| +-> ADC2
+-> MyDriver
+-> Board Voltage (ADC1, ch2)
+-> 5V0-Line (ADC1, ch4)
+-> 3V3-Line (ADC2, ch0)
...
Are there other possibilities to do such things?