On Thu, Mar 18, 2010 at 4:48 PM, Liam Girdwood lrg@slimlogic.co.uk wrote:
On Thu, 2010-03-18 at 16:16 +0800, Barry Song wrote:
This patch extends ad1938 codec driver to support ad1936/7/8/9, ad1936/7 use i2c bus, ad1938/9 use spi bus. The driver is splitted into three: ad193x.h and ad193x.c: common codec driver ad193x-spi.c: ad193x codec spi driver ad193x-i2c.c: ad193x codec i2c driver
Is the new common driver code the same as the original driver minus any I2C/SPI changes ? It's difficult to see if anything else has been changed.
Basically, the codes are same except renaming ad1938 to ad193x.
Btw, have a look at wm8731.c. This driver supports both I2C and SPI and is less churn than splitting out the code into three files.
We have many discussion about a driver to support both spi and i2c in another device(ad714x). At the beginning, the way in wm8731.c is used, then after many comments, people agree splitting the driver to three modules is the best way. If you are interested in it, you may take a look at "input/misc: add Analog Devices AD714x captouch input driver" in linux-input maillist.
Thanks
Liam
-- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk