Kernel API's for ADC
Hi,
Are there any kernel API's for ADC. I am using NXP IMX6UL processor. I have to read ADC values in kernel space instead of sysfs/userspace.
Thanks and Regards,
Chandrasekhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180725/637762b8/attachment.html>
Quoted 6 lines · chandrasekhar
Hi,
Are there any kernel API's for ADC. I am using NXP IMX6UL processor. I have to read ADC values in kernel space instead of sysfs/userspace.
It depends on the type of driver used. Either input or IIO.
The sysfs interface for IIO is described here:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
thanks,
Daniel.
Not on the sysfs interface. I want to read the ADC using kernel API's in kernel space.
Thanks and Regards,
Chandrasekhar
-----Original Message-----
From: Daniel Baluta [mailto:daniel.baluta at gmail.com]
Sent: Wednesday, July 25, 2018 4:37 PM
To: chandrasekhar
Cc: Kernelnewbies
Subject: Re: Kernel API's for ADC
Quoted 5 lines · chandrasekhar
Hi,
Are there any kernel API's for ADC. I am using NXP IMX6UL processor. I
have
Quoted 1 line
to read ADC values in kernel space instead of sysfs/userspace.
It depends on the type of driver used. Either input or IIO.
The sysfs interface for IIO is described here:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
thanks,
Daniel.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Quoted 2 lines · chandrasekhar
Not on the sysfs interface. I want to read the ADC using kernel API's in kernel space.
For your specific driver and device, or for "any" driver/device?
And why do you need this, what are you going to do with that information?
thanks,
greg k-h
I am using freescale IMX6UL processor. I have to do it in kernel space, I have a thermal printer attached to the processor and I have to continuously monitor temperature of the printer head inorder to change he printing time values.
So based on the temperature values I have to decide dynamically how much the printing time should be or if it reaches threshold I will throw a error. We already wrote a driver which involves SPI communication, motor rotation and strobe(heating the paper) handling in driver, within the same driver I want the temperature/ADC reading has to be done.
Thanks and Regards,
Chandrasekhar
-----Original Message-----
From: Greg KH [mailto:greg at kroah.com]
Sent: Wednesday, July 25, 2018 7:17 PM
To: chandrasekhar
Cc: 'Daniel Baluta'; 'Kernelnewbies'
Subject: Re: Kernel API's for ADC
Quoted 2 lines · chandrasekhar
Not on the sysfs interface. I want to read the ADC using kernel API's in kernel space.
For your specific driver and device, or for "any" driver/device?
And why do you need this, what are you going to do with that information?
thanks,
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Quoted 9 lines · chandrasekhar
I am using freescale IMX6UL processor. I have to do it in kernel space, I have a thermal printer attached to the processor and I have to continuously monitor temperature of the printer head inorder to change he printing time values.
So based on the temperature values I have to decide dynamically how much the printing time should be or if it reaches threshold I will throw a error. We already wrote a driver which involves SPI communication, motor rotation and strobe(heating the paper) handling in driver, within the same driver I want the temperature/ADC reading has to be done.
Great, then add to your driver the reading of the adc device and properly handle it there in the driver itself. You don't have to go outside of the kernel at all or even outside of your driver.
And good luck with your driver, I wrote firmware for printers like this over 20 years ago, it's a fun problem space to work in.
greg k-h