EV_MSC / driver/input/input.c (Input Handler)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frank Salomon
Date: Thursday, February 8, 2007 - 1:56 am

Hi All,

I had written an additional input_handler :

      static struct input_device_id pcraw_ids[] = {
	     {
                      .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
                      .evbit = { BIT(EV_MSC) },
              },
	     { },    /* Terminating entry */
      };

to get MSC_RAW events from the atkeyboard :

      input_event (&atkbd->dev, EV_MSC, MSC_RAW, code)

But I only get these events :

      input_event(&atkbd->dev, EV_MSC, MSC_SCAN, code);

I know the reason is in driver/input/input.c :

      case EV_MSC:
           if (code > MSC_MAX || !test_bit(code, dev->mscbit))
                return;

           if (dev->event) dev->event(dev, type, code, value);
           break;

because of (driver/input/keyboard/atkbd.c):

      atkbd->dev.mscbit[0] = atkbd->softraw ? BIT(MSC_SCAN) :
           BIT(MSC_RAW) | BIT(MSC_SCAN);

I would like to change driver/input/input.c like this :

      case EV_MSC:
           if (code > MSC_MAX)
                return;

           if (test_bit(code, dev->mscbit))
                if (dev->event) dev->event(dev, type, code, value);
           break;

Any comments ? Maybe I misunderstand the concept of the input events. In 
that case, please give me a short description or let me know were I can 
find any documentation.

Best regards, Frank






-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
EV_MSC / driver/input/input.c (Input Handler), Frank Salomon, (Thu Feb 8, 1:56 am)
Re: EV_MSC / driver/input/input.c (Input Handler), Dmitry Torokhov, (Thu Feb 8, 8:15 am)
Re: EV_MSC / driver/input/input.c (Input Handler), Frank Salomon, (Fri Feb 9, 12:15 am)
Re: EV_MSC / driver/input/input.c (Input Handler), Dmitry Torokhov, (Fri Feb 9, 7:36 am)