History log of /linux-master/drivers/hid/hid-elecom.c
Revision Date Author Comments
# 29f316a1 19-Jan-2023 Takahiro Fujii <fujii@xaxxi.net>

HID: elecom: add support for TrackBall 056E:011C

Make function buttons on ELECOM M-HT1DRBK trackball mouse work. This model
has two devices with different device IDs (010D and 011C). Both of
them misreports the number of buttons as 5 in the report descriptor, even
though they have 8 buttons. hid-elecom overwrites the report to fix them,
but supports only on 010D and does not work on 011C. This patch fixes
011C in the similar way but with specialized position parameters.
In fact, it is sufficient to rewrite only 17th byte (05 -> 08). However I
followed the existing way.

Signed-off-by: Takahiro Fujii <fujii@xaxxi.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 82514ecd 25-Nov-2020 Jiri Kosina <jkosina@suse.cz>

HID: elecom: drop stray comment

Drop spurious leftover comment.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 55633e68 21-Nov-2020 YOSHIOKA Takuma <lo48576@hard-wi.red>

HID: elecom: add support for EX-G M-XGL20DLBK wireless mouse

Enables three buttons (Fn1, Fn2, and Fn3) on the ELECOM M-XGL20DLBK
wireless mouse.

While this mouse is EX-G brand, report descriptor is a bit different
from EX-G trackball mouse. To enable extra buttons, report should be
rewritten in a similar way to trackballs, but with different position
parameters.

Signed-off-by: YOSHIOKA Takuma <lo48576@hard-wi.red>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 68d09380 21-Nov-2020 YOSHIOKA Takuma <lo48576@hard-wi.red>

HID: elecom: rewrite report based on model specific parameters

The report descriptor for EX-G wireless mouse (M-XGL20DLBK) is a bit
different from that for trackball mice such as DEFT. For such mouse, the
current `mouse_button_fixup` cannot be used as is, because it uses
hard-coded indices for a report descriptor.

Add parameters to `mouse_button_fixup` function, in order to support
fixing report descriptors for more models.

Signed-off-by: YOSHIOKA Takuma <lo48576@hard-wi.red>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fbb77e88 01-Mar-2018 Tomasz Kramkowski <tk@the-tk.com>

HID: elecom: add support for EX-G M-XT4DRBK trackball

This patch enables the 6th button on the ELECOM EX-G M-XT4DRBK
trackball mouse.

This is a left handed EX-G variant which only comes in a wireless (D)
model. It has a total of 6 buttons but one of these is not available
because of how the HID descriptor is configured.

Signed-off-by: Tomasz Kramkowski <tk@the-tk.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 79837ede 01-Mar-2018 Tomasz Kramkowski <tk@the-tk.com>

HID: elecom: refer to trackballs by model name instead of series

This patch changes all references to ELECOM trackballs using their
series name to refer to them by their model name.

ELECOM provides multiple series of mice such as EX-G, HUGE, and DEFT.
Although it has not caused conflicts in the driver, there can be more
than one iteration of mice in each series. For example, there are 7
variants of EX-G trackballs but only three (M-XT3URBK, M-XT3DRBK, and
M-XT4DRBK) need a driver to work correctly.

There are also 4 DEFT series trackballs but two of them have the same
VID:PID as the other two. I picked the earlier model for the naming of
the PID macros.

Signed-off-by: Tomasz Kramkowski <tk@the-tk.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# ac58eec2 19-Dec-2017 Tomasz Kramkowski <tk@the-tk.com>

HID: elecom: rewrite report fixup for EX-G and future mice

This patch rewrites the mouse report fixup used for the DEFT and HUGE
elecom trackballs in order to make it generic enough to fix other
elecom mice with similar issues. This patch also uses this new report
fixup function to fix the Elecom EX-G trackball which has 6 physical
buttons and a similar issue to the other two mice.

Elecom's track record has so far shown that they like to re-use the
same report descriptor for multiple different mice regardless of the
number of buttons the mouse has. This means that the missing buttons
on multiple mice can be fixed in one function without introducing
phantom buttons which would in turn cause the number of mouse buttons
to be misreported to userspace.

This patch drops the very verbose report descriptor "diff" comment for
a more abridged yet hopefully just as informative generic version.

Signed-off-by: Tomasz Kramkowski <tk@the-tk.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# a0933a45 05-Oct-2017 Alex Manoussakis <amanou@gnu.org>

HID: hid-elecom: extend to fix descriptor for HUGE trackball

In addition to DEFT, Elecom introduced a larger trackball called HUGE, in
both wired (M-HT1URBK) and wireless (M-HT1DRBK) versions. It has the same
buttons and behavior as the DEFT. This patch adds the two relevant USB IDs
to enable operation of the three Fn buttons on the top of the device.

Cc: Diego Elio Petteno <flameeyes@flameeyes.eu>
Signed-off-by: Alex Manoussakis <amanou@gnu.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 0bb7a37f 26-Apr-2017 Diego Elio Pettenò <flameeyes@flameeyes.eu>

HID: elecom: extend to fix the descriptor for DEFT trackballs

The ELECOM DEFT trackballs report only five buttons, when the device
actually has 8. Change the descriptor so that the HID driver can see all of
them.

For completeness and future reference, I included a side-by-side diff of
the part of the descriptor that is being edited.

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 636a89d4 11-Oct-2015 Jiri Slaby <jirislaby@kernel.org>

HID: fix some indenting issues

Some drivers indent some lines in a very weird manner. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# f425458e 17-Dec-2012 H Hartley Sweeten <hartleys@visionengravers.com>

HID: Use module_hid_driver macro

Use the new module_hid_driver macro in all HID drivers that have
a simple register/unregister init/exit.

This also converts the hid drivers that test for a failure of
hid_register_driver() and report the failure. Using module_hid_driver
in those drivers removes the failure message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 4291ee30 09-Dec-2010 Joe Perches <joe@perches.com>

HID: Add and use hid_<level>: dev_<level> equivalents

Neaten current uses of dev_<level> by adding and using
hid specific hid_<level> macros.

Convert existing uses of dev_<level> uses to hid_<level>.
Convert hid-pidff printk uses to hid_<level>.

Remove err_hid and use hid_err instead.

Add missing newlines to logging messages where necessary.
Coalesce format strings.

Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Other miscellaneous changes:

Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_<level> can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 73e4008d 06-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com>

HID: allow resizing and replacing report descriptors

Update hid_driver's report_fixup prototype to allow changing report
descriptor size and/or returning completely different report descriptor.
Update existing usage accordingly.

This is to give more freedom in descriptor fixup and to allow having a whole
fixed descriptor in the code for the sake of readability.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 64b386ea 28-Jun-2010 Richard Nauber <richard.nauber@googlemail.com>

HID: add proper support for Elecom BM084 bluetooth mouse

This patch removes the annoying feature of Elecoms BM084 to constantly scroll to the right.
The device can be found at:
http://www.dealextreme.com/details.dx/sku.15402

Signed-off-by: Richard Nauber <Richard.Nauber@gmail.com>
[jkosina@suse.cz: fix build error]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>