Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-15 Thread PaweÅ Sikora
On Monday 14 of March 2005 06:02, Stephen Evanchik wrote:
> Here's the latest patch for TracKPoint devices. I have changed the
> sysfs filenames to be more descriptive for commonly used attributes. I
> also implemented the set_properties flag for initialization.
>
> It patches against 2.6.11 and 2.6.11.3 however I have not tested it
> with 2.6.11.3 .
>
> Any comments are appreciated.

  CC [M]  drivers/input/mouse/psmouse-base.o
drivers/input/mouse/psmouse-base.c: In function 'psmouse_extensions':
drivers/input/mouse/psmouse-base.c:489: error: 'PSMOUSE_TRACKPOINT' undeclared

;-)

-- 
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */

   #define say(x) lie(x)
--- linux-2.6.11.3/drivers/input/mouse/psmouse.h.orig	2005-03-15 20:22:45.0 +0100
+++ linux-2.6.11.3/drivers/input/mouse/psmouse.h	2005-03-15 20:47:12.0 +0100
@@ -79,6 +79,7 @@
 	PSMOUSE_IMEX,
 	PSMOUSE_SYNAPTICS,
 	PSMOUSE_ALPS,
+	PSMOUSE_TRACKPOINT,
 };
 
 int psmouse_sliced_command(struct psmouse *psmouse, unsigned char command);


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-15 Thread Stephen Evanchik
On Tue, 15 Mar 2005 20:49:25 +0100, PaweÅ Sikora <[EMAIL PROTECTED]> wrote:
> On Monday 14 of March 2005 06:02, Stephen Evanchik wrote:
> > Here's the latest patch for TracKPoint devices. I have changed the
> > sysfs filenames to be more descriptive for commonly used attributes. I
> > also implemented the set_properties flag for initialization.
> >
> > It patches against 2.6.11 and 2.6.11.3 however I have not tested it
> > with 2.6.11.3 .
> >
> > Any comments are appreciated.
> 
>   CC [M]  drivers/input/mouse/psmouse-base.o
> drivers/input/mouse/psmouse-base.c: In function 'psmouse_extensions':
> drivers/input/mouse/psmouse-base.c:489: error: 'PSMOUSE_TRACKPOINT' undeclared
> 
> ;-)

Thanks, I noticed this last night and have it fixed in the new patch
yet to be submitted ;)


Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-15 Thread Stephen Evanchik
On Tue, 15 Mar 2005 20:49:25 +0100, Pawe Sikora [EMAIL PROTECTED] wrote:
 On Monday 14 of March 2005 06:02, Stephen Evanchik wrote:
  Here's the latest patch for TracKPoint devices. I have changed the
  sysfs filenames to be more descriptive for commonly used attributes. I
  also implemented the set_properties flag for initialization.
 
  It patches against 2.6.11 and 2.6.11.3 however I have not tested it
  with 2.6.11.3 .
 
  Any comments are appreciated.
 
   CC [M]  drivers/input/mouse/psmouse-base.o
 drivers/input/mouse/psmouse-base.c: In function 'psmouse_extensions':
 drivers/input/mouse/psmouse-base.c:489: error: 'PSMOUSE_TRACKPOINT' undeclared
 
 ;-)

Thanks, I noticed this last night and have it fixed in the new patch
yet to be submitted ;)


Stephen
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-15 Thread Pawe Sikora
On Monday 14 of March 2005 06:02, Stephen Evanchik wrote:
 Here's the latest patch for TracKPoint devices. I have changed the
 sysfs filenames to be more descriptive for commonly used attributes. I
 also implemented the set_properties flag for initialization.

 It patches against 2.6.11 and 2.6.11.3 however I have not tested it
 with 2.6.11.3 .

 Any comments are appreciated.

  CC [M]  drivers/input/mouse/psmouse-base.o
drivers/input/mouse/psmouse-base.c: In function 'psmouse_extensions':
drivers/input/mouse/psmouse-base.c:489: error: 'PSMOUSE_TRACKPOINT' undeclared

;-)

-- 
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */

   #define say(x) lie(x)
--- linux-2.6.11.3/drivers/input/mouse/psmouse.h.orig	2005-03-15 20:22:45.0 +0100
+++ linux-2.6.11.3/drivers/input/mouse/psmouse.h	2005-03-15 20:47:12.0 +0100
@@ -79,6 +79,7 @@
 	PSMOUSE_IMEX,
 	PSMOUSE_SYNAPTICS,
 	PSMOUSE_ALPS,
+	PSMOUSE_TRACKPOINT,
 };
 
 int psmouse_sliced_command(struct psmouse *psmouse, unsigned char command);


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Dmitry Torokhov
On Mon, 14 Mar 2005 08:40:22 -0500, Stephen Evanchik <[EMAIL PROTECTED]> wrote:
> On Mon, 14 Mar 2005 13:19:56 +0100, Vojtech Pavlik <[EMAIL PROTECTED]> wrote:
> > How much does it interpret the stream in non-transparent mode? Are
> > commands also passed through in soft transparent mode?
> >
> > I'm asking because we might want to implement a passthrough port
> > similarly to what the Synaptics driver does and allow extended protocol
> > mice to be connected to the external mouse port.
> 
> I originally thought that I could implement something similar to the
> Synaptics driver. Unfortunately, while in transparent mode bytes are
> relayed unmodified with the TrackPoint controller disabled. In other
> words, no simultaneous usage.
> 
> That doesn't mean extended protocol mice couldn't be supported in
> transparent mode however. I didn't find it particularly useful given
> the TrackPoint itself would be disabled.
> 

Here is my take on it (now that I have skimmed the TrackPint spec) -
transparent mode is to be used only when querying the external device.
This way trackpoint does not interfere with data stream at all and the
kernel gets a chance to know exactly whta is behing the trackpoint -
Logitech, explorer, something more exotic... Once identification is
done transparent mode should be cancelled.

Bit 3 can be used to de-multiplex 2 streams; hopefully trackpoint is
able to rely packets longer than 3 bytes from the external device.

As far as I can see there is no point of exporting transparent mode to
the userspace via sysfs. I also do not think that we need to export
middle_button_disable as it is "..for compatibility with older
software expecting this bit be always 0" and we do not have such an
issue. Also, if we implement pass-through port, then ext_dev is also
not needed since user can either unbind the driver from pass-through
port or just ignore the secondary input device in his/her config.

-- 
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Stephen Evanchik
On Mon, 14 Mar 2005 13:19:56 +0100, Vojtech Pavlik <[EMAIL PROTECTED]> wrote:
> How much does it interpret the stream in non-transparent mode? Are
> commands also passed through in soft transparent mode?
>
> I'm asking because we might want to implement a passthrough port
> similarly to what the Synaptics driver does and allow extended protocol
> mice to be connected to the external mouse port.

I originally thought that I could implement something similar to the
Synaptics driver. Unfortunately, while in transparent mode bytes are
relayed unmodified with the TrackPoint controller disabled. In other
words, no simultaneous usage.

That doesn't mean extended protocol mice couldn't be supported in
transparent mode however. I didn't find it particularly useful given
the TrackPoint itself would be disabled.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Vojtech Pavlik
On Mon, Mar 14, 2005 at 07:01:23AM -0500, Stephen Evanchik wrote:
> On Mon, 14 Mar 2005 09:19:49 +0100, Vojtech Pavlik <[EMAIL PROTECTED]> wrote:
> > > +/*
> > > + * Mode manipulation
> > > + */
> > > +#define TP_SET_SOFT_TRANS (0x4E) /* Set mode */
> > > +#define TP_CANCEL_SOFT_TRANS (0xB9) /* Cancel mode */
> > > +#define TP_SET_HARD_TRANS (0x45) /* Mode can only be set */
> > 
> > What exactly is transparent mode?
> 
> Transparency mode, when enabled, turns off the TrackPoint controller's
> interpretation of the byte stream going to and coming from the
> external PS/2 port if present.
> 
> Soft transparency mode can be cancelled, while hard transparency mode
> requires a reset of the device and possibly the machine.
 
How much does it interpret the stream in non-transparent mode? Are
commands also passed through in soft transparent mode?

I'm asking because we might want to implement a passthrough port
similarly to what the Synaptics driver does and allow extended protocol
mice to be connected to the external mouse port.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Stephen Evanchik
On Mon, 14 Mar 2005 09:19:49 +0100, Vojtech Pavlik <[EMAIL PROTECTED]> wrote:
> > +/*
> > + * Mode manipulation
> > + */
> > +#define TP_SET_SOFT_TRANS (0x4E) /* Set mode */
> > +#define TP_CANCEL_SOFT_TRANS (0xB9) /* Cancel mode */
> > +#define TP_SET_HARD_TRANS (0x45) /* Mode can only be set */
> 
> What exactly is transparent mode?

Transparency mode, when enabled, turns off the TrackPoint controller's
interpretation of the byte stream going to and coming from the
external PS/2 port if present.

Soft transparency mode can be cancelled, while hard transparency mode
requires a reset of the device and possibly the machine.

Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Vojtech Pavlik
On Mon, Mar 14, 2005 at 12:02:13AM -0500, Stephen Evanchik wrote:

> Here's the latest patch for TracKPoint devices. I have changed the
> sysfs filenames to be more descriptive for commonly used attributes. I
> also implemented the set_properties flag for initialization.
> 
> It patches against 2.6.11 and 2.6.11.3 however I have not tested it
> with 2.6.11.3 .
> 
> Any comments are appreciated.

> +/*
> + * Mode manipulation
> + */
> +#define TP_SET_SOFT_TRANS (0x4E) /* Set mode */
> +#define TP_CANCEL_SOFT_TRANS (0xB9) /* Cancel mode */
> +#define TP_SET_HARD_TRANS (0x45) /* Mode can only be set */

What exactly is transparent mode? 

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Vojtech Pavlik
On Mon, Mar 14, 2005 at 12:02:13AM -0500, Stephen Evanchik wrote:

 Here's the latest patch for TracKPoint devices. I have changed the
 sysfs filenames to be more descriptive for commonly used attributes. I
 also implemented the set_properties flag for initialization.
 
 It patches against 2.6.11 and 2.6.11.3 however I have not tested it
 with 2.6.11.3 .
 
 Any comments are appreciated.

 +/*
 + * Mode manipulation
 + */
 +#define TP_SET_SOFT_TRANS (0x4E) /* Set mode */
 +#define TP_CANCEL_SOFT_TRANS (0xB9) /* Cancel mode */
 +#define TP_SET_HARD_TRANS (0x45) /* Mode can only be set */

What exactly is transparent mode? 

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Stephen Evanchik
On Mon, 14 Mar 2005 09:19:49 +0100, Vojtech Pavlik [EMAIL PROTECTED] wrote:
  +/*
  + * Mode manipulation
  + */
  +#define TP_SET_SOFT_TRANS (0x4E) /* Set mode */
  +#define TP_CANCEL_SOFT_TRANS (0xB9) /* Cancel mode */
  +#define TP_SET_HARD_TRANS (0x45) /* Mode can only be set */
 
 What exactly is transparent mode?

Transparency mode, when enabled, turns off the TrackPoint controller's
interpretation of the byte stream going to and coming from the
external PS/2 port if present.

Soft transparency mode can be cancelled, while hard transparency mode
requires a reset of the device and possibly the machine.

Stephen
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Vojtech Pavlik
On Mon, Mar 14, 2005 at 07:01:23AM -0500, Stephen Evanchik wrote:
 On Mon, 14 Mar 2005 09:19:49 +0100, Vojtech Pavlik [EMAIL PROTECTED] wrote:
   +/*
   + * Mode manipulation
   + */
   +#define TP_SET_SOFT_TRANS (0x4E) /* Set mode */
   +#define TP_CANCEL_SOFT_TRANS (0xB9) /* Cancel mode */
   +#define TP_SET_HARD_TRANS (0x45) /* Mode can only be set */
  
  What exactly is transparent mode?
 
 Transparency mode, when enabled, turns off the TrackPoint controller's
 interpretation of the byte stream going to and coming from the
 external PS/2 port if present.
 
 Soft transparency mode can be cancelled, while hard transparency mode
 requires a reset of the device and possibly the machine.
 
How much does it interpret the stream in non-transparent mode? Are
commands also passed through in soft transparent mode?

I'm asking because we might want to implement a passthrough port
similarly to what the Synaptics driver does and allow extended protocol
mice to be connected to the external mouse port.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Stephen Evanchik
On Mon, 14 Mar 2005 13:19:56 +0100, Vojtech Pavlik [EMAIL PROTECTED] wrote:
 How much does it interpret the stream in non-transparent mode? Are
 commands also passed through in soft transparent mode?

 I'm asking because we might want to implement a passthrough port
 similarly to what the Synaptics driver does and allow extended protocol
 mice to be connected to the external mouse port.

I originally thought that I could implement something similar to the
Synaptics driver. Unfortunately, while in transparent mode bytes are
relayed unmodified with the TrackPoint controller disabled. In other
words, no simultaneous usage.

That doesn't mean extended protocol mice couldn't be supported in
transparent mode however. I didn't find it particularly useful given
the TrackPoint itself would be disabled.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-14 Thread Dmitry Torokhov
On Mon, 14 Mar 2005 08:40:22 -0500, Stephen Evanchik [EMAIL PROTECTED] wrote:
 On Mon, 14 Mar 2005 13:19:56 +0100, Vojtech Pavlik [EMAIL PROTECTED] wrote:
  How much does it interpret the stream in non-transparent mode? Are
  commands also passed through in soft transparent mode?
 
  I'm asking because we might want to implement a passthrough port
  similarly to what the Synaptics driver does and allow extended protocol
  mice to be connected to the external mouse port.
 
 I originally thought that I could implement something similar to the
 Synaptics driver. Unfortunately, while in transparent mode bytes are
 relayed unmodified with the TrackPoint controller disabled. In other
 words, no simultaneous usage.
 
 That doesn't mean extended protocol mice couldn't be supported in
 transparent mode however. I didn't find it particularly useful given
 the TrackPoint itself would be disabled.
 

Here is my take on it (now that I have skimmed the TrackPint spec) -
transparent mode is to be used only when querying the external device.
This way trackpoint does not interfere with data stream at all and the
kernel gets a chance to know exactly whta is behing the trackpoint -
Logitech, explorer, something more exotic... Once identification is
done transparent mode should be cancelled.

Bit 3 can be used to de-multiplex 2 streams; hopefully trackpoint is
able to rely packets longer than 3 bytes from the external device.

As far as I can see there is no point of exporting transparent mode to
the userspace via sysfs. I also do not think that we need to export
middle_button_disable as it is ..for compatibility with older
software expecting this bit be always 0 and we do not have such an
issue. Also, if we implement pass-through port, then ext_dev is also
not needed since user can either unbind the driver from pass-through
port or just ignore the secondary input device in his/her config.

-- 
Dmitry
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-13 Thread Dmitry Torokhov
On Monday 14 March 2005 00:02, Stephen Evanchik wrote:
> Here's the latest patch for TracKPoint devices. I have changed the
> sysfs filenames to be more descriptive for commonly used attributes. I
> also implemented the set_properties flag for initialization.
> 
> It patches against 2.6.11 and 2.6.11.3 however I have not tested it
> with 2.6.11.3 .
> 
> Any comments are appreciated.
> 

Hi Stephen,

It looks very good now, I have just a couple of comments and I as far as
I concerned it is ready for inclusion.

> +PSMOUSE_DEFINE_ATTR(middle_btn_disable);

Is it possible to change it for positive (something like middle_button
which would show 1 for enabled - default - and 0 for disabled). But this
is my personal preference, others may disagree.

> +#define MAKE_ATTR_WRITE(_item, command) \
> + static ssize_t psmouse_attr_set_##_item(struct psmouse *psmouse,
> const char *buf, size_t count) \

It looks like your mailer has wrapped the patch.

Also the patch has some trailing whitespace. If you are using vim the
foillowing in .vimrc will show all trailing spaces in all their glory:

highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/

-- 
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.11] IBM TrackPoint support

2005-03-13 Thread Dmitry Torokhov
On Monday 14 March 2005 00:02, Stephen Evanchik wrote:
 Here's the latest patch for TracKPoint devices. I have changed the
 sysfs filenames to be more descriptive for commonly used attributes. I
 also implemented the set_properties flag for initialization.
 
 It patches against 2.6.11 and 2.6.11.3 however I have not tested it
 with 2.6.11.3 .
 
 Any comments are appreciated.
 

Hi Stephen,

It looks very good now, I have just a couple of comments and I as far as
I concerned it is ready for inclusion.

 +PSMOUSE_DEFINE_ATTR(middle_btn_disable);

Is it possible to change it for positive (something like middle_button
which would show 1 for enabled - default - and 0 for disabled). But this
is my personal preference, others may disagree.

 +#define MAKE_ATTR_WRITE(_item, command) \
 + static ssize_t psmouse_attr_set_##_item(struct psmouse *psmouse,
 const char *buf, size_t count) \

It looks like your mailer has wrapped the patch.

Also the patch has some trailing whitespace. If you are using vim the
foillowing in .vimrc will show all trailing spaces in all their glory:

highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/

-- 
Dmitry
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/