On 02/22/11 21:13, Michael Hennerich wrote: > On 02/22/2011 03:34 PM, Jonathan Cameron wrote: >> On 02/14/11 14:03, michael.hennerich@xxxxxxxxxx wrote: >> >>> From: Michael Hennerich <michael.hennerich@xxxxxxxxxx> >>> >>> This patch adds support for the >>> AD7298: 8-Channel, 1MSPS, 12-Bit SAR ADC with Temperature Sensor >>> via SPI bus. >>> >>> This patch replaces the existing ad7298.c driver completely. >>> It was necessary since, the old driver did not comply with the >>> IIO ABI for such devices. >>> >> Guess that's one approach to fixing up a driver! >> Anyhow, it's nice and clean now. >> > Rewrite is sometimes easier than fix ;-) > >> Couple of trivial points inline. You may need some locking >> in the temperature read function, fix that or explain what >> I'm missing before sending on to Greg, the other bits are up >> to you. >> > Good point. >> I see the original driver used a busy pin. For the record, could you >> also explain any disadvantages in this new one not doing that? >> > Well the busy pin is only used to for on-die temperature measurements. > The busy time is pretty deterministic, wasting a GPIO or interrupt line > is pointless! > Sleep for at least 100us, does the job. I see no point what this task > could do useful otherwise, > since it would also result in a sleep. > > Last but not least - this is a 8-Channel ADC, the temperature diode is > only the hard wired 9th channel, > with pretty limited use. The busy pin might be useful for none OS 8-bit > micro systems, but here > we simply put the task asleep. Good, that gives us a clean explanation to refer people to if they ask this question in the future. Thanks for clearing that up. ... -- 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