lkml.org 
[lkml]   [2008]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH 3/4] ASOC: WM8731 codec: add SPI support as well as I2C
On Wed, Aug 27, 2008 at 05:39:27PM +0800, Bryan Wu wrote:

This looks good, thanks but...

> -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
> +#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) && !defined (CONFIG_SND_SOC_WM8731_SPI)
> if (setup->i2c_address) {
> normal_i2c[0] = setup->i2c_address;
> codec->hw_write = (hw_write_t)i2c_master_send;
> @@ -688,8 +745,14 @@ static int wm8731_probe(struct platform_device *pdev)
> if (ret != 0)
> printk(KERN_ERR "can't add i2c driver");
> }
> +#elif defined (CONFIG_SPI_MASTER) && defined (CONFIG_SND_SOC_WM8731_SPI)
> + codec->hw_write = (hw_write_t)wm8731_spi_write;
> + ret = spi_register_driver(&wm8731_spi_driver);
> + if (ret != 0)
> + printk(KERN_ERR "can't add spi driver");

...as for the SSM2602 it'd be good if it were possible to build a kernel
which supports both I2C and SPI. If you like I could do this for you -
there's likely to be merge issues due to the update to the new I2C API
anyway?


\
 
 \ /
  Last update: 2008-08-27 13:05    [W:0.114 / U:4.992 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site