From f5823d9512234def21078c2684d22211f54e4894 Mon Sep 17 00:00:00 2001 From: Susheel Yadagiri Date: Thu, 26 Aug 2010 14:44:23 -0700 Subject: bionic: Add msm_adc.h from kernel dir for usermode access. Change-Id: Id70814864d62e91a0bfc5dd83c9e6f64d18cc9a3 --- libc/kernel/common/linux/msm_adc.h | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 libc/kernel/common/linux/msm_adc.h 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 + -- cgit v1.1