Re: [PATCH 3/4] iio: mxs-lradc: make ADC reads not unschedule touchscreen conversions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.martsenko@xxxxxxxxx>

Reviewed-by: Marek Vasut <marex@xxxxxxx>

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux