kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Kernel API's for ADC
@ 2018-07-25 10:25 chandrasekhar
  2018-07-25 11:07 ` Daniel Baluta
  0 siblings, 1 reply; 6+ messages in thread
From: chandrasekhar @ 2018-07-25 10:25 UTC (permalink / raw)
  To: kernelnewbies

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Kernel API's for ADC
  2018-07-25 10:25 Kernel API's for ADC chandrasekhar
@ 2018-07-25 11:07 ` Daniel Baluta
  2018-07-25 11:17   ` chandrasekhar
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Baluta @ 2018-07-25 11:07 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Jul 25, 2018 at 1:25 PM, chandrasekhar <chandrasekhar@evolute.in> wrote:
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Kernel API's for ADC
  2018-07-25 11:07 ` Daniel Baluta
@ 2018-07-25 11:17   ` chandrasekhar
  2018-07-25 13:46     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: chandrasekhar @ 2018-07-25 11:17 UTC (permalink / raw)
  To: kernelnewbies

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

On Wed, Jul 25, 2018 at 1:25 PM, chandrasekhar <chandrasekhar@evolute.in>
wrote:
> 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.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Kernel API's for ADC
  2018-07-25 11:17   ` chandrasekhar
@ 2018-07-25 13:46     ` Greg KH
  2018-07-26  9:13       ` chandrasekhar
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2018-07-25 13:46 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Jul 25, 2018 at 04:47:29PM +0530, chandrasekhar wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Kernel API's for ADC
  2018-07-25 13:46     ` Greg KH
@ 2018-07-26  9:13       ` chandrasekhar
  2018-07-26  9:59         ` 'Greg KH'
  0 siblings, 1 reply; 6+ messages in thread
From: chandrasekhar @ 2018-07-26  9:13 UTC (permalink / raw)
  To: kernelnewbies

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

On Wed, Jul 25, 2018 at 04:47:29PM +0530, chandrasekhar wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Kernel API's for ADC
  2018-07-26  9:13       ` chandrasekhar
@ 2018-07-26  9:59         ` 'Greg KH'
  0 siblings, 0 replies; 6+ messages in thread
From: 'Greg KH' @ 2018-07-26  9:59 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-26  9:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 10:25 Kernel API's for ADC chandrasekhar
2018-07-25 11:07 ` Daniel Baluta
2018-07-25 11:17   ` chandrasekhar
2018-07-25 13:46     ` Greg KH
2018-07-26  9:13       ` chandrasekhar
2018-07-26  9:59         ` 'Greg KH'

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).