Commit graph

134,929 commits

Author SHA1 Message Date
Larry Finger
ebbef649f9 staging: rtl8192e: Convert typedef rtl_reg_debug to struct rtl_reg_debug
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:38:15 -05:00
Larry Finger
51ce231f6a staging: rtl8192e: Convert typedef SwChnlCmd to struct sw_chnl_cmd
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:37:55 -05:00
Larry Finger
5aca114d91 staging: rtl8192e: Convert typedef rt_firmware to struct rt_firmware
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:37:28 -05:00
Larry Finger
b25765ce99 staging: rtl8192e: Convert typedef fw_seg_container to struct fw_seg_container
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:37:02 -05:00
Larry Finger
1b419253af staging: rtl8192e: Convert typedef cmpk_tx_rahis_t to struct cmpk_tx_rahis
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:36:43 -05:00
Larry Finger
acf08e1a01 staging: rtl8192e: Convert typedef cmpk_rx_dbginfo_t to struct cmpk_rx_dbginfo
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:36:22 -05:00
Larry Finger
7f6aa06ca2 staging: rtl8192e: Convert typedef cmpk_tx_status_t to struct cmpk_tx_status
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:32:12 -05:00
Larry Finger
fb6209640b staging: rtl8192e: Convert typedef cmpk_set_cfg_t to struct cmpk_set_cfg
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:31:41 -05:00
Larry Finger
a76d98497e staging: rtl8192e: Convert typedef cmpk_intr_sta_t to struct cmpk_intr_sta
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:30:46 -05:00
Larry Finger
d3ab7211bd staging: rtl8192e: Convert typedef cmpk_txfb_t to struct cmpk_txfb
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:30:19 -05:00
Larry Finger
6f22c62010 staging: rtl8192e: Convert typedef rx_fwinfo to struct rx_fwinfo
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:29:53 -05:00
Larry Finger
4f534b36af staging: rtl8192e: Convert typedef rx_desc to struct rx_desc
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:29:25 -05:00
Larry Finger
3215312bc2 staging: rtl8192e: Convert typedef tx_desc_cmd to struct tx_desc_cmd
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:29:00 -05:00
Larry Finger
ececd694df staging: rtl8192e: Convert typedef phy_sts_cck_819xpci_t to struct phy_sts_cck_819xpci
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:28:13 -05:00
Larry Finger
9c10985632 staging: rtl8192e: Convert typedef rt_tx_rahis_t to struct rt_tx_rahis
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:27:41 -05:00
Larry Finger
e91dbf0301 staging: rtl8192e: Convert typedef CHANNEL_ACCESS_SETTING to struct channel_access_setting
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:27:13 -05:00
Larry Finger
bc27e89b27 staging: rtl8192e: Convert typedef tx_desc to struct tx_desc
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:26:38 -05:00
Larry Finger
b0d7de7314 staging: rtl8192e: Convert typedef ACM to struct acm
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:26:02 -05:00
Larry Finger
8cba1432ce staging: rtl8192e: Convert typedef RX_REORDER_ENTRY to struct rx_reorder_entry
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:25:28 -05:00
Larry Finger
f9db5f9065 staging: rtl8192e: Convert typedef RT_PCI_CAPABILITIES_HEADER to struct rt_pci_capab_header
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:25:01 -05:00
Larry Finger
ca39405519 staging: rtl8192e: Convert typedef RT_INTEL_PROMISCUOUS_MODE_INFO to struct rt_intel_promisc_mode
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:24:28 -05:00
Larry Finger
74d0497b84 staging: rtl8192e: Convert typedef RT_PMKID_LIST to struct rt_pmkid_list
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:23:55 -05:00
Larry Finger
5ea0448047 staging: rtl8192e: Convert typedef SW_CAM_TABLE to struct sw_cam_table
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:23:14 -05:00
Larry Finger
0e86753fe3 staging: rtl8192e: Convert typedef RT_LINK_DETECT_T to struct rt_link_detect
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:22:25 -05:00
Larry Finger
ca9900116f staging: rtl8192e: Convert typedef RT_POWER_SAVE_CONTROL to struct rt_pwr_save_ctrl
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:21:36 -05:00
Larry Finger
628c30e852 staging: rtl8192e: Convert typedef RT_PM_WOL_PATTERN_INFO to struct rt_pm_wol_info
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:20:44 -05:00
Larry Finger
9d94bbb8c8 staging: rtl8192e: Convert typedef RT_SMOOTH_DATA_4RF to struct rt_smooth_data_4rf
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:19:52 -05:00
Larry Finger
0db427997a staging: rtl8192e: Convert typedef STA_QOS to struct sta_qos
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:18:55 -05:00
Larry Finger
1d2a55fb6f staging: rtl8192e: Convert typedef QOS_TSTREAM to struct qos_tstream
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:18:05 -05:00
Larry Finger
8310b6c05c staging: rtl8192e: Convert typedef OCTET_STRING to struct octet_string
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:17:14 -05:00
Wanlong Gao
6a20baa9a4 Input: ad714x-i2c - change placement of __init/__exit annotations
Change the placement of __init and __exit annotations to be consistent
with the rest of the drivers.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:17:00 -07:00
Larry Finger
95ce5fc947 staging: rtl8192e: Convert typedef WMM_TSPEC to struct wmm_tspec
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:16:24 -05:00
Larry Finger
2ae7ea8cf0 staging: rtl8192e: Convert typedef phy_sts_ofdm_819xpci_t to struct phy_sts_ofdm_819xpci
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:10:04 -05:00
Larry Finger
910d9e5c2d staging: rtl8192e: Convert typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag to struct phy_ofdm_rx_status_rxsc_sgien_exintfflag
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:09:26 -05:00
Larry Finger
c13ac63b60 staging: rtl8192e: Convert typedef LOG_INTERRUPT_8190_T to struct log_int_8190
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:08:50 -05:00
Daniel Kurtz
6b4b49fea1 Input: synaptics - process finger (<=5) transitions
Synaptics image sensor touchpads track up to 5 fingers, but only report 2.
They use a special "TYPE=2" (AGM-CONTACT) packet type that reports
the number of tracked fingers and which finger is reported in the SGM
and AGM packets.

With this new packet type, it is possible to tell userspace when 4 or 5
fingers are touching.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:32 -07:00
Daniel Kurtz
d5051272fc Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on touchpad
"4-finger scroll" is a gesture supported by some applications and
operating systems.

"Resting thumb" is when a clickpad user rests a finger (e.g., a
thumb), in a "click zone" (typically the bottom of the touchpad) in
anticipation of click+move=select gestures.

Thus, "4-finger scroll + resting thumb" is a 5-finger gesture.
To allow userspace to detect this gesture, we send BTN_TOOL_QUINTTAP.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:29 -07:00
Daniel Kurtz
4dc772d274 Input: synaptics - process finger (<=3) transitions
Synaptics image sensor touchpads track 5 fingers, but only report 2.
This patch attempts to deal with some idiosyncrasies of these touchpads:

 * When there are 3 or more fingers, only two are reported.
 * The touchpad tracks the 5 fingers in slot[0] through slot[4].
 * It always reports the lowest and highest valid slots in SGM and AGM
   packets, respectively.
 * The number of fingers is only reported in the SGM packet.  However,
   the number of fingers can change either before or after an AGM
   packet.
 * Thus, if an SGM reports a different number of fingers than the last
   SGM, it is impossible to tell whether the intervening AGM corresponds
   to the old number of fingers or the new number of fingers.
 * For example, when going from 2->3 fingers, it is not possible to tell
   whether tell AGM contains slot[1] (old 2nd finger) or slot[2] (new
   3rd finger).
 * When fingers are added one at at time, from 1->2->3, it is possible to
   track which slots are contained in the SGM and AGM packets:
     1 finger:  SGM = slot[0], no AGM
     2 fingers: SGM = slot[0], AGM = slot[1]
     3 fingers: SGM = slot[0], AGM = slot[2]
 * It is also possible to track which slot is contained in the SGM when 1
   of 2 fingers is removed.  This is because the touchpad sends a special
   (0,0,0) AGM packet whenever all fingers are removed except slot[0]:
     Last AGM == (0,0,0): SGM contains slot[1]
     Else: SGM contains slot[0]
 * However, once there are 3 fingers, if exactly 1 finger is removed, it
   is impossible to tell which 2 slots are contained in SGM and AGM.
   The (SGM,AGM) could be (0,1), (0,2), or (1,2). There is no way to know.
 * Similarly, if two fingers are simultaneously removed (3->1), then it
   is only possible to know if SGM still contains slot[0].
 * Since it is not possible to reliably track which slot is being
   reported, we invalidate the tracking_id every time the number of
   fingers changes until this ambiguity is resolved when:
     a) All fingers are removed.
     b) 4 or 5 fingers are touched, generates an AGM-CONTACT packet.
     c) All fingers are removed except slot[0].  In this special case, the
        ambiguity is resolved since by the (0,0,0) AGM packet.

Behavior of the driver:

When 2 or more fingers are present on the touchpad, the kernel reports
up to two MT-B slots containing the position data for two of the fingers
reported by the touchpad.  If the identity of a finger cannot be tracked
when the number-of-fingers changes, the corresponding MT-B slot will be
invalidated (track_id set to -1), and a new track_id will be assigned in
a subsequent input event report.

The driver always reports the total number of fingers using one of the
EV_KEY/BTN_TOOL_*TAP events. This could differ from the number of valid
MT-B slots for two reasons:
 a) There are more than 2 fingers on the pad.
 b) During ambiguous number-of-fingers transitions, the correct track_id
    for one or both of the slots cannot be determined, so the slots are
    invalidated.

Thus, this is a hybrid singletouch/MT-B scheme. Userspace can detect
this behavior by noting that the driver supports more EV_KEY/BTN_TOOL_*TAP
events than its maximum EV_ABS/ABS_MT_SLOT.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:24 -07:00
Daniel Kurtz
a6ca40c11e Input: synaptics - decode AGM packet types
A Synaptics image sensor tracks 5 fingers, but can only report 2.

The algorithm for choosing which 2 fingers to report and in which packet:
  Touchpad maintains 5 slots, numbered 0 to 4
  Initially all slots are empty
  As new fingers are detected, assign them to the lowest available slots
  The touchpad always reports:
    SGM: lowest numbered non-empty slot
    AGM: highest numbered non-empty slot, if there is one

In addition, these touchpads have a special AGM packet type which reports
the number of fingers currently being tracked, and which finger is in
each of the two slots.  Unfortunately, these "TYPE=2" packets are only used
when more than 3 fingers are being tracked.  When less than 4 fingers
are present, the 'w' value must be used to track how many fingers are
present, and knowing which fingers are being reported is much more
difficult, if not impossible.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:16 -07:00
Larry Finger
a07dc3d145 staging: rtl8192e: Convert typedef TX_FWINFO_8190PCI to struct tx_fwinfo_8190pci
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:08:13 -05:00
Daniel Kurtz
3cdfee9ea7 Input: synaptics - add image sensor support
Synaptics makes (at least) two kinds of touchpad sensors:
 * Older pads use a profile sensor that could only infer the location
   of individual fingers based on the projection of their profiles
   onto row and column sensors.
 * Newer pads use an image sensor that can track true finger position
   using a two-dimensional sensor grid.

Both sensor types support an "Advanced Gesture Mode":
 When multiple fingers are detected, the touchpad sends alternating
 "Advanced Gesture Mode" (AGM) and "Simple Gesture Mode" (SGM)
 packets.
 The AGM packets have w=2, and contain reduced resolution finger data
 The SGM packets have w={0,1} and contain full resolution finger data

Profile sensors try to report the "upper" (larger y value) finger in
the SGM packet, and the lower (smaller y value) in the AGM packet.
However, due to the nature of the profile sensor, they easily get
confused when fingers cross, and can start reporting the x-coordinate
of one with the y-coordinate of the other.  Thus, for profile
sensors, "semi-mt" was created, which reports a "bounding box"
created by pairing min and max coordinates of the two pairs of
reported fingers.

Image sensors can report the actual coordinates of two of the fingers
present.  This patch detects if the touchpad is an image sensor and
reports finger data using the MT-B protocol.

NOTE: This patch only adds partial support for 2-finger gestures.
      The proper interpretation of the slot contents when more than
      two fingers are present is left to later patches.  Also,
      handling of 'number of fingers' transitions is incomplete.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:12 -07:00
Daniel Kurtz
85615476e2 Input: synaptics - refactor initialization of abs position axes
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:06 -07:00
Daniel Kurtz
7afdb842d9 Input: synaptics - refactor agm packet parsing
When a Synaptics touchpad is in "AGM" mode, and multiple fingers are
detected, the touchpad sends alternating "Advanced Gesture Mode" (AGM) and
"Simple Gesture Mode" (SGM) packets.
  The AGM packets have w=2, and contain reduced resolution finger data.
  The SGM packets have w={0,1} and contain full resolution finger data.

Refactor the parsing of agm packets to its own function, and rename the
synaptics_data.mt field to .agm to indicate that it contains the contents of
the last agm packet.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:08:01 -07:00
Daniel Kurtz
6de58dd625 Input: synaptics - refactor y inversion
Synaptics touchpads report increasing y from bottom to top.
This is inverted from normal userspace "top of screen is 0" coordinates.
Thus, the kernel driver reports inverted y coordinates to userspace.

This patch refactors this inversion.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:07:56 -07:00
Dmitry Torokhov
66fd9385ee 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>
2011-08-23 23:07:51 -07:00
Dmitry Torokhov
e9496746cc 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>
2011-08-23 23:07:47 -07:00
Larry Finger
22a2f51027 staging: rtl8192e: Convert typedef TX_FWINFO_T to struct tx_fwinfo
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:07:37 -05:00
Larry Finger
9bf6e4c146 staging: rtl8192e: Convert typedef BB_REGISTER_DEFINITION_T to struct bb_reg_definition
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:06:56 -05:00
Larry Finger
38b1f67d9d staging: rtl8192e: Convert typedef FALSE_ALARM_STATISTICS to struct false_alarm_stats
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 00:56:36 -05:00
Larry Finger
d6a15cb8a0 staging: rtl8192e: Convert typedef MIMO_EVM to struct mimo_evm
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 00:56:28 -05:00