From: Vojtech P. <vo...@su...> - 2001-07-29 18:36:46
|
On Tue, Jul 24, 2001 at 09:08:38PM -0700, James Simmons wrote: > > Okay. I looked over the code. I had to make sure the guassian filter we > have didn't use this field. Also joydev.c uses absmax but also long as > dev->absmax[j] == dev->absmin[j] we don't have to worry about divide by > zero errors. We had those errors anyways if the user forgot to set them. > So this patch avoids a nasty error. If the user has to scale it then his > driver will misbehavior but it will not oops. Which IMO is a good thing. > Patch applied. > > > Not necessarily -- situations can exist where the min/max absolute > > values are unavailable and the resolution of the touchpanel matches > > that of the LCD it covers (and thus no scaling is, literally, good > > scaling). > > I have noticed this too. Especially since most framebuffers on embedded > devices have fixed resolutions. The only except so far is the iPAQ h3600 > touchscreen. It is 1024x768 while the screen is 320x240. It is the only > exception so far. > > > While one could try have the user enter the appropriate > > value at configure- or module load-time, the easiest solution here is > > simply to allow the touchpanel driver not to provide a resolution if > > one is unavailable. > > Personally I hate the enter screen resolution stuff. I don't think Vojtech > cares for either but it is needed for X windows. I don't like the way as well. I don't like having mousedev at all. But so far it was very useful. Perhaps we could somehow tell mousedev about the screen resolution when we're not in X? That would make it work nicely in console mode with eg. GPM. > Especially since the > developement cycle is so longgggggggggggggggggggg. Hopefully /dev/mouse > will go away but that will take time. > > > Thus, I'd like to have this be Correct Behaviour for an event handler. > > (Some changes are also needed to tsdev.c; I'd be glad to provide > > them). > > Applied your patch. Yes I would like that patch. I agree that we should avoid oopses and thus the patch is OK, but still I think all drivers should provide min and max for the absolute axes. -- Vojtech Pavlik SuSE Labs |