On Wed, Aug 29, 2012 at 12:34:26AM +0300, Aaro Koskinen wrote:
> Add platform data to enable i2c-cbus on N8x0. It will be I2C bus #3.
> 
> Signed-off-by: Aaro Koskinen <aaro.koski...@iki.fi>

Acked-by: Felipe Balbi <ba...@ti.com>

> ---
>  arch/arm/mach-omap2/board-n8x0.c |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-n8x0.c 
> b/arch/arm/mach-omap2/board-n8x0.c
> index 677357f..8ea0dea 100644
> --- a/arch/arm/mach-omap2/board-n8x0.c
> +++ b/arch/arm/mach-omap2/board-n8x0.c
> @@ -18,6 +18,7 @@
>  #include <linux/io.h>
>  #include <linux/stddef.h>
>  #include <linux/i2c.h>
> +#include <linux/i2c-cbus.h>
>  #include <linux/spi/spi.h>
>  #include <linux/usb/musb.h>
>  #include <sound/tlv320aic3x.h>
> @@ -42,6 +43,31 @@
>  #define TUSB6010_GPIO_ENABLE 0
>  #define TUSB6010_DMACHAN     0x3f
>  
> +#if defined(CONFIG_I2C_CBUS) || defined(CONFIG_I2C_CBUS_MODULE)
> +static struct i2c_cbus_platform_data n8x0_cbus_data = {
> +     .clk_gpio = 66,
> +     .dat_gpio = 65,
> +     .sel_gpio = 64,
> +};
> +
> +static struct platform_device n8x0_cbus_device = {
> +     .name   = "i2c-cbus",
> +     .id     = 3,
> +     .dev    = {
> +             .platform_data = &n8x0_cbus_data,
> +     },
> +};
> +
> +static void __init n8x0_cbus_init(void)
> +{
> +     platform_device_register(&n8x0_cbus_device);
> +}
> +#else /* CONFIG_I2C_CBUS */
> +static void __init n8x0_cbus_init(void)
> +{
> +}
> +#endif /* CONFIG_I2C_CBUS */
> +
>  #if defined(CONFIG_USB_MUSB_TUSB6010) || 
> defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
>  /*
>   * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
> @@ -681,6 +707,7 @@ static void __init n8x0_init_machine(void)
>       gpmc_onenand_init(board_onenand_data);
>       n8x0_mmc_init();
>       n8x0_usb_init();
> +     n8x0_cbus_init();
>  }
>  
>  MACHINE_START(NOKIA_N800, "Nokia N800")
> -- 
> 1.7.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to