* input system: EVIOCSABS(abs) ioctl disabled, why?
@ 2004-07-28 12:41 Olav Kongas
2004-07-28 13:43 ` Vojtech Pavlik
0 siblings, 1 reply; 8+ messages in thread
From: Olav Kongas @ 2004-07-28 12:41 UTC (permalink / raw)
To: linux-kernel, vojtech
Hi,
When trying to feed calibration information to a touchscreen driver with
the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
in 2.6.7. Only after the modification given in the patch below it was
possible to use this ioctl command.
Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
or needs it. The touchscreen drivers have no good way of determining the
absolute limits themselves, do they?
Thanks in advance,
Olav
--- linux-2.6.7/drivers/input/evdev.c.or 2004-07-21 13:27:03.000000000 +0300
+++ linux-2.6.7/drivers/input/evdev.c 2004-07-21 15:53:46.000000000 +0300
@@ -284,7 +284,7 @@
default:
- if (_IOC_TYPE(cmd) != 'E' || _IOC_DIR(cmd) != _IOC_READ)
+ if (_IOC_TYPE(cmd) != 'E' || (_IOC_DIR(cmd) != _IOC_READ && (cmd & ~ABS_MAX) != EVIOCSABS(0)))
return -EINVAL;
if ((_IOC_NR(cmd) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0,0))) {
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-28 12:41 input system: EVIOCSABS(abs) ioctl disabled, why? Olav Kongas
@ 2004-07-28 13:43 ` Vojtech Pavlik
2004-07-31 2:31 ` Kristian Høgsberg
0 siblings, 1 reply; 8+ messages in thread
From: Vojtech Pavlik @ 2004-07-28 13:43 UTC (permalink / raw)
To: Olav Kongas; +Cc: linux-kernel
On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
> When trying to feed calibration information to a touchscreen driver with
> the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
> in 2.6.7. Only after the modification given in the patch below it was
> possible to use this ioctl command.
>
> Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
It's a bug. I'll fix it.
> or needs it.
Nobody uses it, surprisingly.
> The touchscreen drivers have no good way of determining the
> absolute limits themselves, do they?
Many do.
> Thanks in advance,
> Olav
>
> --- linux-2.6.7/drivers/input/evdev.c.or 2004-07-21 13:27:03.000000000 +0300
> +++ linux-2.6.7/drivers/input/evdev.c 2004-07-21 15:53:46.000000000 +0300
> @@ -284,7 +284,7 @@
>
> default:
>
> - if (_IOC_TYPE(cmd) != 'E' || _IOC_DIR(cmd) != _IOC_READ)
> + if (_IOC_TYPE(cmd) != 'E' || (_IOC_DIR(cmd) != _IOC_READ && (cmd & ~ABS_MAX) != EVIOCSABS(0)))
> return -EINVAL;
>
> if ((_IOC_NR(cmd) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0,0))) {
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-28 13:43 ` Vojtech Pavlik
@ 2004-07-31 2:31 ` Kristian Høgsberg
2004-07-31 3:48 ` Lee Revell
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Kristian Høgsberg @ 2004-07-31 2:31 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: Olav Kongas, linux-kernel
Vojtech Pavlik wrote:
> On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
>
>
>>When trying to feed calibration information to a touchscreen driver with
>>the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
>>in 2.6.7. Only after the modification given in the patch below it was
>>possible to use this ioctl command.
>>
>>Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
>
>
> It's a bug. I'll fix it.
On a related note - shouldn't there also be a EVIOCSLED, or am I missing
something obvious? How do you set keyboard LEDs?
Kristian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-31 2:31 ` Kristian Høgsberg
@ 2004-07-31 3:48 ` Lee Revell
2004-07-31 4:54 ` Dmitry Torokhov
2004-07-31 9:33 ` Vojtech Pavlik
2 siblings, 0 replies; 8+ messages in thread
From: Lee Revell @ 2004-07-31 3:48 UTC (permalink / raw)
To: Kristian Høgsberg; +Cc: Vojtech Pavlik, Olav Kongas, linux-kernel
On Fri, 2004-07-30 at 22:31, Kristian Høgsberg wrote:
> Vojtech Pavlik wrote:
> > On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
> >
> >
> >>When trying to feed calibration information to a touchscreen driver with
> >>the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
> >>in 2.6.7. Only after the modification given in the patch below it was
> >>possible to use this ioctl command.
> >>
> >>Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
> >
> >
> > It's a bug. I'll fix it.
>
> On a related note - shouldn't there also be a EVIOCSLED, or am I missing
> something obvious? How do you set keyboard LEDs?
>
Interesting you should mention keyboard LEDs. Here is a patch that was
recently posted to replace the old, broken method of setting keyboard
lights (issue a command an busy-wait until you get an ACK) with an
improved one (using work queues and a semaphore). It does not really
answer your question as such, but should be a good place to start.
http://lkml.org/lkml/2004/7/27/252
HTH,
Lee
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-31 2:31 ` Kristian Høgsberg
2004-07-31 3:48 ` Lee Revell
@ 2004-07-31 4:54 ` Dmitry Torokhov
2004-07-31 9:34 ` Vojtech Pavlik
2004-07-31 9:33 ` Vojtech Pavlik
2 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2004-07-31 4:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Kristian Høgsberg, Vojtech Pavlik, Olav Kongas
On Friday 30 July 2004 09:31 pm, Kristian Høgsberg wrote:
> Vojtech Pavlik wrote:
> > On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
> >
> >
> >>When trying to feed calibration information to a touchscreen driver with
> >>the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
> >>in 2.6.7. Only after the modification given in the patch below it was
> >>possible to use this ioctl command.
> >>
> >>Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
> >
> >
> > It's a bug. I'll fix it.
>
> On a related note - shouldn't there also be a EVIOCSLED, or am I missing
> something obvious? How do you set keyboard LEDs?
>
I think you can use KDSKBLED/KDSETLED ioctls, but I agree that that evdev
should also provide access to the same functions.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-31 2:31 ` Kristian Høgsberg
2004-07-31 3:48 ` Lee Revell
2004-07-31 4:54 ` Dmitry Torokhov
@ 2004-07-31 9:33 ` Vojtech Pavlik
2004-07-31 15:21 ` Kristian Høgsberg
2 siblings, 1 reply; 8+ messages in thread
From: Vojtech Pavlik @ 2004-07-31 9:33 UTC (permalink / raw)
To: Kristian H??gsberg; +Cc: Olav Kongas, linux-kernel
On Sat, Jul 31, 2004 at 04:31:34AM +0200, Kristian H??gsberg wrote:
> Vojtech Pavlik wrote:
> >On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
> >
> >
> >>When trying to feed calibration information to a touchscreen driver with
> >>the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
> >>in 2.6.7. Only after the modification given in the patch below it was
> >>possible to use this ioctl command.
> >>
> >>Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
> >
> >
> >It's a bug. I'll fix it.
>
> On a related note - shouldn't there also be a EVIOCSLED, or am I missing
> something obvious? How do you set keyboard LEDs?
You write() an LED event to the device. EVIOCSABS is intended for
modifying the absolute valuator range, not the value itself.
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-31 4:54 ` Dmitry Torokhov
@ 2004-07-31 9:34 ` Vojtech Pavlik
0 siblings, 0 replies; 8+ messages in thread
From: Vojtech Pavlik @ 2004-07-31 9:34 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-kernel, Kristian H?gsberg, Olav Kongas
On Fri, Jul 30, 2004 at 11:54:25PM -0500, Dmitry Torokhov wrote:
> On Friday 30 July 2004 09:31 pm, Kristian H?gsberg wrote:
> > Vojtech Pavlik wrote:
> > > On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
> > >
> > >
> > >>When trying to feed calibration information to a touchscreen driver with
> > >>the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
> > >>in 2.6.7. Only after the modification given in the patch below it was
> > >>possible to use this ioctl command.
> > >>
> > >>Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
> > >
> > >
> > > It's a bug. I'll fix it.
> >
> > On a related note - shouldn't there also be a EVIOCSLED, or am I missing
> > something obvious? How do you set keyboard LEDs?
> >
>
> I think you can use KDSKBLED/KDSETLED ioctls, but I agree that that evdev
> should also provide access to the same functions.
It does, see my previous e-mail.
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: input system: EVIOCSABS(abs) ioctl disabled, why?
2004-07-31 9:33 ` Vojtech Pavlik
@ 2004-07-31 15:21 ` Kristian Høgsberg
0 siblings, 0 replies; 8+ messages in thread
From: Kristian Høgsberg @ 2004-07-31 15:21 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: Olav Kongas, linux-kernel
Vojtech Pavlik wrote:
...
>>On a related note - shouldn't there also be a EVIOCSLED, or am I missing
>>something obvious? How do you set keyboard LEDs?
>
> You write() an LED event to the device. EVIOCSABS is intended for
> modifying the absolute valuator range, not the value itself.
Yeah, that works, thanks.
Kristian
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-07-31 15:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 12:41 input system: EVIOCSABS(abs) ioctl disabled, why? Olav Kongas
2004-07-28 13:43 ` Vojtech Pavlik
2004-07-31 2:31 ` Kristian Høgsberg
2004-07-31 3:48 ` Lee Revell
2004-07-31 4:54 ` Dmitry Torokhov
2004-07-31 9:34 ` Vojtech Pavlik
2004-07-31 9:33 ` Vojtech Pavlik
2004-07-31 15:21 ` Kristian Høgsberg
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).