On 05/23/2012 02:17 PM, Alan Ott wrote:
> ---
>  arch/arm/mach-omap2/board-am335xevm.c |   25 +++++++++++++++++++++++++
>  1 files changed, 25 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-am335xevm.c 
> b/arch/arm/mach-omap2/board-am335xevm.c
> index 36efca1..84daf62 100644
> --- a/arch/arm/mach-omap2/board-am335xevm.c
> +++ b/arch/arm/mach-omap2/board-am335xevm.c
> @@ -1836,6 +1836,20 @@ static void tt3201_init(int evm_id, int profile)
>  
>       am33xx_d_can_init(1);
>  }
> +
> +static struct spi_board_info am335x_spidev1_info[] = {
> +     {
> +             .modalias      = "spidev",
> +             .platform_data = NULL,
> +             .irq           = 0,
> +             .max_speed_hz  = 12000000,
> +             .bus_num       = 2,
> +             .mode          = SPI_MODE_1,
> +             .chip_select   = 0,
> +     },
> +};
> +
> +
>  static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void 
> *context)
>  {
>       capecount++;
> @@ -2143,6 +2157,16 @@ static void spi1_init(int evm_id, int profile)
>       return;
>  }
>  
> +/* setup spidev */
> +static void spi1_spidev_init(int evm_id, int profile)
> +{
> +     pr_info("Setting up spidev on bus 2\n");
> +
> +     setup_pin_mux(spi1_pin_mux);
> +     spi_register_board_info(am335x_spidev1_info,
> +                     ARRAY_SIZE(am335x_spidev1_info));
> +}
> +
>  
>  static int beaglebone_phy_fixup(struct phy_device *phydev)
>  {
> @@ -2311,6 +2335,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
>       {mmc0_init,     DEV_ON_BASEBOARD, PROFILE_NONE},
>       {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
>       {bonew1_gpio_init, DEV_ON_BASEBOARD, PROFILE_ALL},
> +     {spi1_spidev_init, DEV_ON_BASEBOARD, PROFILE_ALL},
>       {NULL, 0, 0},
>  };
>  

Actaully, that's the wrong patch, sorry. That one attaches the spidev
driver to the SPI device. The idea is the same though. Instead of using
.modalias = "spidev", you'll use the name of the driver you want to use.




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to