From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/13] eukrea_mbimx27: fix ADS7846 support
Date: Thu, 20 May 2010 08:39:34 +0200 [thread overview]
Message-ID: <20100520063934.GS31199@pengutronix.de> (raw)
In-Reply-To: <1274287568-30253-6-git-send-email-eric@eukrea.com>
On Wed, May 19, 2010 at 06:46:01PM +0200, Eric B?nard wrote:
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> ---
> arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c | 19 ++++++++++++-------
> 1 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c
> index fff6c8d..7ea93e0 100644
> --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c
> +++ b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c
> @@ -35,6 +35,7 @@
> #include <mach/hardware.h>
> #include <mach/mmc.h>
> #include <mach/imx-uart.h>
> +#include <mach/spi.h>
>
> #include "devices.h"
>
> @@ -88,7 +89,6 @@ static int eukrea_mbimx27_pins[] = {
> PA30_PF_CONTRAST,
> PA31_PF_OE_ACD,
> /* SPI1 */
> - PD28_PF_CSPI1_SS0,
> PD29_PF_CSPI1_SCLK,
> PD30_PF_CSPI1_MISO,
> PD31_PF_CSPI1_MOSI,
> @@ -236,7 +236,7 @@ static struct imxuart_platform_data uart_pdata[] = {
> },
> };
>
> -#if defined(CONFIG_TOUCHSCREEN_ADS7846)
> +#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
> || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
>
> #define ADS7846_PENDOWN (GPIO_PORTD | 25)
> @@ -247,7 +247,6 @@ static void ads7846_dev_init(void)
> printk(KERN_ERR "can't get ads746 pen down GPIO\n");
> return;
> }
> -
> gpio_direction_input(ADS7846_PENDOWN);
> }
>
> @@ -260,7 +259,9 @@ static struct ads7846_platform_data ads7846_config __initdata = {
> .get_pendown_state = ads7846_get_pendown_state,
> .keep_vref_on = 1,
> };
> +#endif
>
> +#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
> static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
> [0] = {
> .modalias = "ads7846",
> @@ -305,15 +306,19 @@ void __init eukrea_mbimx27_baseboard_init(void)
> mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data);
> mxc_register_device(&mxc_sdhc_device0, NULL);
>
> -#if defined(CONFIG_TOUCHSCREEN_ADS7846)
> +#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
> || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
> - /* SPI and ADS7846 Touchscreen controler init */
> - mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
> + /* ADS7846 Touchscreen controler init */
s/controler/controller/
> mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN);
> + ads7846_dev_init();
> +#endif
> +
> +#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
> + /* SPI_CS0 init */
> + mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
> mxc_register_device(&mxc_spi_device0, &eukrea_mbimx27_spi_0_data);
> spi_register_board_info(eukrea_mbimx27_spi_board_info,
> ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
> - ads7846_dev_init();
> #endif
>
> /* Leds configuration */
> --
> 1.6.3.3
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2010-05-20 6:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 16:45 [PATCH 01/13] eukrea_mbimx27-baseboard: fix typo in display name Eric Bénard
2010-05-19 16:45 ` [PATCH 02/13] eukrea_mbimx27-baseboard: add generic-bl and platform-lcd controls Eric Bénard
2010-05-19 16:45 ` [PATCH 03/13] eukrea_mbimx27-baseboard: add timings for DVI output Eric Bénard
2010-05-19 16:45 ` [PATCH 04/13] cpuimx27 and mbimx27: allow fine control of UART4 and SDHC2 usage Eric Bénard
2010-05-19 16:46 ` [PATCH 05/13] mach-cpuimx27: fix QuadUART's IRQ typo in pins'setup Eric Bénard
2010-05-19 16:46 ` [PATCH 06/13] eukrea_mbimx27: fix ADS7846 support Eric Bénard
2010-05-19 16:46 ` [PATCH 07/13] mach-cpuimx27: add USB Host2 and OTG support Eric Bénard
2010-05-19 16:46 ` [PATCH 08/13] mach-cpuimx27: register wdt and w1_master resources Eric Bénard
2010-05-19 16:46 ` [PATCH 09/13] mxcmmc: add card detect through DAT3 possibility Eric Bénard
2010-05-19 16:46 ` [PATCH 10/13] eukrea_mbimx27: use card detect through DAT3 for SDHC1 Eric Bénard
2010-05-19 16:46 ` [PATCH 11/13] MX2X: Add Keypad device definition for MX2X arch Eric Bénard
2010-05-19 16:46 ` [PATCH 12/13] eukrea_mbimx27: add support for the keyboard Eric Bénard
2010-05-19 16:46 ` [PATCH 13/13] mx27_defconfig: update to enable cpuimx27 & mbimx27 Eric Bénard
2010-05-19 17:11 ` [PATCH 09/13] mxcmmc: add card detect through DAT3 possibility Daniel Mack
2010-05-19 17:21 ` Eric Bénard
2010-05-19 17:23 ` Daniel Mack
2010-05-27 17:54 ` [PATCH] " Eric Bénard
2010-05-20 6:39 ` Sascha Hauer [this message]
2010-05-20 7:22 ` [PATCH v2] eukrea_mbimx27: fix ADS7846 support Eric Bénard
2010-05-20 6:33 ` [PATCH 02/13] eukrea_mbimx27-baseboard: add generic-bl and platform-lcd controls Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100520063934.GS31199@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).