History log of /linux-master/drivers/input/touchscreen/wacom_w8001.c
Revision Date Author Comments
# a9f08ad7 18-Aug-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

Input: move from strlcpy with unused retval to strscpy

Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220818210022.6865-1-wsa+renesas@sang-engineering.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 2da9d2b5 16-Aug-2019 Jason Gerecke <killertofu@gmail.com>

Input: wacom_w8001 - allocate additional space for 'phys'

GCC warns that the output of our call to 'snprintf' in 'w8001_connect'
may be truncated since both 'serio->phys' and 'w8001->phys' are 32 bytes
in length. Increase the amount of space allocated for the latter to
compensate.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 663c8b55 18-Aug-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

Input: wacom_w8001 - constify serio_device_id

serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 3746e567 19-Jul-2016 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - handle errors from input_mt_init_slots()

input_mt_init_slots() may fail and we should be handling failures properly.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# ae10850c 19-Jul-2016 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - resolution wasn't set for ABS_MT_POSITION_X/Y

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 3e9161bf 14-Jul-2016 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Revert "Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE"

This reverts commit 5f7e5445a2de848c66d2d80ba5479197e8287c33 because
removal of input_mt_report_slot_state() means we no longer generate
tracking IDs for the reported contacts.

Cc: stable@vger.kernel.org
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pinglinux@gmail.com>


# 9e72ac74 23-Jun-2016 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - ignore invalid pen data packets

ThinkPad X60 Tablet PC (pen only device) sometime posts
packets that are larger than W8001_PKTLEN_TPCPEN.

Reported-by: Chris J Arges <christopherarges@gmail.com>
Tested-by: Chris J Arges <christopherarges@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 12afb344 23-Jun-2016 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - w8001_MAX_LENGTH should be 13

Somehow the patch that added two-finger touch support forgot to update
W8001_MAX_LENGTH from 11 to 13.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 5f7e5445 11-Jan-2016 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE

As of e0361b70175 ("Input: wacom_w8001 - split the touch and pen devices
into two devices") the touch events aren't multiplexed over the same device
anymore, the use of ABS_MT_TOOL_TYPE is superfluous. And even before then
it only ever sent MT_TOOL_TYPE_FINGER anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# e0361b70 03-Dec-2015 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - split the touch and pen devices into two devices

These devices have a pen device and a touch device through the same serial
protocol, split it up into two separate devices like we do for USB Wacom
tablets too.

Userspace already matches on the device name so we can't drop it
completely. Compose the same basename based on capabilities and append the
tool type, leading to a name like "Wacom Serial Penabled 2FG Touchscreen
Pen".

Note that this drops BTN_TOOL_FINGER, it is not needed once the tools
are split out (and a touch device with BTN_TOOL_FINGER is interpreted
as touchpad by most of userspace).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 5d0a4fe2 03-Dec-2015 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - split pen and touch initialization up

This is preparation work for splitting it up for two event nodes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# e1717354 03-Dec-2015 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - handle touch error case correctly

If a device failed at the pen setup and gets a zero reply from the touch
device, we need to return an error. Otherwise we have a device with
nothing but a name and the EV_KEY and EV_ABS bits.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# ec9acda7 01-Dec-2015 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - set BTN_TOOL_DOUBLETAP if we have 2fg support

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 86c03f46 01-Dec-2015 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - use __set_bit for evbits

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# bf9a9f8e 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

Input: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# b4adbbef 11-Aug-2012 Henrik Rydberg <rydberg@euromail.se>

Input: MT - Add flags to input_mt_init_slots()

Preparing to move more repeated code into the mt core, add a flags
argument to the input_mt_slots_init() function.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>


# 65ac9f7a 04-Apr-2012 Axel Lin <axel.lin@gmail.com>

Input: serio - use module_serio_driver

This patch converts the drivers in drivers/input/* to use
module_serio_driver() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 3512069e 08-Sep-2011 Jason Gerecke <killertofu@gmail.com>

Input: wacom - add POINTER and DIRECT device properties

Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the
hardware supported by the Wacom driver. The DIRECT property is
assigned to devices with an embedded screen (i.e. touchscreens
and display tablets). The POINTER property is assigned to those
without embedded screens.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 66fd9385 23-Aug-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: wacom_w8001 - simplify w8001_remove

Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# e9496746 23-Aug-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: wacom_w8001 - implement open and close

Implement open() and close() methods for the input device so that we
do not start the device unless there are users listening to the events.

Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 28a1bc1c 31-Jan-2011 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - report resolution to userland

Serial devices send both pen and touch data through the same logical
port. Since we scaled touch to pen maximum, we use pen resolution
for touch as well here.

This is under the assumption that pen and touch share the same physical
surface. In the case when a small physical dimensional difference occurs
between pen and touch, we assume the tolerance for touch point precision
is higher than pen and the difference is within touch point tolerance.

A per-MT tool based resolution mechanism should be introduced if the
above assumption does not hold true for the pen and touch devices any
more.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 5fca6cac 11-Jan-2011 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - add single-touch support

Emulate single-touch compatible events for the 2-finger panels
so that they can be used with single-touch legacy clients.

Assign device ids as Wacom USB vendor ID and product ID.
Name the device to reflect its specific features.

Scale touch coordinates to pen maximum if pen supported.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# a6d38f88 24-Dec-2010 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - support pen or touch only devices

Not all penabled devices support touch. The same holds true for touch
devices, so we should be setting up devices according to the results
returned when we query the hardware.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 202b6ca1 24-Dec-2010 Ping Cheng <pinglinux@gmail.com>

Input: wacom_w8001 - use __set_bit to set keybits

This makes code safer and easier to read.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# c5f4dec1 15-Dec-2010 Henrik Rydberg <rydberg@euromail.se>

input: mt: Move tracking and pointer emulation to input-mt

The drivers using the type B protocol all report tracking information
the same way. The contact id is semantically equivalent to
ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates
the driver. The situation can be improved upon by providing a common
pointer emulation code, thereby removing the need for the tracking id
in the driver. This patch moves all tracking event handling over to
the input core, simplifying both the existing drivers and the ones
currently in preparation.

Acked-by: Ping Cheng <pingc@wacom.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>


# 8cde8100 27-Nov-2010 Henrik Rydberg <rydberg@euromail.se>

input: mt: Collect slots initialization code

The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>


# 47c78e89 27-Nov-2010 Henrik Rydberg <rydberg@euromail.se>

input: mt: Break out slots handling

In preparation for common code to handle a larger set of MT slots
devices, move the slots handling over to a separate file.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>


# 5e8b9140 28-Aug-2010 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - add multitouch slot support

Some serial wacom devices support two-finger touch. Test for this during
init and parse the touch packets accordingly. Touch packets are
processed using Protocol B (MT Slots).

Note: there are several wacom versions that do touch but not two-finger
touch. These are not catered for here, touch events for these are simply
discarded.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# aaba933e 28-Aug-2010 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - support (and ignore) touch tablets

Tablets that support touch input may report different sized packages,
depending on the touch sensor in the tablet. For now, discard the
packages until we report them as touch input proper.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 2072f8db 28-Aug-2010 Peter Hutterer <peter.hutterer@who-t.net>

Input: wacom_w8001 - send BTN_TOOL_PEN/RUBBER and BTN_STYLUS events

The protocol used by the w8001 supports status fields for tip, side
switch and eraser as well as a RDY field for proximity.

The protocol has a double usage for the f2 bit in the packet. If set,
the data is either pen + side2 button or eraser. Assume eraser if the
device comes into proximity with the f2 bit set, otherwise trigger the
side2 button. If the device comes into proximity with the f2 bit and
that bit disappears afterwards, fake proximity out for the eraser and
proximity in for the pen.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 41c372dc 03-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: wacom_w8001 - simplify querying logic

There is no need for locking when we send query and start commands
to the touchscreen since there is no concurrency.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 3eb1aa43 19-Nov-2008 Jaya Kumar <jayakumar.lkml@gmail.com>

Input: add support for Wacom W8001 penabled serial touchscreen

The Wacom W8001 sensor is a sensor device (uses electromagnetic
resonance) and it is interfaced via its serial microcontroller
to the host.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>