* [PATCH] psmouse: disable the synaptics extension on OLPC machines.
@ 2010-12-18 5:09 Andres Salomon
2010-12-18 5:49 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Andres Salomon @ 2010-12-18 5:09 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Dmitry Torokhov, linux-input, linux-kernel, dsd, pgf,
James Cameron
OLPC has switched to a Synaptics touchpad. It turns out that it's
pretty useless in absolute mode. This patch looks for an OLPC
system (via DMI tables), and refuses to init Synaptics mode in
that scenario (falling back to relative mode).
Signed-off-by: Andres Salomon <dilinger@queued.net>
---
drivers/input/mouse/synaptics.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 2e300a4..75fbf33 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -744,15 +744,45 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
#endif
};
+static bool broken_olpc_ec;
+
+static const struct dmi_system_id __initconst olpc_dmi_table[] = {
+#if defined(CONFIG_DMI) && defined(CONFIG_OLPC)
+ {
+ /* OLPC XO-1 or XO-1.5 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "OLPC"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
+ },
+ },
+ { }
+#endif
+};
+
void __init synaptics_module_init(void)
{
impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table);
+ broken_olpc_ec = dmi_check_system(olpc_dmi_table);
}
int synaptics_init(struct psmouse *psmouse)
{
struct synaptics_data *priv;
+ /*
+ * The OLPC XO has issues with Synaptics' absolute mode; similarly to
+ * the HGPK, it quickly degrades and the hardware becomes jumpy and
+ * overly sensitive. Not only that, but the constant packet spew
+ * (even at a lowered 40pps rate) overloads the EC such that key
+ * presses on the keyboard are missed. Given all of that, don't
+ * even attempt to use Synaptics mode. Relative mode seems to work
+ * just fine.
+ */
+ if (broken_olpc_ec) {
+ printk(KERN_INFO "synaptics: OLPC XO detected, not enabling Synaptics protocol.\n");
+ return -ENODEV;
+ }
+
psmouse->private = priv = kzalloc(sizeof(struct synaptics_data), GFP_KERNEL);
if (!priv)
return -ENOMEM;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-18 5:09 [PATCH] psmouse: disable the synaptics extension on OLPC machines Andres Salomon
@ 2010-12-18 5:49 ` Dmitry Torokhov
2010-12-18 6:14 ` Andres Salomon
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-12-18 5:49 UTC (permalink / raw)
To: Andres Salomon; +Cc: linux-input, linux-kernel, dsd, pgf, James Cameron
On Fri, Dec 17, 2010 at 09:09:39PM -0800, Andres Salomon wrote:
>
> OLPC has switched to a Synaptics touchpad. It turns out that it's
> pretty useless in absolute mode. This patch looks for an OLPC
> system (via DMI tables), and refuses to init Synaptics mode in
> that scenario (falling back to relative mode).
>
> Signed-off-by: Andres Salomon <dilinger@queued.net>
Andres,
Can we do what hgpk does and add "depend on !OLPC" to the Kconfig
instead?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-18 5:49 ` Dmitry Torokhov
@ 2010-12-18 6:14 ` Andres Salomon
2010-12-18 7:02 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Andres Salomon @ 2010-12-18 6:14 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, dsd, pgf, James Cameron
On Fri, 17 Dec 2010 21:49:28 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Fri, Dec 17, 2010 at 09:09:39PM -0800, Andres Salomon wrote:
> >
> > OLPC has switched to a Synaptics touchpad. It turns out that it's
> > pretty useless in absolute mode. This patch looks for an OLPC
> > system (via DMI tables), and refuses to init Synaptics mode in
> > that scenario (falling back to relative mode).
> >
> > Signed-off-by: Andres Salomon <dilinger@queued.net>
>
> Andres,
>
> Can we do what hgpk does and add "depend on !OLPC" to the Kconfig
> instead?
>
> Thanks.
>
That wouldn't work for distro kernels, unfortunately. Currently the
kernels that OLPC releases disable CONFIG_MOUSE_PS2_SYNAPTICS. I'd
like to use a stock distribution kernel, which would need to enable
both CONFIG_OLPC *and* CONFIG_MOUSE_PS2_SYNAPTICS.. Hence the
motivation for this patch. :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-18 6:14 ` Andres Salomon
@ 2010-12-18 7:02 ` Dmitry Torokhov
2010-12-18 10:00 ` Daniel Drake
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-12-18 7:02 UTC (permalink / raw)
To: Andres Salomon; +Cc: linux-input, linux-kernel, dsd, pgf, James Cameron
On Fri, Dec 17, 2010 at 10:14:47PM -0800, Andres Salomon wrote:
> On Fri, 17 Dec 2010 21:49:28 -0800
> Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>
> > On Fri, Dec 17, 2010 at 09:09:39PM -0800, Andres Salomon wrote:
> > >
> > > OLPC has switched to a Synaptics touchpad. It turns out that it's
> > > pretty useless in absolute mode. This patch looks for an OLPC
> > > system (via DMI tables), and refuses to init Synaptics mode in
> > > that scenario (falling back to relative mode).
> > >
> > > Signed-off-by: Andres Salomon <dilinger@queued.net>
> >
> > Andres,
> >
> > Can we do what hgpk does and add "depend on !OLPC" to the Kconfig
> > instead?
> >
> > Thanks.
> >
>
> That wouldn't work for distro kernels, unfortunately. Currently the
> kernels that OLPC releases disable CONFIG_MOUSE_PS2_SYNAPTICS. I'd
> like to use a stock distribution kernel, which would need to enable
> both CONFIG_OLPC *and* CONFIG_MOUSE_PS2_SYNAPTICS.. Hence the
> motivation for this patch. :)
What about just adding psmouse.proto=exps then?
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-18 7:02 ` Dmitry Torokhov
@ 2010-12-18 10:00 ` Daniel Drake
2010-12-19 8:20 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Drake @ 2010-12-18 10:00 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Andres Salomon, linux-input, linux-kernel, pgf, James Cameron
On 18 December 2010 07:02, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> What about just adding psmouse.proto=exps then?
It's not quite that simple either, because we want the same distro
image to work on all versions of XO. XO's can come with either hgpk,
synaptics, or sentelic touchpads. In the sentelic and hgpk cases, we'd
want the "real" drivers to kick in.
Daniel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-18 10:00 ` Daniel Drake
@ 2010-12-19 8:20 ` Dmitry Torokhov
2010-12-19 8:32 ` Andres Salomon
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-12-19 8:20 UTC (permalink / raw)
To: Daniel Drake
Cc: Andres Salomon, linux-input, linux-kernel, pgf, James Cameron
On Sat, Dec 18, 2010 at 10:00:51AM +0000, Daniel Drake wrote:
> On 18 December 2010 07:02, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > What about just adding psmouse.proto=exps then?
>
> It's not quite that simple either, because we want the same distro
> image to work on all versions of XO. XO's can come with either hgpk,
> synaptics, or sentelic touchpads. In the sentelic and hgpk cases, we'd
> want the "real" drivers to kick in.
>
Hmm, I am confused. HGPK depends on OLPC so your distribution must have
it defined. Are there general purpose distributions that enable OLPC?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-19 8:20 ` Dmitry Torokhov
@ 2010-12-19 8:32 ` Andres Salomon
2010-12-19 8:37 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Andres Salomon @ 2010-12-19 8:32 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Daniel Drake, linux-input, linux-kernel, pgf, James Cameron
On Sun, 19 Dec 2010 00:20:27 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Sat, Dec 18, 2010 at 10:00:51AM +0000, Daniel Drake wrote:
> > On 18 December 2010 07:02, Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> > > What about just adding psmouse.proto=exps then?
> >
> > It's not quite that simple either, because we want the same distro
> > image to work on all versions of XO. XO's can come with either hgpk,
> > synaptics, or sentelic touchpads. In the sentelic and hgpk cases,
> > we'd want the "real" drivers to kick in.
> >
>
> Hmm, I am confused. HGPK depends on OLPC so your distribution must
> have it defined. Are there general purpose distributions that enable
> OLPC?
Yes, Debian enables CONFIG_OLPC in its 486 kernel (and one of these
days, I'll open up a bug for them to enable it in their 686 kernel).
There are 3 types of touchpads in OLPC XO machines (hgpk, synaptics,
and sentelics). If the hardware is either hgpk or sentelics, we want
those extensions to load. If the hardware is synaptics, we want the
extension not to load. Doing this via kernel
arg doesn't work, as a generic distributions (and even those built
specifically for OLPC XOs) will not know which touchpad hardware will
be in use.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] psmouse: disable the synaptics extension on OLPC machines.
2010-12-19 8:32 ` Andres Salomon
@ 2010-12-19 8:37 ` Dmitry Torokhov
0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2010-12-19 8:37 UTC (permalink / raw)
To: Andres Salomon
Cc: Daniel Drake, linux-input, linux-kernel, pgf, James Cameron
On Sun, Dec 19, 2010 at 12:32:14AM -0800, Andres Salomon wrote:
> On Sun, 19 Dec 2010 00:20:27 -0800
> Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>
> > On Sat, Dec 18, 2010 at 10:00:51AM +0000, Daniel Drake wrote:
> > > On 18 December 2010 07:02, Dmitry Torokhov
> > > <dmitry.torokhov@gmail.com> wrote:
> > > > What about just adding psmouse.proto=exps then?
> > >
> > > It's not quite that simple either, because we want the same distro
> > > image to work on all versions of XO. XO's can come with either hgpk,
> > > synaptics, or sentelic touchpads. In the sentelic and hgpk cases,
> > > we'd want the "real" drivers to kick in.
> > >
> >
> > Hmm, I am confused. HGPK depends on OLPC so your distribution must
> > have it defined. Are there general purpose distributions that enable
> > OLPC?
>
>
> Yes, Debian enables CONFIG_OLPC in its 486 kernel (and one of these
> days, I'll open up a bug for them to enable it in their 686 kernel).
>
> There are 3 types of touchpads in OLPC XO machines (hgpk, synaptics,
> and sentelics). If the hardware is either hgpk or sentelics, we want
> those extensions to load. If the hardware is synaptics, we want the
> extension not to load. Doing this via kernel
> arg doesn't work, as a generic distributions (and even those built
> specifically for OLPC XOs) will not know which touchpad hardware will
> be in use.
>
It still should be theoretically possible to do it in userspace (playing
with protocol settings via sysfs) but I think in kernel is less painful.
I'll apply the patch.
Thanks for the explanations.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-12-19 8:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-18 5:09 [PATCH] psmouse: disable the synaptics extension on OLPC machines Andres Salomon
2010-12-18 5:49 ` Dmitry Torokhov
2010-12-18 6:14 ` Andres Salomon
2010-12-18 7:02 ` Dmitry Torokhov
2010-12-18 10:00 ` Daniel Drake
2010-12-19 8:20 ` Dmitry Torokhov
2010-12-19 8:32 ` Andres Salomon
2010-12-19 8:37 ` Dmitry Torokhov
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).