I need to read adc value of lradc channel 0. Is there any sample code? Or how can I do it?
I have i.mx28 evk and use linux.
I checked keyboard driver,
I used below functions for init;
hw_lradc_init_ladder(LRADC_CH1, LRADC_DELAY_TRIGGER_BUTTON, 200); hw_lradc_set_delay_trigger_kick(LRADC_DELAY_TRIGGER_BUTTON, !0);
But I couldn't understand how can I read adc value. In keyboard driver there 2 functions,
raw_button = __raw_readl(devdata->base + HW_LRADC_CHn(devdata->chan)) & BM_LRADC_CHn_VALUE;
vddio = hw_lradc_vddio();
Which one of them should I use?
Retrieving data ...