History log of /linux-master/drivers/input/mouse/lifebook.c
Revision Date Author Comments
# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 2 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 version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

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

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


# c13b4186 22-Mar-2017 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - clean up code

- use u8 instead of unsigned char for byte data
- use input_set_capability() instead of manipulating capabilities bits
directly
- do not abuse -1 as error code, propagate errors from various calls.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1ef85805 07-Feb-2017 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: psmouse - create helper for reporting standard buttons/motion

Many protocol driver re-implement code to parse buttons or motion data from
the standard PS/2 protocol. Let's split the parsing into separate
functions and reuse them in protocol drivers.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 9096a45d 18-Jun-2016 Pali Rohár <pali@kernel.org>

Input: psmouse - use same format for secondary devices as for primary

This patch changes name of secondary psmouse devices to mach format of
primary device. Format of primary device is "protocol vendor name" and is
set by function psmouse_switch_protocol() in file psmouse-base.c.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 7e174702 20-Mar-2015 Brian K. Turner <turnerbk84@gmail.com>

Input: lifebook - fix tabbing issue

This change fixes a style issue where spaces where used instead of tabs.

Signed-off-by: Brian K. Turner <turnerbk84@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 3bd8a8b4 12-Aug-2013 Sachin Kamat <sachin.kamat@linaro.org>

Input: lifebook - fix incorrect placement of __initconst

__initconst should be placed between the variable name and equal
sign for the variable to be placed in the intended section.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# b5d21704 10-Oct-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: psmouse - switch to using dev_*() for messages

This will ensure our reporting is consistent with the rest of the system
and we do not refer to obsolete source file names.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: JJ Ding <dgdunix@gmail.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# fea2021c 13-Jul-2011 Axel Lin <axel.lin@gmail.com>

Input: lifebook - make dmi callback functions return 1

We only care about if there is a successful match from the table (or
no match at all), so let's make dmi_check_system return immediately
instead of iterating thorough the whole table.

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


# 5a0e3ad6 24-Mar-2010 Tejun Heo <tj@kernel.org>

include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>


# 57b5e2ae 28-Jan-2010 Jon Dodgson <crayzeejon@gmail.com>

Input: lifebook - add another Lifebook DMI signature

There are many many ways one can capitalize "Lifebook B Series"...

Signed-off-by: Jon Dodgson <crayzeejon@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 614af4ee 30-Dec-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - add CONFIG_DMI dependency

Lifebook protocol can only be activated if we find known DMI signature.
It is useles without DMI.

Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 9961e259 04-Dec-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: psmouse - remove identification strings from DMI tables

The driver does not reference identification strings in DMI tables and
since these strings are no longer required by DMI core we can safely
remove them and save some memory.

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


# 7705d548 04-Dec-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: psmouse - do not carry DMI data around

DMI tables use considerable amount of memory. Mark them as __initconst
so they will be discarded once module is loaded.

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


# 0cc1770b 16-Nov-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - do not advertise unsupported buttons

The main input device of Lifebook touchscreens does not generate
left/right/middle button events and therefore should not be advertising
them in its capabilities.

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


# b1e69aae 16-Nov-2009 Abner Holsinger <9zabner@gmail.com>

Input: lifebook - fix settings for CF-72

Panasonic CF-72 uses 6-byte protocol and does not need to be tied
to a particular port.

Signed-off-by: Abner Holsinger <9zabner@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# b7802c5c 09-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: psmouse - use boolean type

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


# 9b771ac4 08-May-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - don't send incomplete events

When we get a relative packet from trackpoint (when we deal with
touchscreen/trackpoint combo) we should not send events for the device
corresponding to touchscreen as it confuses evtouch driver (it looks
like it keeps previously reported absolute coordinates and the cursor
stays in the same place).

Reported-by: Marcin Drewka <laimoriel@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 6b9ff696 24-Apr-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - add DMI entry for Fujitsu B-2130

Although we already have entry for ZEPHYR the match is done
on product name whereas B-2130 BIOS has it in board name.

Reported-by: Yuriy Zhuravlev <stalkerg@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 653e91d0 16-Jan-2008 Andres Salomon <dilinger@queued.net>

Input: psmouse - fix input_dev leak in lifebook driver

The lifebook driver may register a second input device, but it never
unregisters it. This fixes that.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 7b19ada2 19-Oct-2007 Jiri Slaby <jirislaby@kernel.org>

get rid of input BIT* duplicate defines

get rid of input BIT* duplicate defines

use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 62e729b6 12-Oct-2007 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - fix X and Y axis range

Possible range when using 6-byte protocol is 4096 and 1024 for
3-byte protocol. We had it reversed.

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


# 1855256c 03-Oct-2007 Jeff Garzik <jeff@garzik.org>

drivers/firmware: const-ify DMI API and internals

Three main sets of changes:

1) dmi_get_system_info() return value should have been marked const,
since callers should not be changing that data.

2) const-ify DMI internals, since DMI firmware tables should,
whenever possible, be marked const to ensure we never ever write to
that data area.

3) const-ify DMI API, to enable marking tables const where possible
in low-level drivers.

And if we're really lucky, this might enable some additional
optimizations on the part of the compiler.

The bulk of the changes are #2 and #3, which are interrelated. #1 could
have been a separate patch, but it was so small compared to the others,
it was easier to roll it into this changeset.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>


# f76f672e 04-Sep-2007 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: lifebook - add signature of Panasonic CF-72

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


# e6b20d8d 19-Jul-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: lifebook - fix an oops on Panasonic CF-18

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


# 2ebdcc61 24-Apr-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: lifebook - split into 2 devices

Have lifebook protocol register 2 separate input devices -
one for the touchscreen reporting absolute coordinates and
touches and another one for touchpad reporting relative
coordinates and left and right button presses.

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


# 43887ba1 24-Apr-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: lifebook - add signature of Panasonic CF-29

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


# 1b118799 11-Apr-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: lifebook - activate 6-byte protocol on select models

It appears that if we turn on 6-byte Lifebook protocol on
Panasonic CF-28 its touchpad is left alone and generates
standard 3-byte PS/2 data stream with relative packets
instead of being converted in 3-byte Lifebook protocol with
absolute coordinates - in other words what get what we need
to distinguish between touchscreen and touchpad.

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


# e7afcd1b 11-Apr-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: lifebook - work properly on Panasonic CF-18

Panasonic CF18 has an active multiplexing controller with
touchscreen connected to one port and a touchpad to another.
Use "phys" from serio port to activate lifebook protoocol
only on the port that has touchscreen connected to it.

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


# b1b29650 02-Nov-2006 Andrew Morton <akpm@osdl.org>

Input: lifebook - learn about hard tabs

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 15e9acb8 02-Nov-2006 Greg Chandler <Greg.Chandler@wellsfargo.com>

Input: lifebook - add Hitachi Flora-IE 55mi tablet DMI signature

This adds another DMI detected touchscreen. It is exactly the same
driver as the existing ones, but this allows it to be detected on the
Hitachi Flora-IE 55mi tablet. The original Midori drivers are "abeo
antiquus". This should allow new life for these machines.

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


# 7d12e780 05-Oct-2006 David Howells <dhowells@redhat.com>

IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.

(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.

(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)


# e38de678 10-Sep-2006 Helge Deller <deller@gmx.de>

Input: constify psmouse driver

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 47ce56ed 29-May-2006 Kenan Esau <kenan.esau@conan.de>

Input: psmouse - DMI updates for lifebook protocol

Added different lifebook-versions and the CF-18 to the corresponding
dmi-table.

Signed-off-by: Kenan Esau <kenan.esau@conan.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 1f1a91e0 20-Dec-2005 Daniele Gozzi <daniele.gozzi@gmail.com>

Input: lifebook - add DMI signature of Fujitsu Lifebook B142

This DMI data was found in Fujitsu LifeBook B142 (Product S/N
FPC01003B, italian keyboard); re: bugzilla #5335

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


# 2e5b636b 15-Sep-2005 Dmitry Torokhov <dtor_core@ameritech.net>

[PATCH] drivers/input/mouse: convert to dynamic input_dev allocation

Input: convert drivers/input/mouse to dynamic input_dev allocation

This is required for input_dev sysfs integration

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a913829e 29-May-2005 Dmitry Torokhov <dtor_core@ameritech.net>

Input: apparently Lifebook touchscreens have double resolution
compared to "classic" PS/2 mice, provide appropriate
resolution setting handler.

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


# a15d60f8 29-May-2005 Dmitry Torokhov <dtor_core@ameritech.net>

Input: lifebook - adjust initialization routines to be in line with
the rest of protocols in preparation to dynamic protocol
switching.

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


# 14e94143 29-May-2005 Dmitry Torokhov <dtor_core@ameritech.net>

Input: lifebook - various cleanups:
- do not try to set rate and resolution in init method, let
psmouse core do it for us. This also removes special quirks
from the core;
- do not disable mouse before doing full reset - meaningless;
- some formatting and whitespace cleanups.

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


# 02d7f589 29-May-2005 Kenan Esau <kenan.esau@conan.de>

Input: Add Fujitsu Lifebook B-series touchscreen driver.

From: Kenan Esau <kenan.esau@conan.de>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>