Hi ,
We are using am335x evm in our custom board and we are using
linux-3.2.0-psp04.06.00.08.sdk
source code in our board.we have APDS-9007 ambient light sensor connected as input to the ADC AIN0 pin on processor. we want to use pin AIN0 of am335x inbuilt adc on am335x.we downloaded the ti_adc driver from arago-project in our kernel source code.we made the neccessary changes in our kernel board file using the guide http://processors.wiki.ti.com/index.php/AM335x_ADC_Driver%27s_Guide.
the folder /sys/bus/iio/devices/ not showing any devices in our filesystem ,i had compile my ti_adc as kernel inbuilt driver and also tried using ti_adc as module.
following are the board file changes in arch/arm/mach-omap2/board-am335xevm.c
static struct adc_data am335x_adc_data = {
.adc_channels = 1,
};
static struct mfd_tscadc_board tscadc = {
.adc_init = &am335x_adc_data,
};
static struct pinmux_config adc_pin_mux[] = {
{"ain0.ain0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
{"ain2.ain2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
{"vrefp.vrefp", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
{"vrefn.vrefn", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
{NULL, 0},
};
when we are inserting driver as module using insmod ,we got the following logs
[ 34.819580] ti_adc: module is from the staging directory, the quality is unknown, you have been warned.
to access adc on am335x is there setting of pin mux we have to do ?
you have any reference code or guide how to use ADC 1 input pin only and how we can read output?
Thanks and Regards
Pavan