* Query regarding a IIO consumer touchscreen driver [not found] <54AF6DFA.7040204@gmail.com> @ 2015-01-09 11:32 ` Sanchayan Maity 2015-01-09 16:44 ` Greg KH 0 siblings, 1 reply; 2+ messages in thread From: Sanchayan Maity @ 2015-01-09 11:32 UTC (permalink / raw) To: kernelnewbies Hello, I have been working on a IIO consumer touchscreen driver. On one of our Vybrid modules we use the ADC channels for the touchscreen. I ported an earlier driver in the 3.0 kernel done by my colleague to the recent 3.18/19 kernel to use the IIO based consumer interface. The touchscreen driver is here http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/input/touchscreen/colibri-vf50-ts.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5 The ADC driver with which it interacts is here http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/iio/adc/vf610_adc.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5 Currently, this works in a limited capaicty I would say. One of the problems I have with this driver is that when this driver is used I can't get valid readings for any of the other ADC channels by using something like "cat". I believe this is because of the fact that the workqueue runs a while loop every 10ms and reads the channels. This clearly does not play well with reading of other channels and results in random reads on trying to read other channels, for example the temperature channel. The exact reason I have not figured out here. I was thinking may be a device lock would be required, but, that doesn't help. The workqueue function http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/input/touchscreen/colibri-vf50-ts.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5#n102 The primary read raw function http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/iio/adc/vf610_adc.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5#n449 I was thinking this would need a better design than what has been done? Can someone give some suggestions as what would be the right design/architecture here. I was thinking if setting up a IIO ring buffer, pushing the readings to it and then reading from the touchscreen driver would work. One of the aims is also to make it clean enough for eventual submission to the mainline. Thanks & Regards, Sanchayan Maity. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Query regarding a IIO consumer touchscreen driver 2015-01-09 11:32 ` Query regarding a IIO consumer touchscreen driver Sanchayan Maity @ 2015-01-09 16:44 ` Greg KH 0 siblings, 0 replies; 2+ messages in thread From: Greg KH @ 2015-01-09 16:44 UTC (permalink / raw) To: kernelnewbies On Fri, Jan 09, 2015 at 05:02:14PM +0530, Sanchayan Maity wrote: > Hello, > > I have been working on a IIO consumer touchscreen driver. On one of our Vybrid modules we use the ADC channels for > the touchscreen. I ported an earlier driver in the 3.0 kernel done by my colleague to the recent 3.18/19 kernel to > use the IIO based consumer interface. > > The touchscreen driver is here > http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/input/touchscreen/colibri-vf50-ts.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5 > > The ADC driver with which it interacts is here > http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/iio/adc/vf610_adc.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5 > > Currently, this works in a limited capaicty I would say. One of the problems I have with this driver is that when > this driver is used I can't get valid readings for any of the other ADC channels by using something like "cat". I > believe this is because of the fact that the workqueue runs a while loop every 10ms and reads the channels. This > clearly does not play well with reading of other channels and results in random reads on trying to read other channels, > for example the temperature channel. The exact reason I have not figured out here. I was thinking may be a device > lock would be required, but, that doesn't help. > > The workqueue function > http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/input/touchscreen/colibri-vf50-ts.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5#n102 > > The primary read raw function > http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/iio/adc/vf610_adc.c?h=toradex_vf_3.18-next&id=7142dd741e948e1536632f9db1f3dd3a015450a5#n449 > > I was thinking this would need a better design than what has been done? Can someone give some suggestions as what > would be the right design/architecture here. I was thinking if setting up a IIO ring buffer, pushing the readings > to it and then reading from the touchscreen driver would work. One of the aims is also to make it clean enough for > eventual submission to the mainline. Why not ask this on the iio mailing list instead? The developers there should be able to help you out much better than the people on kernelnewbies. hope this helps, greg k-h ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-09 16:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <54AF6DFA.7040204@gmail.com>
2015-01-09 11:32 ` Query regarding a IIO consumer touchscreen driver Sanchayan Maity
2015-01-09 16:44 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).