public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/5] Sonypi driver model & PM changes
@ 2004-10-26 15:56 Dmitry Torokhov
  2004-10-26 18:09 ` Stelian Pop
  0 siblings, 1 reply; 26+ messages in thread
From: Dmitry Torokhov @ 2004-10-26 15:56 UTC (permalink / raw)
  To: LKML, Vojtech Pavlik, Stelian Pop


And I am breaking the thread yet again....

Stelian pop wrote:
> On Tue, Oct 26, 2004 at 11:28:02AM +0200, Stelian Pop wrote:
> 
> > > [1]
> > > http://csociety-ftp.ecn.purdue.edu/pub/gentoo/distfiles/xorg-x11-
> 6.8.0-patches-0.2.5.tar.bz2
> > > Extract patches 9000, 9001 and 9002. Btw, these are not mine - I have
> > > Not even tries them myself but I have read several success stories.
> >
> > Got them and trying to build the new drivers right now. Thanks !
> 
> Well, it kinda works, but there are still some rough edges (the kbd
> driver maps all the unknown keys to KEY_UNKNOWN, making them all to
> have the same keycode in X, making them unusable. After removing the
> test it forwards the events ok).
> 
> There are also problems because my sonypi input device acts both like
> a mouse and a keyboard, and the X event driver wants them to be separate.
> 
> Vojtech: should I generate two different input devices in my driver,
> a mouse like and a keyboard like device, or should the userspace be
> able to demultiplex the events ?
> 

If you want jogdial to continue generating BTN_MIDDLE and BTN_WHEEL
events then IMHO you should create 2 separate input devices - one
for jogdial and the other for FN-keys.

On the other hand I am not sure if it is handy as a ponter device -
I think scrolling is much more natural with the touchpad (but
remember I don't have the hardware) and it may be more convenient
to assign brand-new events to jogdial as well and then map it in
userspace (X) into something different, like volume control. In
this case you can continue having just one input device.

Btw, you should probably drop conditional support for input layer
and always compile it in.

-- 
Dmitry


^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [PATCH 0/5] Sonypi driver model & PM changes
@ 2004-10-25 15:20 Dmitry Torokhov
  2004-10-26  9:28 ` Stelian Pop
  0 siblings, 1 reply; 26+ messages in thread
From: Dmitry Torokhov @ 2004-10-25 15:20 UTC (permalink / raw)
  To: Stelian Pop; +Cc: LKML, Vojtech Pavlik

Apologies for breaking the threading...

Stelian Pop wrote:
> On Mon, Oct 25, 2004 at 03:57:43PM +0200, Vojtech Pavlik wrote:
> 
> > The number is 240 and it's the number of possible PS/2 scancode
> > combinations, and since at this time X can only understand the PS/2
> > protocol (and not native Linux events), this is the only way how to pass
> > keypresses to X.
> >
> > I believe that although this way may be easier, it leads to madness.
> 
> It is also impossible for me to go this way because there is no way
> to put 20+ events between 226 and 240...
> 

I'd say just allocate brand new events for all combinations and do not
worry that the default X keyboard drivers to not get them. There are
already patches in Gentoo adding both keyboard and mouse event support
to X [1] and it is only matter of time ofr other duistributions to pick
it up as well.

I think it is sensible for an supplemental driver (sonypi) to require
some additional support form userspace and not to force itself into
boundaries of a legacy protocol.

-- 
Dmitry

[1] 
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/distfiles/xorg-x11-6.8.0-patches-0.2.5.tar.bz2
Extract patches 9000, 9001 and 9002. Btw, these are not mine - I have
Not even tries them myself but I have read several success stories.


^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH 0/5] Sonypi driver model & PM changes
@ 2004-10-21  6:54 Dmitry Torokhov
  2004-10-25 12:56 ` Stelian Pop
  0 siblings, 1 reply; 26+ messages in thread
From: Dmitry Torokhov @ 2004-10-21  6:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: stelian

Hi,

I have been looking at the sysdevs in present in the kernel and noticed that
sonypi was registering itself as a system device. Surely it is possible to
suspend it with interrupyts enabled, so it better be converted to a platform
device. I course of convert I also did some additional changes:

01-sonypi-whitespace-fixes.patch
	- get rid of extra whitespace and convert to the kernel cosing style:
	  ... However, there is one special case, namely functions: they have
	  the opening brace at the beginning of the next line...

02-sonypi-module_param.patch
	- convert sonypi from using MODULE_PARM and __setup to module_param.
	  The parameters are:
		sonypi.camera
		sonypi.compat
		sonypi.fnkeyinit
		sonypi.mask=		- exported through sysfs, writeable
		sonypi.minor=
		sonypi.useinput
		sonypi.verbose		- exported through sysfs, writeable

03-sonypi-pm-changes.patch
	- convert sonypi sysdev to platform device, drop old-style PM code
	  since APM does call device_suspend anyway so the new style handlers
          will be called.

04-sonypi-misc-changes.patch
	- switch sonypi_misc_read to use wake_event_interruptible instead of
	  a homemade copy, fix small race there, make sure that the device
	  is fully initialized before turning the interrupts on.	

05-sonypi-pci_get_device.patch
	- convert from pci_find_device which is obsolete to pci_get_device.

Warning: I do not have the hardware som while the code is compiles and I am
pretty sure it is correct it has not been tested.

Should apply to 2.6.9

-- 
Dmitry

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2004-10-27  8:04 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-26 15:56 [PATCH 0/5] Sonypi driver model & PM changes Dmitry Torokhov
2004-10-26 18:09 ` Stelian Pop
2004-10-27  2:56   ` Dmitry Torokhov
2004-10-27  8:05     ` Stelian Pop
2004-10-27  3:14   ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2004-10-25 15:20 Dmitry Torokhov
2004-10-26  9:28 ` Stelian Pop
2004-10-26 15:30   ` Stelian Pop
2004-10-21  6:54 Dmitry Torokhov
2004-10-25 12:56 ` Stelian Pop
2004-10-25 13:22   ` Dmitry Torokhov
2004-10-25 13:56     ` Stelian Pop
2004-10-25 22:09       ` Pavel Machek
2004-10-26  5:55         ` Stelian Pop
2004-10-26  6:02           ` Dmitry Torokhov
2004-10-26  2:28     ` Nigel Cunningham
2004-10-26  6:21       ` Dmitry Torokhov
2004-10-26  6:41         ` Nigel Cunningham
2004-10-25 13:50   ` Stelian Pop
2004-10-25 13:57     ` Vojtech Pavlik
2004-10-25 14:45       ` Stelian Pop
     [not found]         ` <20041025151120.GA1802@ucw.cz>
2004-10-25 15:20           ` Stelian Pop
2004-10-25 16:04             ` Vojtech Pavlik
2004-10-26  9:46               ` Stelian Pop
2004-10-25 22:12     ` Pavel Machek
2004-10-26  8:32       ` Karol Kozimor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox