From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com ('Greg KH') Date: Thu, 26 Jul 2018 11:59:15 +0200 Subject: Kernel API's for ADC In-Reply-To: <000f01d424c0$de60beb0$9b223c10$@in> References: <000001d42401$cda46fa0$68ed4ee0$@in> <000b01d42409$154ed320$3fec7960$@in> <20180725134643.GA12329@kroah.com> <000f01d424c0$de60beb0$9b223c10$@in> Message-ID: <20180726095915.GA7872@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Jul 26, 2018 at 02:43:07PM +0530, chandrasekhar wrote: > 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