diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-01-07 10:14:38 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 10:14:38 -0500 |
commit | 5105432a3201e3f0e6c219cd0a74feee1e5e262b (patch) | |
tree | c27a97e6715f599d07a3256add5dccdb824bb30b /arch | |
parent | cc92b870a779500f444419f27bf73c6c7660ff9c (diff) |
Blackfin arch: Add AD7879 defaults for the Blackfin Landscape LCD EZ-Extender
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezbrd.c | 36 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index 6f6ce180910..0314bd3355e 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -288,6 +288,30 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
288 | }; | 288 | }; |
289 | #endif | 289 | #endif |
290 | 290 | ||
291 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) | ||
292 | #include <linux/spi/ad7879.h> | ||
293 | static const struct ad7879_platform_data bfin_ad7879_ts_info = { | ||
294 | .model = 7879, /* Model = AD7879 */ | ||
295 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ | ||
296 | .pressure_max = 10000, | ||
297 | .pressure_min = 0, | ||
298 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ | ||
299 | .acquisition_time = 1, /* 4us acquisition time per sample */ | ||
300 | .median = 2, /* do 8 measurements */ | ||
301 | .averaging = 1, /* take the average of 4 middle samples */ | ||
302 | .pen_down_acc_interval = 255, /* 9.4 ms */ | ||
303 | .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */ | ||
304 | .gpio_default = 1, /* During initialization set GPIO = HIGH */ | ||
305 | }; | ||
306 | #endif | ||
307 | |||
308 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
309 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
310 | .enable_dma = 0, | ||
311 | .bits_per_word = 16, | ||
312 | }; | ||
313 | #endif | ||
314 | |||
291 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 315 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
292 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 316 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
293 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | 317 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { |
@@ -386,6 +410,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
386 | .controller_data = &spi_ad7877_chip_info, | 410 | .controller_data = &spi_ad7877_chip_info, |
387 | }, | 411 | }, |
388 | #endif | 412 | #endif |
413 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
414 | { | ||
415 | .modalias = "ad7879", | ||
416 | .platform_data = &bfin_ad7879_ts_info, | ||
417 | .irq = IRQ_PG0, | ||
418 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | ||
419 | .bus_num = 0, | ||
420 | .chip_select = 5, | ||
421 | .controller_data = &spi_ad7879_chip_info, | ||
422 | .mode = SPI_CPHA | SPI_CPOL, | ||
423 | }, | ||
424 | #endif | ||
389 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 425 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
390 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 426 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
391 | { | 427 | { |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 28cb8f1a39e..9454fb7b18c 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -534,6 +534,30 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
534 | }; | 534 | }; |
535 | #endif | 535 | #endif |
536 | 536 | ||
537 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) | ||
538 | #include <linux/spi/ad7879.h> | ||
539 | static const struct ad7879_platform_data bfin_ad7879_ts_info = { | ||
540 | .model = 7879, /* Model = AD7879 */ | ||
541 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ | ||
542 | .pressure_max = 10000, | ||
543 | .pressure_min = 0, | ||
544 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ | ||
545 | .acquisition_time = 1, /* 4us acquisition time per sample */ | ||
546 | .median = 2, /* do 8 measurements */ | ||
547 | .averaging = 1, /* take the average of 4 middle samples */ | ||
548 | .pen_down_acc_interval = 255, /* 9.4 ms */ | ||
549 | .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */ | ||
550 | .gpio_default = 1, /* During initialization set GPIO = HIGH */ | ||
551 | }; | ||
552 | #endif | ||
553 | |||
554 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
555 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
556 | .enable_dma = 0, | ||
557 | .bits_per_word = 16, | ||
558 | }; | ||
559 | #endif | ||
560 | |||
537 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 561 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
538 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 562 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
539 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | 563 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { |
@@ -624,6 +648,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
624 | .controller_data = &spi_ad7877_chip_info, | 648 | .controller_data = &spi_ad7877_chip_info, |
625 | }, | 649 | }, |
626 | #endif | 650 | #endif |
651 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
652 | { | ||
653 | .modalias = "ad7879", | ||
654 | .platform_data = &bfin_ad7879_ts_info, | ||
655 | .irq = IRQ_PF8, | ||
656 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | ||
657 | .bus_num = 0, | ||
658 | .chip_select = 3, | ||
659 | .controller_data = &spi_ad7879_chip_info, | ||
660 | .mode = SPI_CPHA | SPI_CPOL, | ||
661 | }, | ||
662 | #endif | ||
627 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 663 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
628 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 664 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
629 | { | 665 | { |