UBUNTU: Start new release

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: Revert "brcmsmac: support 4313iPA"

This reverts commit b6fc28a158076ca2764edc9a6d1e1402f56e1c0c, which
causes failed association and performance regressions with some BCM4313
hardware versions.

Note that this also has the effect of reverting
7ffa592843c77b1f971a6d74d38d0000e6b18284 (brcmsmac: Use udelay instead
of usleep_range). If a fix for the regressions is found then both of
these patches should be reapplied along with the fix.

BugLink: http://bugs.launchpad.net/bugs/1157190
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - document the alps.h data structures

BugLink: http://bugs.launchpad.net/bugs/1089413

Add kernel-doc markup.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 88a803482c4165642409bab77424a27939d51500)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - copy "model" info into alps_data struct

BugLink: http://bugs.launchpad.net/bugs/1089413

Not every type of ALPS touchpad is well-suited to table-based detection.
Start moving the various alps_model_data attributes into the alps_data
struct so that we don't need a unique table entry for every possible
permutation of protocol version, flags, byte0/mask0, etc.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 99df65e705503a97a5fceb30317086a091b4052d)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - move alps_get_model() down below hw_init code

BugLink: http://bugs.launchpad.net/bugs/1089413

This will minimize the number of forward declarations needed when
alps_get_model() starts assigning function pointers.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 2e992cc030d8e4e42632bcc9e16605e629886778)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - introduce helper function for repeated commands

BugLink: http://bugs.launchpad.net/bugs/1089413

Several ALPS driver init sequences repeat a command three times, then
issue PSMOUSE_CMD_GETINFO to read the result.  Move this into a helper
function to simplify the code.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 24ba9707829818daab711eed7e41313d5e56d0b4)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - rework detection sequence

BugLink: http://bugs.launchpad.net/bugs/1089413

If the E6 report test passes, get the E7 and EC reports right away and
then try to match an entry in the table.

Pass in the alps_data struct, so that the detection code will be able to
set operating parameters based on information found during detection.

Change the version (psmouse->model) to report the protocol version only,
in preparation for supporting models that do not show up in the ID table.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit b5d6b851eab7f346ea5e69f46247b363b32b3670)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - use function pointers for different protocol handlers

BugLink: http://bugs.launchpad.net/bugs/1089413

In anticipation of adding more ALPS protocols and more per-device quirks,
use function pointers instead of switch statements to call functions that
differ from one device to the next.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 24af5cb95f1b93c6c72a73113494ace4bcbee5a2)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - move {addr,nibble}_command settings into alps_set_defaults()

BugLink: http://bugs.launchpad.net/bugs/1089413

This allows alps_identify() to override these settings based on the
device characteristics, if it is ever necessary.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 50e8b2162feb851f5af1372ba996640ad8d66fc9)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - rework detection of Pinnacle AGx touchpads

BugLink: http://bugs.launchpad.net/bugs/1089413

The official ALPS driver uses the EC report, not the E7 report, to detect
these devices.  Also, they check for a range of values; the original
table-based code only checked for two specific ones.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit f673ceb11b880e8535476326612e54c3e0cace5b)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - fix command mode check

BugLink: http://bugs.launchpad.net/bugs/1089413

Pinnacle class devices should return "88 07 xx" or "88 08 xx" when
entering command mode.  If either the first byte or the second byte is
invalid, return an error.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 56fd340ebb533cb45c5eaf350cf889c43c5911e6)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - move pixel and bitmap info into alps_data struct

BugLink: http://bugs.launchpad.net/bugs/1089413

Newer touchpads use different constants, so make them runtime-
configurable.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 7a9f73e75cd0dcd320166aa340141893bd1848d1)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - make the V3 packet field decoder "pluggable"

BugLink: http://bugs.launchpad.net/bugs/1089413

A number of different ALPS touchpad protocols can reuse
alps_process_touchpad_packet_v3() with small tweaks to the bitfield
decoding.  Create a new priv->decode_fields() callback that handles the
per-model differences.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit f85e5001cce0298a44e35e2f8acbf9abeadb6c03)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - add support for "Rushmore" touchpads

BugLink: http://bugs.launchpad.net/bugs/1089413

Rushmore touchpads are found on Dell E6230/E6430/E6530.  They use the V3
protocol with slightly tweaked init sequences and report formats.

The E7 report is 73 03 0a, and the EC report is 88 08 1d

Credits: Emmanuel Thome reported the MT bitmap changes.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 1302bac33d9e88cd43e482191a806998f3ed43cc)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - enable trackstick on Rushmore touchpads

BugLink: http://bugs.launchpad.net/bugs/1089413

Separate out the common trackstick probe/setup sequences, then call them
from each of the v3 init functions.

Credits: Emmanual Thome furnished the information on the trackstick init
and how it affected the report format.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit cd401204873101245287afc07271b39c79194d9c)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - remove unused argument to alps_enter_command_mode()

BugLink: http://bugs.launchpad.net/bugs/1089413

Now that alps_identify() explicitly issues an EC report using
alps_rpt_cmd(), we no longer need to look at the magic numbers returned
by alps_enter_command_mode().

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit d18e53fce2f6e42bfb8ac157547dd3f804385749)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Input: ALPS - add "Dolphin V1" touchpad support

BugLink: http://bugs.launchpad.net/bugs/1089413

These touchpads use a different protocol; they have been seen on Dell
N5110, Dell 17R SE, and others.

The official ALPS driver identifies them by looking for an exact match
on the E7 report: 73 03 50.  Dolphin V1 returns an EC report of
73 01 xx (02 and 0d have been seen); Dolphin V2 returns an EC report of
73 02 xx (02 has been seen).

Dolphin V2 probably needs a different initialization sequence and/or
report parser, so it is left for a future commit.

Signed-off-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 75af9e56c1e309a4132d15120d7061656609b84e)
Signed-off-by: James M Leddy <james.leddy@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>