On Saturday, January 17, 2015 at 01:22:10 AM, Kristina Martšenko wrote:
> Reading a channel through sysfs, or starting a buffered capture, can
> occasionally turn off the touchscreen.
> 
> This is because the read_raw() and buffer preenable()/postdisable()
> callbacks unschedule current conversions on all channels. If a delay
> channel happens to schedule a touchscreen conversion at the same time,
> the conversion gets cancelled and the touchscreen sequence stops.
> 
> This is probably related to this note from the reference manual:
> 
>       "If a delay group schedules channels to be sampled and a manual
>       write to the schedule field in CTRL0 occurs while the block is
>       discarding samples, the LRADC will switch to the new schedule
>       and will not sample the channels that were previously scheduled.
>       The time window for this to happen is very small and lasts only
>       while the LRADC is discarding samples."
> 
> So make the callbacks only unschedule conversions for the channels they
> use. This means channel 0 for read_raw() and channels 0-5 for the buffer
> (if the touchscreen is enabled). Since the touchscreen uses different
> channels (6 and 7), it no longer gets turned off.
> 
> This is tested and fixes the issue on i.MX28, but hasn't been tested on
> i.MX23.
> 
> Signed-off-by: Kristina Martšenko <kristina.martse...@gmail.com>

Reviewed-by: Marek Vasut <ma...@denx.de>

Best regards,
Marek Vasut
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to