diff options
author | Susheel Yadagiri <syadagir@codeaurora.org> | 2010-08-26 14:44:23 -0700 |
---|---|---|
committer | Susheel Yadagiri <syadagir@codeaurora.org> | 2010-08-26 14:44:23 -0700 |
commit | f5823d9512234def21078c2684d22211f54e4894 (patch) | |
tree | 639eb44280d0483d89406cda1ff322a706a12a70 | |
parent | a91626e8deda068d59dc0aa5bb3b5545815b34a3 (diff) | |
download | bionic-f5823d9512234def21078c2684d22211f54e4894.zip bionic-f5823d9512234def21078c2684d22211f54e4894.tar.gz bionic-f5823d9512234def21078c2684d22211f54e4894.tar.bz2 |
bionic: Add msm_adc.h from kernel dir for usermode access.
Change-Id: Id70814864d62e91a0bfc5dd83c9e6f64d18cc9a3
-rw-r--r-- | libc/kernel/common/linux/msm_adc.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libc/kernel/common/linux/msm_adc.h b/libc/kernel/common/linux/msm_adc.h new file mode 100644 index 0000000..311bbb7 --- /dev/null +++ b/libc/kernel/common/linux/msm_adc.h @@ -0,0 +1,59 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __MSM_ADC_H +#define __MSM_ADC_H + +#define MSM_ADC_MAX_CHAN_STR 64 + +#define MSM_ADC_DEV_MAX_INFLIGHT 9 + +#define MSM_ADC_IOCTL_CODE 0x90 + +struct msm_adc_conversion { + + uint32_t chan; + + int result; +}; + +#define MSM_ADC_REQUEST _IOWR(MSM_ADC_IOCTL_CODE, 1, struct msm_adc_conversion) + +#define MSM_ADC_AIO_REQUEST _IOWR(MSM_ADC_IOCTL_CODE, 2, struct msm_adc_conversion) + +#define MSM_ADC_AIO_REQUEST_BLOCK_RES _IOWR(MSM_ADC_IOCTL_CODE, 3, struct msm_adc_conversion) + +#define MSM_ADC_AIO_POLL _IOR(MSM_ADC_IOCTL_CODE, 4, uint32_t) + +struct msm_adc_aio_result { + uint32_t chan; + int result; +}; + +#define MSM_ADC_AIO_READ _IOR(MSM_ADC_IOCTL_CODE, 5, struct msm_adc_aio_result) + +struct msm_adc_lookup { + + char name[MSM_ADC_MAX_CHAN_STR]; + + uint32_t chan_idx; +}; + +#define MSM_ADC_LOOKUP _IOWR(MSM_ADC_IOCTL_CODE, 6, struct msm_adc_lookup) + +struct msm_adc_platform_data { + uint32_t num_adc; + uint32_t chan_per_adc; + char **dev_names; +}; + +#endif + |