aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2008-10-12 23:30:17 -0400
committerBryan Wu <cooloney@kernel.org>2008-10-12 23:30:17 -0400
commit46aa04f9b678d1d6f3558429109326775ca87715 (patch)
tree6f2b6b9a60513f51516b0c3ecf46486ce7914279 /arch/blackfin/mach-bf537
parent58c35bd31f8b577e03d904c214b55b3d91369a85 (diff)
Blackfin arch: AD7879 Touchscreen driver
Add AD7879 Touchscreen driver to the device structures Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index ccfa08801840..dc5a30849c15 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -51,7 +51,6 @@
51#include <asm/reboot.h> 51#include <asm/reboot.h>
52#include <asm/portmux.h> 52#include <asm/portmux.h>
53#include <asm/dpmc.h> 53#include <asm/dpmc.h>
54#include <linux/spi/ad7877.h>
55 54
56/* 55/*
57 * Name the Board for the /proc/cpuinfo 56 * Name the Board for the /proc/cpuinfo
@@ -555,6 +554,7 @@ static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
555#endif 554#endif
556 555
557#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 556#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
557#include <linux/spi/ad7877.h>
558static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 558static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
559 .enable_dma = 0, 559 .enable_dma = 0,
560 .bits_per_word = 16, 560 .bits_per_word = 16,
@@ -575,6 +575,28 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
575}; 575};
576#endif 576#endif
577 577
578#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
579#include <linux/spi/ad7879.h>
580static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
581 .enable_dma = 0,
582 .bits_per_word = 16,
583};
584
585static const struct ad7879_platform_data bfin_ad7879_ts_info = {
586 .model = 7879, /* Model = AD7879 */
587 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
588 .pressure_max = 10000,
589 .pressure_min = 0,
590 .first_conversion_delay = 3, /* wait 512us before do a first conversion */
591 .acquisition_time = 1, /* 4us acquisition time per sample */
592 .median = 2, /* do 8 measurements */
593 .averaging = 1, /* take the average of 4 middle samples */
594 .pen_down_acc_interval = 255, /* 9.4 ms */
595 .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */
596 .gpio_default = 1, /* During initialization set GPIO = HIGH */
597};
598#endif
599
578#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 600#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
579static struct bfin5xx_spi_chip spidev_chip_info = { 601static struct bfin5xx_spi_chip spidev_chip_info = {
580 .enable_dma = 0, 602 .enable_dma = 0,
@@ -728,6 +750,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
728 .controller_data = &spi_ad7877_chip_info, 750 .controller_data = &spi_ad7877_chip_info,
729 }, 751 },
730#endif 752#endif
753#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
754 {
755 .modalias = "ad7879",
756 .platform_data = &bfin_ad7879_ts_info,
757 .irq = IRQ_PF7,
758 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
759 .bus_num = 0,
760 .chip_select = 1,
761 .controller_data = &spi_ad7879_chip_info,
762 .mode = SPI_CPHA | SPI_CPOL,
763 },
764#endif
731#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 765#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
732 { 766 {
733 .modalias = "spidev", 767 .modalias = "spidev",
@@ -742,7 +776,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
742 .modalias = "bfin-lq035q1-spi", 776 .modalias = "bfin-lq035q1-spi",
743 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 777 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
744 .bus_num = 0, 778 .bus_num = 0,
745 .chip_select = 1, 779 .chip_select = 2,
746 .controller_data = &lq035q1_spi_chip_info, 780 .controller_data = &lq035q1_spi_chip_info,
747 .mode = SPI_CPHA | SPI_CPOL, 781 .mode = SPI_CPHA | SPI_CPOL,
748 }, 782 },
@@ -799,7 +833,7 @@ static struct platform_device bfin_fb_adv7393_device = {
799 833
800static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 834static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
801 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, 835 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
802 .use_bl = 1, 836 .use_bl = 0, /* let something else control the LCD Blacklight */
803 .gpio_bl = GPIO_PF7, 837 .gpio_bl = GPIO_PF7,
804}; 838};
805 839