* [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry
@ 2007-05-22 17:22 andrzej zaborowski
2007-05-22 23:40 ` David Brownell
2007-05-25 0:31 ` Tony Lindgren
0 siblings, 2 replies; 5+ messages in thread
From: andrzej zaborowski @ 2007-05-22 17:22 UTC (permalink / raw)
To: Linux OMAP ML
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
The TSC2102 option in drivers/input/touchscreen/Kconfig got lost
somewhere in January (although the commit is not visible in git-web),
so adding it back. Also remove the input_dev.dev assignment due to an
upstream change.
Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
[-- Attachment #2: 0004-Re-add-a-lost-TSC2102-touchscreen-Kconfig-entry.txt --]
[-- Type: text/plain, Size: 2052 bytes --]
From 492e5cbe39613f06b8146c12bff9500259739fd5 Mon Sep 17 00:00:00 2001
From: Andrzej Zaborowski <balrog@zabor.org>
Date: Tue, 22 May 2007 20:08:47 +0200
Subject: [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry.
The TSC2102 option in drivers/input/touchscreen/Kconfig got lost somewhere
in January (although the commit is not visible in git-web), so adding it
back. Also remove the input_dev.dev assignment due to an upstream change.
---
drivers/input/touchscreen/Kconfig | 15 +++++++++++++++
drivers/input/touchscreen/tsc2102_ts.c | 1 -
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 58fe796..acd0dff 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -164,6 +164,21 @@ config TOUCHSCREEN_UCB1400
To compile this driver as a module, choose M here: the
module will be called ucb1400_ts.
+config TOUCHSCREEN_TSC2102
+ tristate "TSC 2102 based touchscreens"
+ depends on SPI_MASTER
+ select SPI_TSC2102
+ help
+ Say Y here if you have a touchscreen interface using the
+ TI TSC 2102 controller, and your board-specific initialization
+ code includes that in its table of SPI devices. Also make
+ sure the proper SPI controller is selected.
+
+ If unsure, say N (but it's safe to say "Y").
+
+ To compile this driver as a module, choose M here: the
+ module will be called tsc2102_ts.
+
config TOUCHSCREEN_TSC2301
tristate "TSC2301 touchscreen support"
depends on SPI_TSC2301
diff --git a/drivers/input/touchscreen/tsc2102_ts.c b/drivers/input/touchscreen/tsc2102_ts.c
index 8188263..b6ed927 100644
--- a/drivers/input/touchscreen/tsc2102_ts.c
+++ b/drivers/input/touchscreen/tsc2102_ts.c
@@ -81,7 +81,6 @@ static int tsc2102_ts_probe(struct platform_device *pdev)
}
dev->name = "TSC2102 Touchscreen";
- dev->dev = &pdev->dev;
dev->cdev.dev = &pdev->dev;
dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
dev->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
--
1.4.4.3
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry
2007-05-22 17:22 [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry andrzej zaborowski
@ 2007-05-22 23:40 ` David Brownell
2007-05-23 15:41 ` Tony Lindgren
2007-05-23 23:54 ` andrzej zaborowski
2007-05-25 0:31 ` Tony Lindgren
1 sibling, 2 replies; 5+ messages in thread
From: David Brownell @ 2007-05-22 23:40 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: linux-omap-open-source
On Tuesday 22 May 2007, andrzej zaborowski wrote:
> The TSC2102 option in drivers/input/touchscreen/Kconfig got lost
> somewhere in January (although the commit is not visible in git-web),
> so adding it back.
I noticed that ... by the way, it looked to me like it should be
very possible to make this TSC2102 touchscreen code work on the
TSC2101 too. I think someone should
- Make such a common touchscreen core (maybe there's stuff to
be borrowed from the tsc2301 touchscreen too, but not all
the relevant page 1 registers are the same on tsc2301).
- Move more of the IRQ handling logic from tsc2102.c into the
shared touchscreen code ... have it manage irqs etc, it can
get the number from a platform_device resource as usual.
- Have proper hwmon support for the other ADC devices on the
two chips (battery, aux, and temp sensors ... the chips have
different numbers of each).
Looks tricky to safely split touchscreen ADC client code
from the hwmon sensors, so I'd suggest keeping it together
in one module. (That's what ads7846 does, FWIW.)
Looks to me like other than the audio support (which should also
probably convert to use the new sound/soc/* framework), large parts
of the tsc2101 and tsc2102 drivers should be identical. There
are a few bits that would need to have "switch(chiptype){...}",
but core code can -- should! -- be the same.
- Dave
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry
2007-05-22 23:40 ` David Brownell
@ 2007-05-23 15:41 ` Tony Lindgren
2007-05-23 23:54 ` andrzej zaborowski
1 sibling, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2007-05-23 15:41 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
* David Brownell <david-b@pacbell.net> [070522 16:42]:
> On Tuesday 22 May 2007, andrzej zaborowski wrote:
> > The TSC2102 option in drivers/input/touchscreen/Kconfig got lost
> > somewhere in January (although the commit is not visible in git-web),
> > so adding it back.
>
> I noticed that ...
The git automerge has been causing issues... And I may have missed
something with manual merges.
The manual merge issues are mostly solved now in git 1.5, as
git-mergetool is able to use kdiff3 to resolve conflicts.
To use it, just git-mergetool on that file while merging,
thanks again Paul for the tip!
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry
2007-05-22 23:40 ` David Brownell
2007-05-23 15:41 ` Tony Lindgren
@ 2007-05-23 23:54 ` andrzej zaborowski
1 sibling, 0 replies; 5+ messages in thread
From: andrzej zaborowski @ 2007-05-23 23:54 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
On 23/05/07, David Brownell <david-b@pacbell.net> wrote:
> On Tuesday 22 May 2007, andrzej zaborowski wrote:
> > The TSC2102 option in drivers/input/touchscreen/Kconfig got lost
> > somewhere in January (although the commit is not visible in git-web),
> > so adding it back.
>
> I noticed that ... by the way, it looked to me like it should be
> very possible to make this TSC2102 touchscreen code work on the
> TSC2101 too. I think someone should
>
> - Make such a common touchscreen core (maybe there's stuff to
> be borrowed from the tsc2301 touchscreen too, but not all
> the relevant page 1 registers are the same on tsc2301).
>
> - Move more of the IRQ handling logic from tsc2102.c into the
> shared touchscreen code ... have it manage irqs etc, it can
> get the number from a platform_device resource as usual.
I would insist on keeping all direct register access in a single file
- it makes life a lot easier. The register access functions alone can
be split out easily though.
>
> - Have proper hwmon support for the other ADC devices on the
> two chips (battery, aux, and temp sensors ... the chips have
> different numbers of each).
This part shouldn't be difficult.
>
> Looks tricky to safely split touchscreen ADC client code
> from the hwmon sensors, so I'd suggest keeping it together
> in one module. (That's what ads7846 does, FWIW.)
Right, so optimally I'd have all tsc210x_read/write calls in only one
file (e.g. tsc210x.c) and that would be the same file that handles the
IRQ. tsc2102_ts.c doesn't have any 2102 specific code and can be
reused also for 2301.
>
> Looks to me like other than the audio support (which should also
> probably convert to use the new sound/soc/* framework), large parts
Converting to ASoC was precisely what I intended to try doing
yesterday but I hit my MMC/SD not working and with no UART or network
on my board I'm going to come back to this some other day.
Regards,
Andrzej
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry
2007-05-22 17:22 [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry andrzej zaborowski
2007-05-22 23:40 ` David Brownell
@ 2007-05-25 0:31 ` Tony Lindgren
1 sibling, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2007-05-25 0:31 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: Linux OMAP ML
* andrzej zaborowski <balrogg@gmail.com> [070522 10:23]:
> The TSC2102 option in drivers/input/touchscreen/Kconfig got lost
> somewhere in January (although the commit is not visible in git-web),
> so adding it back. Also remove the input_dev.dev assignment due to an
> upstream change.
Pushing today.
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-25 0:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-22 17:22 [PATCH] Re-add a lost TSC2102 touchscreen Kconfig entry andrzej zaborowski
2007-05-22 23:40 ` David Brownell
2007-05-23 15:41 ` Tony Lindgren
2007-05-23 23:54 ` andrzej zaborowski
2007-05-25 0:31 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox