26 Aug, 2016

1 commit


20 Jul, 2016

5 commits


03 Jun, 2016

1 commit

  • This adds a driver for the Pegasus Notetaker Pen. When connected,
    this uses the Pen as an input tablet.

    This device was sold in various different brandings, for example
    "Pegasus Mobile Notetaker M210",
    "Genie e-note The Notetaker",
    "Staedtler Digital ballpoint pen 990 01",
    "IRISnotes Express" or
    "NEWLink Digital Note Taker".

    Here's an example, so that you know what we are talking about:
    http://www.genie-online.de/genie-e-note-2/

    https://pegatech.blogspot.com/ seems to be a remaining official resource.

    This device can also transfer saved (offline recorded handwritten) data and
    there are userspace programs that do this, see https://launchpad.net/m210
    (Well, alternatively there are really fast scanners out there :)

    It's *really* fun to use as an input tablet though! So let's support this
    for everybody.

    Signed-off-by: Martin Kepplinger
    Signed-off-by: Dmitry Torokhov

    Martin Kepplinger
     

17 May, 2016

1 commit


01 Apr, 2016

5 commits


03 Dec, 2015

1 commit

  • The aiptek driver crashes in aiptek_probe() when a specially crafted USB
    device without endpoints is detected. This fix adds a check that the device
    has proper configuration expected by the driver. Also an error return value
    is changed to more matching one in one of the error paths.

    Reported-by: Ralf Spenneberg
    Signed-off-by: Vladis Dronov
    Signed-off-by: Dmitry Torokhov

    Vladis Dronov
     

27 Jan, 2015

1 commit


07 Aug, 2014

1 commit


26 Jul, 2014

24 commits

  • wacom.ko is now a full HID driver, we have to move it into the proper
    subdirectory: drivers/hid.

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • No Functional changes, just some reordering.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • pktlen is now overwritten by the driver directly by reading the hid
    report descriptor. There is no need to declare it statically.
    We also move down the position of the field in the struct so that
    we can keep the current declaration of Wacom devices.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • This may infer a small difference with the previous implementation
    due to the DIV_ROUND_CLOSEST() in the hid implementation.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • HID already parses the report descriptor, so use it instead of implementing
    our own. The special case for Bamboo PT 3rd gen is also removed and
    handled in the same way Intuos 5 is treated, by hardcoding it in the
    driver. Last, the unit_exponent stored into the hid field already is
    signed, so there is no need to handle a two's complement anymore.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Removes one more need of usb and intf.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Use the HID device as the parent for the power device when dealing with
    a wireless receiver.
    Removes one more usb dependency and does not break user space.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Wacom tablets can share different physical sensors on one physical device.
    These are called siblings in the code. The current way of implementation
    relies on the USB topology to be able to share data amongs those sensors.

    We can replace the code to match a HID subsystem, without involving the USB
    topology:
    - the first probed sensor does not find any siblings in the list
    wacom_udev_list, so it creates its own wacom_hdev_data with its own
    struct hid_device
    - the other sensor checks the current list of siblings in wacom_hdev_data,
    and if there is a match, it associates itself to the matched device.

    To be sure that we are not associating different sensors from different
    physical devices, we also check for the phys path of the hid device which
    contains the USB topology.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Matches the current behavior of the HID subsystem and removes one more
    dependency over USB.

    The current user space clients which relies on this to fetch the
    LEDs path need an update. However, we already break them in the
    kernel v3.11 for the Bluetooth Wacom devices. They are going to be fixed
    soon.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Removes one more dependency over USB, but requires some changes in
    the user space to find the sysfs files correctly.

    This patch breaks the user space. However, the number of program
    accessing the LEDs is quite limited and we can easily patch them
    to handle the new HID behavior.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • This removes an USB dependency and is more accurate: the computed pktlen
    is the actual maximum size of the reports forwarded by the device.

    Given that the pktlen is correctly computed/validated, we can store it now
    in the features struct instead of having a special handling in the rest of
    the code.

    Likewise, this information is not mandatory anymore in the description
    of devices in wacom_wac.c. They will be removed in a separate patch.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • HID core already retrieves the report descritor. There is no need
    to ask ourself for one.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Wacom.ko was a plain USB driver for a HID device. The communications
    from/to the devices can actually be replaced with the HID API.

    At the USB level, the reports are exactly the same.

    This will allow to use uhid virtual devices instead of true USB devices.
    This step is necessary to implement regression tests.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • All USB Wacom tablets are actually HID devices.
    For historical reasons, they are handled as plain USB devices.
    The current code makes more and more reference to the HID subsystem
    like implementing its own HID report descriptor parser to handle new
    devices.

    From the user point of view, we can transparently switch from this state
    to a driver handled in the HID subsystem and clean up a lot of USB specific
    code in the wacom.ko driver.

    The other benefit once the USB dependecies have been removed is that we can
    use a tool like uhid to make regression tests and allow further cleanup or
    new implementations without risking breaking current behaviors.

    To match the current handling of devices in wacom_wac.c, we rely on the
    hid_type set by usbhid. usbhid sets the hid_type to HID_TYPE_USBMOUSE when
    it sees a USB boot mouse protocol declared and HID_TYPE_USBNONE when the
    device is plain HID. There is thus a one to one matching between the list
    of supported devices before and after the switch from USB to HID.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • The current wacom code redefines constants that are already in linux/hid.h
    This patch includes the official implementation and use it accross the code.

    There is a conflict with HID_USAGE and others at the same level:
    - in the wacom.ko implementation, those are the #define regarding the
    value of the field in the report descriptor
    - in the hid.h, those are bitmask
    So add HDESC_ in their current definition.

    Also, the struct hid_descriptor slightly differs from the linux/hid.h
    point of view, so mark it as custom for this driver.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Jason Gerecke
    Tested-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • The Wireless Receiver should also behave in the same way than regular
    USB devices.

    To simplify the unregistering of the different devices,
    wacom_unregister_inputs() is introduced.
    For consistency, the function wacom_register_input() is renamed into
    wacom_register_inputs().

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Reviewed-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • MSC_SERIAL can be safely removed from pad devices. If it is not
    here, xf86-input-wacom correctly generates ones for its internal
    use.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Reviewed-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • MSC_SERIAL can be safely removed from the pad device.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Reviewed-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • We rely on the return code of wacom_bpt*() to do the input_sync().
    wacom_wac_irq() then properly sync the input devices.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Reviewed-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • MSC_SERIAL can be safely dropped for pad input devices.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Reviewed-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Currently, the pad events are sent through the stylus input device
    for the Intuos/Cintiqs, and through the touch input device for the
    Bamboos.

    To differentiate the buttons pressed on the pad from the ones pressed
    on the stylus, the Intuos/Cintiq uses MISC_SERIAL and ABS_MISC. This
    lead to a multiplexing of the events into one device, which are then
    splitted out in xf86-input-wacom. Bamboos are not using MISC events
    because the pad is attached to the touch interface, and only BTN_TOUCH
    is used for the finger (and DOUBLE_TAP, etc...). However, the user space
    driver still splits out the pad from the touch interface in the same
    way it does for the pro line devices.

    The other problem we can see with this fact is that some of the Intuos
    and Cintiq have a wheel, and the effective range of the reported values
    is [0..71]. Unfortunately, the airbrush stylus also sends wheel events
    (there is a small wheel on it), but in the range [0..1023]. From the user
    space point of view it is kind of difficult to understand that because
    the wheel on the pad are quite common, while the airbrush tool is not.

    A solution to fix all of these problems is to split out the pad device
    from the stylus/touch. This decision makes more sense because the pad is
    not linked to the absolute position of the finger or pen, and usually, the
    events from the pad are filtered out by the compositor, which then convert
    them into actions or keyboard shortcuts.

    For backward compatibility with current xf86-input-wacom, the pad devices
    still present the ABS_X, ABS_Y and ABS_MISC events, but they can be
    completely ignored in the new implementation.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Reviewed-by: Jason Gerecke
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • This field was not used for 9 years, it is time to assign it.

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • This reverts commit 1b2faaf7e219fc2905d75afcd4c815e5d39eda80.

    The Intuos4 series presents a bug in which it hangs if it receives
    a set feature command while switching to the enhanced mode.
    This bug is triggered when plugging an Intuos 4 while having
    a gnome user session up and running.

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Aristeu Rozanski
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • wacom_wac.h will be moving to drivers/hid. Since we only need 3 definitions
    from it let's simply copy them over.

    Acked-by: Hans de Goede
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov