OSDN Git Service

Merge branch 'bfin_rotary' into next
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 16 Feb 2015 00:07:18 +0000 (16:07 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 16 Feb 2015 00:07:18 +0000 (16:07 -0800)
Merge bfin_rotary driver changes from Sonic Zhang.

1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
MAINTAINERS
drivers/input/mouse/synaptics.c

@@@ -9,7 -9,6 +9,6 @@@ ad       Avionic Design Gmb
  adapteva      Adapteva, Inc.
  adi   Analog Devices, Inc.
  aeroflexgaisler       Aeroflex Gaisler AB
- ak    Asahi Kasei Corp.
  allwinner     Allwinner Technology Co., Ltd.
  altr  Altera Corp.
  amcc  Applied Micro Circuits Corporation (APM, formally AMCC)
@@@ -20,6 -19,7 +19,7 @@@ amstaos       AMS-Taos Inc
  apm   Applied Micro Circuits Corporation (APM)
  arm   ARM Ltd.
  armadeus      ARMadeus Systems SARL
+ asahi-kasei   Asahi Kasei Corp.
  atmel Atmel Corporation
  auo   AU Optronics Corporation
  avago Avago Technologies
@@@ -54,7 -54,6 +54,7 @@@ epcos EPCOS A
  epfl  Ecole Polytechnique Fédérale de Lausanne
  epson Seiko Epson Corp.
  est   ESTeem Wireless Modems
 +ettus NI Ettus Research
  eukrea  Eukréa Electromatique
  everest       Everest Semiconductor Co. Ltd.
  excito        Excito
@@@ -128,6 -127,7 +128,7 @@@ pixcir  PIXCIR MICROELECTRONICS Co., Lt
  powervr       PowerVR (deprecated, use img)
  qca   Qualcomm Atheros, Inc.
  qcom  Qualcomm Technologies, Inc
+ qemu  QEMU, a generic and open source machine emulator and virtualizer
  qnap  QNAP Systems, Inc.
  radxa Radxa
  raidsonic     RaidSonic Technology GmbH
@@@ -169,6 -169,7 +170,7 @@@ usi        Universal Scientific Industrial Co.
  v3    V3 Semiconductor
  variscite     Variscite Ltd.
  via   VIA Technologies, Inc.
+ virtio        Virtual I/O Device Specification, developed by the OASIS consortium
  voipac        Voipac Technologies s.r.o.
  winbond Winbond Electronics corp.
  wlf   Wolfson Microelectronics
diff --combined MAINTAINERS
@@@ -696,7 -696,7 +696,7 @@@ L: alsa-devel@alsa-project.org (moderat
  W:    http://blackfin.uclinux.org/
  S:    Supported
  F:    sound/soc/blackfin/*
-  
  ANALOG DEVICES INC IIO DRIVERS
  M:    Lars-Peter Clausen <lars@metafoo.de>
  M:    Michael Hennerich <Michael.Hennerich@analog.com>
@@@ -708,6 -708,16 +708,16 @@@ X:       drivers/iio/*/adjd
  F:    drivers/staging/iio/*/ad*
  F:    staging/iio/trigger/iio-trig-bfin-timer.c
  
+ ANDROID DRIVERS
+ M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+ M:    Arve Hjønnevåg <arve@android.com>
+ M:    Riley Andrews <riandrews@android.com>
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/gregkh/staging.git
+ L:    devel@driverdev.osuosl.org
+ S:    Supported
+ F:    drivers/android/
+ F:    drivers/staging/android/
  AOA (Apple Onboard Audio) ALSA DRIVER
  M:    Johannes Berg <johannes@sipsolutions.net>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -754,13 -764,6 +764,6 @@@ L:        linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/i2c/aptina-pll.*
  
- ARASAN COMPACT FLASH PATA CONTROLLER
- M:    Viresh Kumar <viresh.linux@gmail.com>
- L:    linux-ide@vger.kernel.org
- S:    Maintained
- F:    include/linux/pata_arasan_cf_data.h
- F:    drivers/ata/pata_arasan_cf.c
  ARC FRAMEBUFFER DRIVER
  M:    Jaya Kumar <jayalk@intworks.biz>
  S:    Maintained
@@@ -2346,7 -2349,8 +2349,8 @@@ CAN NETWORK LAYE
  M:    Oliver Hartkopp <socketcan@hartkopp.net>
  L:    linux-can@vger.kernel.org
  W:    http://gitorious.org/linux-can
- T:    git git://gitorious.org/linux-can/linux-can-next.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
  S:    Maintained
  F:    Documentation/networking/can.txt
  F:    net/can/
@@@ -2361,7 -2365,8 +2365,8 @@@ M:      Wolfgang Grandegger <wg@grandegger.c
  M:    Marc Kleine-Budde <mkl@pengutronix.de>
  L:    linux-can@vger.kernel.org
  W:    http://gitorious.org/linux-can
- T:    git git://gitorious.org/linux-can/linux-can-next.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
  S:    Maintained
  F:    drivers/net/can/
  F:    include/linux/can/dev.h
@@@ -3183,7 -3188,7 +3188,7 @@@ L:      dmaengine@vger.kernel.or
  Q:    https://patchwork.kernel.org/project/linux-dmaengine/list/
  S:    Maintained
  F:    drivers/dma/
- F:    include/linux/dma*
+ F:    include/linux/dmaengine.h
  F:    Documentation/dmaengine/
  T:    git git://git.infradead.org/users/vkoul/slave-dma.git
  
@@@ -3467,14 -3472,6 +3472,14 @@@ M:    "Maciej W. Rozycki" <macro@linux-mip
  S:    Maintained
  F:    drivers/tty/serial/dz.*
  
 +E3X0 POWER BUTTON DRIVER
 +M:    Moritz Fischer <moritz.fischer@ettus.com>
 +L:    usrp-users@lists.ettus.com
 +W:    http://www.ettus.com
 +S:    Supported
 +F:    drivers/input/misc/e3x0-button.c
 +F:    Documentation/devicetree/bindings/input/e3x0-button.txt
 +
  E4000 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -4757,20 -4754,20 +4762,20 @@@ S:   Supporte
  F:    drivers/scsi/ipr.*
  
  IBM Power Virtual Ethernet Device Driver
- M:    Santiago Leon <santil@linux.vnet.ibm.com>
+ M:    Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/ibm/ibmveth.*
  
  IBM Power Virtual SCSI Device Drivers
- M:    Nathan Fontenot <nfont@linux.vnet.ibm.com>
+ M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/ibmvscsi/ibmvscsi*
  F:    drivers/scsi/ibmvscsi/viosrp.h
  
  IBM Power Virtual FC Device Drivers
- M:    Brian King <brking@linux.vnet.ibm.com>
+ M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/ibmvscsi/ibmvfc*
@@@ -4938,7 -4935,6 +4943,6 @@@ F:      include/uapi/linux/inotify.
  
  INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
  M:    Dmitry Torokhov <dmitry.torokhov@gmail.com>
- M:    Dmitry Torokhov <dtor@mail.ru>
  L:    linux-input@vger.kernel.org
  Q:    http://patchwork.kernel.org/project/linux-input/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
@@@ -4957,10 -4953,19 +4961,19 @@@ F:   Documentation/input/multi-touch-prot
  F:    drivers/input/input-mt.c
  K:    \b(ABS|SYN)_MT_
  
+ INTEL ASoC BDW/HSW DRIVERS
+ M:    Jie Yang <yang.jie@linux.intel.com>
+ L:    alsa-devel@alsa-project.org
+ S:    Supported
+ F:    sound/soc/intel/sst-haswell*
+ F:    sound/soc/intel/sst-dsp*
+ F:    sound/soc/intel/sst-firmware.c
+ F:    sound/soc/intel/broadwell.c
+ F:    sound/soc/intel/haswell.c
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:    Intel SCU Linux support <intel-linux-scu@intel.com>
  M:    Artur Paszkiewicz <artur.paszkiewicz@intel.com>
- M:    Dave Jiang <dave.jiang@intel.com>
  L:    linux-scsi@vger.kernel.org
  T:    git git://git.code.sf.net/p/intel-sas/isci
  S:    Supported
@@@ -5288,6 -5293,15 +5301,15 @@@ W:    www.open-iscsi.or
  Q:    http://patchwork.kernel.org/project/linux-rdma/list/
  F:    drivers/infiniband/ulp/iser/
  
+ ISCSI EXTENSIONS FOR RDMA (ISER) TARGET
+ M:    Sagi Grimberg <sagig@mellanox.com>
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master
+ L:    linux-rdma@vger.kernel.org
+ L:    target-devel@vger.kernel.org
+ S:    Supported
+ W:    http://www.linux-iscsi.org
+ F:    drivers/infiniband/ulp/isert
  ISDN SUBSYSTEM
  M:    Karsten Keil <isdn@linux-pingi.de>
  L:    isdn4linux@listserv.isdn4linux.de (subscribers-only)
@@@ -5702,6 -5716,49 +5724,49 @@@ F:    drivers/lguest
  F:    include/linux/lguest*.h
  F:    tools/lguest/
  
+ LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)
+ M:    Tejun Heo <tj@kernel.org>
+ L:    linux-ide@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+ S:    Maintained
+ F:    drivers/ata/
+ F:    include/linux/ata.h
+ F:    include/linux/libata.h
+ LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
+ M:    Viresh Kumar <viresh.linux@gmail.com>
+ L:    linux-ide@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+ S:    Maintained
+ F:    include/linux/pata_arasan_cf_data.h
+ F:    drivers/ata/pata_arasan_cf.c
+ LIBATA PATA DRIVERS
+ M:    Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+ M:    Tejun Heo <tj@kernel.org>
+ L:    linux-ide@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+ S:    Maintained
+ F:    drivers/ata/pata_*.c
+ F:    drivers/ata/ata_generic.c
+ LIBATA SATA AHCI PLATFORM devices support
+ M:    Hans de Goede <hdegoede@redhat.com>
+ M:    Tejun Heo <tj@kernel.org>
+ L:    linux-ide@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+ S:    Maintained
+ F:    drivers/ata/ahci_platform.c
+ F:    drivers/ata/libahci_platform.c
+ F:    include/linux/ahci_platform.h
+ LIBATA SATA PROMISE TX2/TX4 CONTROLLER DRIVER
+ M:    Mikael Pettersson <mikpelinux@gmail.com>
+ L:    linux-ide@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+ S:    Maintained
+ F:    drivers/ata/sata_promise.*
  LIBLOCKDEP
  M:    Sasha Levin <sasha.levin@oracle.com>
  S:    Maintained
@@@ -6986,14 -7043,12 +7051,12 @@@ OPEN FIRMWARE AND FLATTENED DEVICE TRE
  M:    Grant Likely <grant.likely@linaro.org>
  M:    Rob Herring <robh+dt@kernel.org>
  L:    devicetree@vger.kernel.org
- W:    http://fdt.secretlab.ca
- T:    git git://git.secretlab.ca/git/linux-2.6.git
+ W:    http://www.devicetree.org/
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux.git
  S:    Maintained
  F:    drivers/of/
  F:    include/linux/of*.h
  F:    scripts/dtc/
- K:    of_get_property
- K:    of_match_table
  
  OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
  M:    Rob Herring <robh+dt@kernel.org>
@@@ -7238,7 -7293,7 +7301,7 @@@ S:      Maintaine
  F:    drivers/pci/host/*layerscape*
  
  PCI DRIVER FOR IMX6
- M:    Richard Zhu <r65037@freescale.com>
+ M:    Richard Zhu <Richard.Zhu@freescale.com>
  M:    Lucas Stach <l.stach@pengutronix.de>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -7408,6 -7463,7 +7471,7 @@@ F:      drivers/crypto/picoxcell
  PIN CONTROL SUBSYSTEM
  M:    Linus Walleij <linus.walleij@linaro.org>
  L:    linux-gpio@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
  S:    Maintained
  F:    drivers/pinctrl/
  F:    include/linux/pinctrl/
@@@ -7575,12 -7631,6 +7639,6 @@@ W:     http://wireless.kernel.org/en/users/
  S:    Obsolete
  F:    drivers/net/wireless/prism54/
  
- PROMISE SATA TX2/TX4 CONTROLLER LIBATA DRIVER
- M:    Mikael Pettersson <mikpelinux@gmail.com>
- L:    linux-ide@vger.kernel.org
- S:    Maintained
- F:    drivers/ata/sata_promise.*
  PS3 NETWORK SUPPORT
  M:    Geoff Levand <geoff@infradead.org>
  L:    netdev@vger.kernel.org
@@@ -7746,8 -7796,7 +7804,7 @@@ F:      Documentation/scsi/LICENSE.qla2xx
  F:    drivers/scsi/qla2xxx/
  
  QLOGIC QLA4XXX iSCSI DRIVER
- M:    Vikas Chaudhary <vikas.chaudhary@qlogic.com>
- M:    iscsi-driver@qlogic.com
+ M:    QLogic-Storage-Upstream@qlogic.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    Documentation/scsi/LICENSE.qla4xxx
@@@ -8555,25 -8604,6 +8612,6 @@@ S:     Maintaine
  F:    drivers/misc/phantom.c
  F:    include/uapi/linux/phantom.h
  
- SERIAL ATA (SATA) SUBSYSTEM
- M:    Tejun Heo <tj@kernel.org>
- L:    linux-ide@vger.kernel.org
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
- S:    Supported
- F:    drivers/ata/
- F:    include/linux/ata.h
- F:    include/linux/libata.h
- SERIAL ATA AHCI PLATFORM devices support
- M:    Hans de Goede <hdegoede@redhat.com>
- M:    Tejun Heo <tj@kernel.org>
- L:    linux-ide@vger.kernel.org
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
- S:    Supported
- F:    drivers/ata/ahci_platform.c
- F:    drivers/ata/libahci_platform.c
- F:    include/linux/ahci_platform.h
  SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
  M:    Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
  L:    linux-scsi@vger.kernel.org
@@@ -9213,13 -9243,6 +9251,13 @@@ F:    arch/m68k/sun3*
  F:    arch/m68k/include/asm/sun3*
  F:    drivers/net/ethernet/i825xx/sun3*
  
 +SUN4I LOW RES ADC ATTACHED TABLET KEYS DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
 +F:    drivers/input/keyboard/sun4i-lradc-keys.c
 +
  SUNDANCE NETWORK DRIVER
  M:    Denis Kirjanov <kda@linux-powerpc.org>
  L:    netdev@vger.kernel.org
@@@ -9228,7 -9251,6 +9266,6 @@@ F:      drivers/net/ethernet/dlink/sundance.
  
  SUPERH
  L:    linux-sh@vger.kernel.org
- W:    http://www.linux-sh.org
  Q:    http://patchwork.kernel.org/project/linux-sh/list/
  S:    Orphan
  F:    Documentation/sh/
@@@ -9549,7 -9571,8 +9586,8 @@@ F:      drivers/platform/x86/thinkpad_acpi.
  TI BANDGAP AND THERMAL DRIVER
  M:    Eduardo Valentin <edubezval@gmail.com>
  L:    linux-pm@vger.kernel.org
- S:    Supported
+ L:    linux-omap@vger.kernel.org
+ S:    Maintained
  F:    drivers/thermal/ti-soc-thermal/
  
  TI CLOCK DRIVER
@@@ -10162,6 -10185,7 +10200,7 @@@ USERSPACE I/O (UIO
  M:    "Hans J. Koch" <hjk@hansjkoch.de>
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  S:    Maintained
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  F:    Documentation/DocBook/uio-howto.tmpl
  F:    drivers/uio/
  F:    include/linux/uio*.h
@@@ -67,9 -67,6 +67,9 @@@
  #define X_MAX_POSITIVE 8176
  #define Y_MAX_POSITIVE 8176
  
 +/* maximum ABS_MT_POSITION displacement (in mm) */
 +#define DMAX 10
 +
  /*****************************************************************************
   *    Stuff we need even when we do not want native Synaptics support
   ****************************************************************************/
@@@ -138,8 -135,9 +138,9 @@@ static const struct min_max_quirk min_m
                1232, 5710, 1156, 4696
        },
        {
-               (const char * const []){"LEN0034", "LEN0036", "LEN0039",
-                                       "LEN2002", "LEN2004", NULL},
+               (const char * const []){"LEN0034", "LEN0036", "LEN0037",
+                                       "LEN0039", "LEN2002", "LEN2004",
+                                       NULL},
                1024, 5112, 2024, 4832
        },
        {
@@@ -168,7 -166,7 +169,7 @@@ static const char * const topbuttonpad_
        "LEN0034", /* T431s, L440, L540, T540, W540, X1 Carbon 2nd */
        "LEN0035", /* X240 */
        "LEN0036", /* T440 */
-       "LEN0037",
+       "LEN0037", /* X1 Carbon 2nd */
        "LEN0038",
        "LEN0039", /* T440s */
        "LEN0041",
@@@ -577,6 -575,14 +578,6 @@@ static void synaptics_pt_create(struct 
   *    Functions to interpret the absolute mode packets
   ****************************************************************************/
  
 -static void synaptics_mt_state_set(struct synaptics_mt_state *state, int count,
 -                                 int sgm, int agm)
 -{
 -      state->count = count;
 -      state->sgm = sgm;
 -      state->agm = agm;
 -}
 -
  static void synaptics_parse_agm(const unsigned char buf[],
                                struct synaptics_data *priv,
                                struct synaptics_hw_state *hw)
                break;
  
        case 2:
 -              /* AGM-CONTACT packet: (count, sgm, agm) */
 -              synaptics_mt_state_set(&agm->mt_state, buf[1], buf[2], buf[4]);
 +              /* AGM-CONTACT packet: we are only interested in the count */
 +              priv->agm_count = buf[1];
                break;
  
        default:
                break;
        }
 -
 -      /* Record that at least one AGM has been received since last SGM */
 -      priv->agm_pending = true;
  }
  
  static bool is_forcepad;
@@@ -795,68 -804,424 +796,68 @@@ static void synaptics_report_buttons(st
                input_report_key(dev, BTN_0 + i, hw->ext_buttons & (1 << i));
  }
  
 -static void synaptics_report_slot(struct input_dev *dev, int slot,
 -                                const struct synaptics_hw_state *hw)
 -{
 -      input_mt_slot(dev, slot);
 -      input_mt_report_slot_state(dev, MT_TOOL_FINGER, (hw != NULL));
 -      if (!hw)
 -              return;
 -
 -      input_report_abs(dev, ABS_MT_POSITION_X, hw->x);
 -      input_report_abs(dev, ABS_MT_POSITION_Y, synaptics_invert_y(hw->y));
 -      input_report_abs(dev, ABS_MT_PRESSURE, hw->z);
 -}
 -
  static void synaptics_report_mt_data(struct psmouse *psmouse,
 -                                   struct synaptics_mt_state *mt_state,
 -                                   const struct synaptics_hw_state *sgm)
 +                                   const struct synaptics_hw_state *sgm,
 +                                   int num_fingers)
  {
        struct input_dev *dev = psmouse->dev;
        struct synaptics_data *priv = psmouse->private;
 -      struct synaptics_hw_state *agm = &priv->agm;
 -      struct synaptics_mt_state *old = &priv->mt_state;
 +      const struct synaptics_hw_state *hw[2] = { sgm, &priv->agm };
 +      struct input_mt_pos pos[2];
 +      int slot[2], nsemi, i;
  
 -      switch (mt_state->count) {
 -      case 0:
 -              synaptics_report_slot(dev, 0, NULL);
 -              synaptics_report_slot(dev, 1, NULL);
 -              break;
 -      case 1:
 -              if (mt_state->sgm == -1) {
 -                      synaptics_report_slot(dev, 0, NULL);
 -                      synaptics_report_slot(dev, 1, NULL);
 -              } else if (mt_state->sgm == 0) {
 -                      synaptics_report_slot(dev, 0, sgm);
 -                      synaptics_report_slot(dev, 1, NULL);
 -              } else {
 -                      synaptics_report_slot(dev, 0, NULL);
 -                      synaptics_report_slot(dev, 1, sgm);
 -              }
 -              break;
 -      default:
 -              /*
 -               * If the finger slot contained in SGM is valid, and either
 -               * hasn't changed, or is new, or the old SGM has now moved to
 -               * AGM, then report SGM in MTB slot 0.
 -               * Otherwise, empty MTB slot 0.
 -               */
 -              if (mt_state->sgm != -1 &&
 -                  (mt_state->sgm == old->sgm ||
 -                   old->sgm == -1 || mt_state->agm == old->sgm))
 -                      synaptics_report_slot(dev, 0, sgm);
 -              else
 -                      synaptics_report_slot(dev, 0, NULL);
 +      nsemi = clamp_val(num_fingers, 0, 2);
  
 -              /*
 -               * If the finger slot contained in AGM is valid, and either
 -               * hasn't changed, or is new, then report AGM in MTB slot 1.
 -               * Otherwise, empty MTB slot 1.
 -               *
 -               * However, in the case where the AGM is new, make sure that
 -               * that it is either the same as the old SGM, or there was no
 -               * SGM.
 -               *
 -               * Otherwise, if the SGM was just 1, and the new AGM is 2, then
 -               * the new AGM will keep the old SGM's tracking ID, which can
 -               * cause apparent drumroll.  This happens if in the following
 -               * valid finger sequence:
 -               *
 -               *  Action                 SGM  AGM (MTB slot:Contact)
 -               *  1. Touch contact 0    (0:0)
 -               *  2. Touch contact 1    (0:0, 1:1)
 -               *  3. Lift  contact 0    (1:1)
 -               *  4. Touch contacts 2,3 (0:2, 1:3)
 -               *
 -               * In step 4, contact 3, in AGM must not be given the same
 -               * tracking ID as contact 1 had in step 3.  To avoid this,
 -               * the first agm with contact 3 is dropped and slot 1 is
 -               * invalidated (tracking ID = -1).
 -               */
 -              if (mt_state->agm != -1 &&
 -                  (mt_state->agm == old->agm ||
 -                   (old->agm == -1 &&
 -                    (old->sgm == -1 || mt_state->agm == old->sgm))))
 -                      synaptics_report_slot(dev, 1, agm);
 -              else
 -                      synaptics_report_slot(dev, 1, NULL);
 -              break;
 +      for (i = 0; i < nsemi; i++) {
 +              pos[i].x = hw[i]->x;
 +              pos[i].y = synaptics_invert_y(hw[i]->y);
        }
  
 +      input_mt_assign_slots(dev, slot, pos, nsemi, DMAX * priv->x_res);
 +
 +      for (i = 0; i < nsemi; i++) {
 +              input_mt_slot(dev, slot[i]);
 +              input_mt_report_slot_state(dev, MT_TOOL_FINGER, true);
 +              input_report_abs(dev, ABS_MT_POSITION_X, pos[i].x);
 +              input_report_abs(dev, ABS_MT_POSITION_Y, pos[i].y);
 +              input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
 +      }
 +
 +      input_mt_drop_unused(dev);
 +
        /* Don't use active slot count to generate BTN_TOOL events. */
        input_mt_report_pointer_emulation(dev, false);
  
        /* Send the number of fingers reported by touchpad itself. */
 -      input_mt_report_finger_count(dev, mt_state->count);
 +      input_mt_report_finger_count(dev, num_fingers);
  
        synaptics_report_buttons(psmouse, sgm);
  
        input_sync(dev);
  }
  
 -/* Handle case where mt_state->count = 0 */
 -static void synaptics_image_sensor_0f(struct synaptics_data *priv,
 -                                    struct synaptics_mt_state *mt_state)
 -{
 -      synaptics_mt_state_set(mt_state, 0, -1, -1);
 -      priv->mt_state_lost = false;
 -}
 -
 -/* Handle case where mt_state->count = 1 */
 -static void synaptics_image_sensor_1f(struct synaptics_data *priv,
 -                                    struct synaptics_mt_state *mt_state)
 -{
 -      struct synaptics_hw_state *agm = &priv->agm;
 -      struct synaptics_mt_state *old = &priv->mt_state;
 -
 -      /*
 -       * If the last AGM was (0,0,0), and there is only one finger left,
 -       * then we absolutely know that SGM contains slot 0, and all other
 -       * fingers have been removed.
 -       */
 -      if (priv->agm_pending && agm->z == 0) {
 -              synaptics_mt_state_set(mt_state, 1, 0, -1);
 -              priv->mt_state_lost = false;
 -              return;
 -      }
 -
 -      switch (old->count) {
 -      case 0:
 -              synaptics_mt_state_set(mt_state, 1, 0, -1);
 -              break;
 -      case 1:
 -              /*
 -               * If mt_state_lost, then the previous transition was 3->1,
 -               * and SGM now contains either slot 0 or 1, but we don't know
 -               * which.  So, we just assume that the SGM now contains slot 1.
 -               *
 -               * If pending AGM and either:
 -               *   (a) the previous SGM slot contains slot 0, or
 -               *   (b) there was no SGM slot
 -               * then, the SGM now contains slot 1
 -               *
 -               * Case (a) happens with very rapid "drum roll" gestures, where
 -               * slot 0 finger is lifted and a new slot 1 finger touches
 -               * within one reporting interval.
 -               *
 -               * Case (b) happens if initially two or more fingers tap
 -               * briefly, and all but one lift before the end of the first
 -               * reporting interval.
 -               *
 -               * (In both these cases, slot 0 will becomes empty, so SGM
 -               * contains slot 1 with the new finger)
 -               *
 -               * Else, if there was no previous SGM, it now contains slot 0.
 -               *
 -               * Otherwise, SGM still contains the same slot.
 -               */
 -              if (priv->mt_state_lost ||
 -                  (priv->agm_pending && old->sgm <= 0))
 -                      synaptics_mt_state_set(mt_state, 1, 1, -1);
 -              else if (old->sgm == -1)
 -                      synaptics_mt_state_set(mt_state, 1, 0, -1);
 -              break;
 -      case 2:
 -              /*
 -               * If mt_state_lost, we don't know which finger SGM contains.
 -               *
 -               * So, report 1 finger, but with both slots empty.
 -               * We will use slot 1 on subsequent 1->1
 -               */
 -              if (priv->mt_state_lost) {
 -                      synaptics_mt_state_set(mt_state, 1, -1, -1);
 -                      break;
 -              }
 -              /*
 -               * Since the last AGM was NOT (0,0,0), it was the finger in
 -               * slot 0 that has been removed.
 -               * So, SGM now contains previous AGM's slot, and AGM is now
 -               * empty.
 -               */
 -              synaptics_mt_state_set(mt_state, 1, old->agm, -1);
 -              break;
 -      case 3:
 -              /*
 -               * Since last AGM was not (0,0,0), we don't know which finger
 -               * is left.
 -               *
 -               * So, report 1 finger, but with both slots empty.
 -               * We will use slot 1 on subsequent 1->1
 -               */
 -              synaptics_mt_state_set(mt_state, 1, -1, -1);
 -              priv->mt_state_lost = true;
 -              break;
 -      case 4:
 -      case 5:
 -              /* mt_state was updated by AGM-CONTACT packet */
 -              break;
 -      }
 -}
 -
 -/* Handle case where mt_state->count = 2 */
 -static void synaptics_image_sensor_2f(struct synaptics_data *priv,
 -                                    struct synaptics_mt_state *mt_state)
 -{
 -      struct synaptics_mt_state *old = &priv->mt_state;
 -
 -      switch (old->count) {
 -      case 0:
 -              synaptics_mt_state_set(mt_state, 2, 0, 1);
 -              break;
 -      case 1:
 -              /*
 -               * If previous SGM contained slot 1 or higher, SGM now contains
 -               * slot 0 (the newly touching finger) and AGM contains SGM's
 -               * previous slot.
 -               *
 -               * Otherwise, SGM still contains slot 0 and AGM now contains
 -               * slot 1.
 -               */
 -              if (old->sgm >= 1)
 -                      synaptics_mt_state_set(mt_state, 2, 0, old->sgm);
 -              else
 -                      synaptics_mt_state_set(mt_state, 2, 0, 1);
 -              break;
 -      case 2:
 -              /*
 -               * If mt_state_lost, SGM now contains either finger 1 or 2, but
 -               * we don't know which.
 -               * So, we just assume that the SGM contains slot 0 and AGM 1.
 -               */
 -              if (priv->mt_state_lost)
 -                      synaptics_mt_state_set(mt_state, 2, 0, 1);
 -              /*
 -               * Otherwise, use the same mt_state, since it either hasn't
 -               * changed, or was updated by a recently received AGM-CONTACT
 -               * packet.
 -               */
 -              break;
 -      case 3:
 -              /*
 -               * 3->2 transitions have two unsolvable problems:
 -               *  1) no indication is given which finger was removed
 -               *  2) no way to tell if agm packet was for finger 3
 -               *     before 3->2, or finger 2 after 3->2.
 -               *
 -               * So, report 2 fingers, but empty all slots.
 -               * We will guess slots [0,1] on subsequent 2->2.
 -               */
 -              synaptics_mt_state_set(mt_state, 2, -1, -1);
 -              priv->mt_state_lost = true;
 -              break;
 -      case 4:
 -      case 5:
 -              /* mt_state was updated by AGM-CONTACT packet */
 -              break;
 -      }
 -}
 -
 -/* Handle case where mt_state->count = 3 */
 -static void synaptics_image_sensor_3f(struct synaptics_data *priv,
 -                                    struct synaptics_mt_state *mt_state)
 -{
 -      struct synaptics_mt_state *old = &priv->mt_state;
 -
 -      switch (old->count) {
 -      case 0:
 -              synaptics_mt_state_set(mt_state, 3, 0, 2);
 -              break;
 -      case 1:
 -              /*
 -               * If previous SGM contained slot 2 or higher, SGM now contains
 -               * slot 0 (one of the newly touching fingers) and AGM contains
 -               * SGM's previous slot.
 -               *
 -               * Otherwise, SGM now contains slot 0 and AGM contains slot 2.
 -               */
 -              if (old->sgm >= 2)
 -                      synaptics_mt_state_set(mt_state, 3, 0, old->sgm);
 -              else
 -                      synaptics_mt_state_set(mt_state, 3, 0, 2);
 -              break;
 -      case 2:
 -              /*
 -               * If the AGM previously contained slot 3 or higher, then the
 -               * newly touching finger is in the lowest available slot.
 -               *
 -               * If SGM was previously 1 or higher, then the new SGM is
 -               * now slot 0 (with a new finger), otherwise, the new finger
 -               * is now in a hidden slot between 0 and AGM's slot.
 -               *
 -               * In all such cases, the SGM now contains slot 0, and the AGM
 -               * continues to contain the same slot as before.
 -               */
 -              if (old->agm >= 3) {
 -                      synaptics_mt_state_set(mt_state, 3, 0, old->agm);
 -                      break;
 -              }
 -
 -              /*
 -               * After some 3->1 and all 3->2 transitions, we lose track
 -               * of which slot is reported by SGM and AGM.
 -               *
 -               * For 2->3 in this state, report 3 fingers, but empty all
 -               * slots, and we will guess (0,2) on a subsequent 0->3.
 -               *
 -               * To userspace, the resulting transition will look like:
 -               *    2:[0,1] -> 3:[-1,-1] -> 3:[0,2]
 -               */
 -              if (priv->mt_state_lost) {
 -                      synaptics_mt_state_set(mt_state, 3, -1, -1);
 -                      break;
 -              }
 -
 -              /*
 -               * If the (SGM,AGM) really previously contained slots (0, 1),
 -               * then we cannot know what slot was just reported by the AGM,
 -               * because the 2->3 transition can occur either before or after
 -               * the AGM packet. Thus, this most recent AGM could contain
 -               * either the same old slot 1 or the new slot 2.
 -               * Subsequent AGMs will be reporting slot 2.
 -               *
 -               * To userspace, the resulting transition will look like:
 -               *    2:[0,1] -> 3:[0,-1] -> 3:[0,2]
 -               */
 -              synaptics_mt_state_set(mt_state, 3, 0, -1);
 -              break;
 -      case 3:
 -              /*
 -               * If, for whatever reason, the previous agm was invalid,
 -               * Assume SGM now contains slot 0, AGM now contains slot 2.
 -               */
 -              if (old->agm <= 2)
 -                      synaptics_mt_state_set(mt_state, 3, 0, 2);
 -              /*
 -               * mt_state either hasn't changed, or was updated by a recently
 -               * received AGM-CONTACT packet.
 -               */
 -              break;
 -
 -      case 4:
 -      case 5:
 -              /* mt_state was updated by AGM-CONTACT packet */
 -              break;
 -      }
 -}
 -
 -/* Handle case where mt_state->count = 4, or = 5 */
 -static void synaptics_image_sensor_45f(struct synaptics_data *priv,
 -                                     struct synaptics_mt_state *mt_state)
 -{
 -      /* mt_state was updated correctly by AGM-CONTACT packet */
 -      priv->mt_state_lost = false;
 -}
 -
  static void synaptics_image_sensor_process(struct psmouse *psmouse,
                                           struct synaptics_hw_state *sgm)
  {
        struct synaptics_data *priv = psmouse->private;
 -      struct synaptics_hw_state *agm = &priv->agm;
 -      struct synaptics_mt_state mt_state;
 -
 -      /* Initialize using current mt_state (as updated by last agm) */
 -      mt_state = agm->mt_state;
 +      int num_fingers;
  
        /*
         * Update mt_state using the new finger count and current mt_state.
         */
        if (sgm->z == 0)
 -              synaptics_image_sensor_0f(priv, &mt_state);
 +              num_fingers = 0;
        else if (sgm->w >= 4)
 -              synaptics_image_sensor_1f(priv, &mt_state);
 +              num_fingers = 1;
        else if (sgm->w == 0)
 -              synaptics_image_sensor_2f(priv, &mt_state);
 -      else if (sgm->w == 1 && mt_state.count <= 3)
 -              synaptics_image_sensor_3f(priv, &mt_state);
 +              num_fingers = 2;
 +      else if (sgm->w == 1)
 +              num_fingers = priv->agm_count ? priv->agm_count : 3;
        else
 -              synaptics_image_sensor_45f(priv, &mt_state);
 +              num_fingers = 4;
  
        /* Send resulting input events to user space */
 -      synaptics_report_mt_data(psmouse, &mt_state, sgm);
 -
 -      /* Store updated mt_state */
 -      priv->mt_state = agm->mt_state = mt_state;
 -      priv->agm_pending = false;
 -}
 -
 -static void synaptics_profile_sensor_process(struct psmouse *psmouse,
 -                                           struct synaptics_hw_state *sgm,
 -                                           int num_fingers)
 -{
 -      struct input_dev *dev = psmouse->dev;
 -      struct synaptics_data *priv = psmouse->private;
 -      struct synaptics_hw_state *hw[2] = { sgm, &priv->agm };
 -      struct input_mt_pos pos[2];
 -      int slot[2], nsemi, i;
 -
 -      nsemi = clamp_val(num_fingers, 0, 2);
 -
 -      for (i = 0; i < nsemi; i++) {
 -              pos[i].x = hw[i]->x;
 -              pos[i].y = synaptics_invert_y(hw[i]->y);
 -      }
 -
 -      input_mt_assign_slots(dev, slot, pos, nsemi);
 -
 -      for (i = 0; i < nsemi; i++) {
 -              input_mt_slot(dev, slot[i]);
 -              input_mt_report_slot_state(dev, MT_TOOL_FINGER, true);
 -              input_report_abs(dev, ABS_MT_POSITION_X, pos[i].x);
 -              input_report_abs(dev, ABS_MT_POSITION_Y, pos[i].y);
 -              input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
 -      }
 -
 -      input_mt_drop_unused(dev);
 -      input_mt_report_pointer_emulation(dev, false);
 -      input_mt_report_finger_count(dev, num_fingers);
 -
 -      synaptics_report_buttons(psmouse, sgm);
 -
 -      input_sync(dev);
 +      synaptics_report_mt_data(psmouse, sgm, num_fingers);
  }
  
  /*
@@@ -923,7 -1288,7 +924,7 @@@ static void synaptics_process_packet(st
        }
  
        if (cr48_profile_sensor) {
 -              synaptics_profile_sensor_process(psmouse, &hw, num_fingers);
 +              synaptics_report_mt_data(psmouse, &hw, num_fingers);
                return;
        }
  
@@@ -1080,7 -1445,7 +1081,7 @@@ static void set_input_params(struct psm
                                        ABS_MT_POSITION_Y);
                /* Image sensors can report per-contact pressure */
                input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
 -              input_mt_init_slots(dev, 2, INPUT_MT_POINTER);
 +              input_mt_init_slots(dev, 2, INPUT_MT_POINTER | INPUT_MT_TRACK);
  
                /* Image sensors can signal 4 and 5 finger clicks */
                __set_bit(BTN_TOOL_QUADTAP, dev->keybit);