]> err.no Git - linux-2.6/blobdiff - arch/blackfin/mach-bf533/boards/stamp.c
[Blackfin] arch: Encourage users to use the spidev character driver: Provide platform...
[linux-2.6] / arch / blackfin / mach-bf533 / boards / stamp.c
index 0185350feacc165768899bd959a4cd946549a53b..a645f6fd091b36a8cd1f6896ef9fa0d0e7d871e5 100644 (file)
@@ -226,6 +226,13 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
 };
 #endif
 
+#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
+static struct bfin5xx_spi_chip spidev_chip_info = {
+       .enable_dma = 0,
+       .bits_per_word = 8,
+};
+#endif
+
 static struct spi_board_info bfin_spi_board_info[] __initdata = {
 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
        {
@@ -312,6 +319,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .mode = SPI_MODE_2,
        },
 #endif
+#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
+       {
+               .modalias = "spidev",
+               .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
+               .bus_num = 0,
+               .chip_select = 1,
+               .controller_data = &spidev_chip_info,
+       },
+#endif
 };
 
 /* SPI (0) */
@@ -423,9 +439,9 @@ static struct platform_device bfin_pata_device = {
 #include <linux/gpio_keys.h>
 
 static struct gpio_keys_button bfin_gpio_keys_table[] = {
-       {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"},
-       {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"},
-       {BTN_2, GPIO_PF8, 1, "gpio-keys: BTN2"},
+       {BTN_0, GPIO_PF5, 0, "gpio-keys: BTN0"},
+       {BTN_1, GPIO_PF6, 0, "gpio-keys: BTN1"},
+       {BTN_2, GPIO_PF8, 0, "gpio-keys: BTN2"},
 };
 
 static struct gpio_keys_platform_data bfin_gpio_keys_data = {