Linux Input/HID development
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
	linux-input@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: [PATCHv3 09/15] ARM: at91: sam9rlek add touchscreen support through at91_adc
Date: Tue, 15 Apr 2014 12:28:04 +0200	[thread overview]
Message-ID: <1397557690-5650-10-git-send-email-alexandre.belloni@free-electrons.com> (raw)
In-Reply-To: <1397557690-5650-1-git-send-email-alexandre.belloni@free-electrons.com>

at91_adc now supports reading a touchscreen for ADCs without a TSMR register.
Enable touchscreen support through at91_adc. This allows to use both a
touchscreen and the remaining ADC channel at the same time.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/board-sam9rlek.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 604eecf6cd70..35d420247e25 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -18,6 +18,7 @@
 #include <linux/clk.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
+#include <linux/platform_data/at91_adc.h>
 
 #include <video/atmel_lcdc.h>
 
@@ -239,6 +240,17 @@ static struct at91_tsadcc_data ek_tsadcc_data = {
 
 
 /*
+ * ADC + Touchscreen
+ */
+static struct at91_adc_data ek_adc_data = {
+	.channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5),
+	.use_external_triggers = true,
+	.vref = 3300,
+	.touchscreen_type = ATMEL_ADC_TOUCHSCREEN_4WIRE,
+};
+
+
+/*
  * GPIO Buttons
  */
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
@@ -312,6 +324,8 @@ static void __init ek_board_init(void)
 	at91_add_device_ac97(&ek_ac97_data);
 	/* Touch Screen Controller */
 	at91_add_device_tsadcc(&ek_tsadcc_data);
+	/* Touch Screen Controller + ADC */
+	at91_add_device_adc(&ek_adc_data);
 	/* LEDs */
 	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
 	/* Push Buttons */
-- 
1.8.3.2

  parent reply	other threads:[~2014-04-15 10:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 10:27 [PATCHv3 00/15] iio: adc: at91 cleanups and atmel_tsadcc removal Alexandre Belloni
2014-04-15 10:27 ` [PATCHv3 01/15] ARM: at91: sam9g45: remove unused platform_data Alexandre Belloni
2014-04-15 10:27 ` [PATCHv3 02/15] ARM: at91: sam9260: " Alexandre Belloni
2014-04-15 10:27 ` [PATCHv3 03/15] iio: adc: at91: cleanup platform_data Alexandre Belloni
2014-04-15 10:27 ` [PATCHv3 04/15] iio: adc: at91_adc: Add support for touchscreens without TSMR Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 05/15] ARM: at91: sam9m10g45ek: Add touchscreen support through at91_adc Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 06/15] iio: adc: at91: remove unused include from include/mach Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 07/15] iio: adc: at91: add sam9rl support Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 08/15] ARM: at91: sam9rl: add at91_adc to support adc and touchscreen Alexandre Belloni
2014-04-15 10:28 ` Alexandre Belloni [this message]
2014-04-15 10:28 ` [PATCHv3 10/15] ARM: at91: sam9g45: switch from atmel_tsadcc to at91_adc Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 11/15] ARM: at91: sam9rl: " Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 12/15] ARM: at91: remove atmel_tsadcc from sama5_defconfig Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 13/15] Input: atmel_tsadcc: remove driver Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 14/15] ARM: at91: remove atmel_tsadcc platform_data Alexandre Belloni
2014-04-15 10:28 ` [PATCHv3 15/15] ARM: at91/dt: at91-cosino_mega2560 remove useless tsadcc node Alexandre Belloni

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=1397557690-5650-10-git-send-email-alexandre.belloni@free-electrons.com \
    --to=alexandre.belloni@free-electrons.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    /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