Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8724fdb5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (62 commits)
  Input: atkbd - release previously reserved keycodes 248 - 254
  Input: add KEY_WPS_BUTTON definition
  Input: ads7846 - add regulator support
  Input: winbond-cir - fix suspend/resume
  Input: gamecon - use pr_err() and friends
  Input: gamecon - constify some of the setup structures
  Input: gamecon - simplify pad type handling
  Input: gamecon - simplify coordinate calculation for PSX
  Input: gamecon - fix some formatting issues
  Input: gamecon - add rumble support for N64 pads
  Input: wacom - add device type to device name string
  Input: s3c24xx_ts - report touch only when stylus is down
  Input: s3c24xx_ts - re-enable IRQ on resume
  Input: wacom - constify product features data
  Input: wacom - use per-device instance of wacom_features
  Input: sh_keysc - enable building on SH-Mobile ARM
  Input: wacom - get features from driver info
  Input: rotary-encoder - set gpio direction for each requested gpio
  Input: sh_keysc - update the driver with mode 6
  Input: sh_keysc - switch to using bitmaps
  ...
parents bc535154 35858adb
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -538,3 +538,26 @@ Why: Duplicate functionality with the gspca_zc3xx driver, zc0301 only
	sensors) wich are also supported by the gspca_zc3xx driver
	(which supports 53 USB-ID's in total)
Who:	Hans de Goede <hdegoede@redhat.com>

----------------------------

What:	corgikbd, spitzkbd, tosakbd driver
When:	2.6.35
Files:	drivers/input/keyboard/{corgi,spitz,tosa}kbd.c
Why:	We now have a generic GPIO based matrix keyboard driver that
	are fully capable of handling all the keys on these devices.
	The original drivers manipulate the GPIO registers directly
	and so are difficult to maintain.
Who:	Eric Miao <eric.y.miao@gmail.com>

----------------------------

What:	corgi_ssp and corgi_ts driver
When:	2.6.35
Files:	arch/arm/mach-pxa/corgi_ssp.c, drivers/input/touchscreen/corgi_ts.c
Why:	The corgi touchscreen is now deprecated in favour of the generic
	ads7846.c driver. The noise reduction technique used in corgi_ts.c,
	that's to wait till vsync before ADC sampling, is also integrated into
	ads7846 driver now. Provided that the original driver is not generic
	and is difficult to maintain, it will be removed later.
Who:	Eric Miao <eric.y.miao@gmail.com>
+110 −14
Original line number Diff line number Diff line
Copyright (C) 2002-2008 Sentelic Corporation.
Last update: Oct-31-2008
Copyright (C) 2002-2010 Sentelic Corporation.
Last update: Jan-13-2010

==============================================================================
* Finger Sensing Pad Intellimouse Mode(scrolling wheel, 4th and 5th buttons)
@@ -44,7 +44,7 @@ B) MSID 6: Horizontal and Vertical scrolling.
Packet 1
   Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  1   |Y|X|y|x|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 | | |B|F|l|r|u|d|
  1   |Y|X|y|x|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 | | |B|F|r|l|u|d|
      |---------------|     |---------------|    |---------------|    |---------------|

Byte 1: Bit7 => Y overflow
@@ -59,15 +59,15 @@ Byte 2: X Movement(9-bit 2's complement integers)
Byte 3: Y Movement(9-bit 2's complement integers)
Byte 4: Bit0 => the Vertical scrolling movement downward.
	Bit1 => the Vertical scrolling movement upward.
	Bit2 => the Vertical scrolling movement rightward.
	Bit3 => the Vertical scrolling movement leftward.
	Bit2 => the Horizontal scrolling movement leftward.
	Bit3 => the Horizontal scrolling movement rightward.
        Bit4 => 1 = 4th mouse button is pressed, Forward one page.
                0 = 4th mouse button is not pressed.
        Bit5 => 1 = 5th mouse button is pressed, Backward one page.
                0 = 5th mouse button is not pressed.

C) MSID 7:
# FSP uses 2 packets(8 Bytes) data to represent Absolute Position
# FSP uses 2 packets (8 Bytes) to represent Absolute Position.
  so we have PACKET NUMBER to identify packets.
  If PACKET NUMBER is 0, the packet is Packet 1.
  If PACKET NUMBER is 1, the packet is Packet 2.
@@ -129,7 +129,7 @@ Byte 3: Message Type => 0x00 (Disabled)
Byte 4: Bit7~Bit0 => Don't Care

==============================================================================
* Absolute position for STL3888-A0.
* Absolute position for STL3888-Ax.
==============================================================================
Packet 1 (ABSOLUTE POSITION)
   Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
@@ -179,14 +179,14 @@ Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
        Bit5~Bit4 => y2_g
        Bit7~Bit6 => x2_g

Notify Packet for STL3888-A0
Notify Packet for STL3888-Ax
   Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  1   |1|0|1|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|d|u|0|0|0|0|
      |---------------|     |---------------|    |---------------|    |---------------|

Byte 1: Bit7~Bit6 => 00, Normal data packet
                  => 01, Absolute coordination packet
                  => 01, Absolute coordinates packet
                  => 10, Notify packet
        Bit5 => 1
        Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
@@ -205,6 +205,97 @@ Byte 4: Bit7 => scroll right button
        Bit6 => scroll left button
        Bit5 => scroll down button
        Bit4 => scroll up button
            * Note that if gesture and additional buttoni (Bit4~Bit7)
              happen at the same time, the button information will not
              be sent.
        Bit3~Bit0 => Reserved

Sample sequence of Multi-finger, Multi-coordinate mode:

	notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
	abs pkt 2, ..., notify packet (valid bit == 0)

==============================================================================
* Absolute position for STL3888-B0.
==============================================================================
Packet 1(ABSOLUTE POSITION)
   Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  1   |0|1|V|F|1|0|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|u|d|X|X|Y|Y|
      |---------------|     |---------------|    |---------------|    |---------------|

Byte 1: Bit7~Bit6 => 00, Normal data packet
                  => 01, Absolute coordinates packet
                  => 10, Notify packet
        Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
                When both fingers are up, the last two reports have zero valid
                bit.
        Bit4 => finger up/down information. 1: finger down, 0: finger up.
        Bit3 => 1
        Bit2 => finger index, 0 is the first finger, 1 is the second finger.
        Bit1 => Right Button, 1 is pressed, 0 is not pressed.
        Bit0 => Left Button, 1 is pressed, 0 is not pressed.
Byte 2: X coordinate (xpos[9:2])
Byte 3: Y coordinate (ypos[9:2])
Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
        Bit3~Bit2 => X coordinate (ypos[1:0])
        Bit4 => scroll down button
        Bit5 => scroll up button
        Bit6 => scroll left button
        Bit7 => scroll right button

Packet 2 (ABSOLUTE POSITION)
   Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  1   |0|1|V|F|1|1|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|u|d|X|X|Y|Y|
      |---------------|     |---------------|    |---------------|    |---------------|

Byte 1: Bit7~Bit6 => 00, Normal data packet
                  => 01, Absolute coordination packet
                  => 10, Notify packet
        Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
                When both fingers are up, the last two reports have zero valid
                bit.
        Bit4 => finger up/down information. 1: finger down, 0: finger up.
        Bit3 => 1
        Bit2 => finger index, 0 is the first finger, 1 is the second finger.
        Bit1 => Right Button, 1 is pressed, 0 is not pressed.
        Bit0 => Left Button, 1 is pressed, 0 is not pressed.
Byte 2: X coordinate (xpos[9:2])
Byte 3: Y coordinate (ypos[9:2])
Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
        Bit3~Bit2 => X coordinate (ypos[1:0])
        Bit4 => scroll down button
        Bit5 => scroll up button
        Bit6 => scroll left button
        Bit7 => scroll right button

Notify Packet for STL3888-B0
   Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  1   |1|0|1|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|u|d|0|0|0|0|
      |---------------|     |---------------|    |---------------|    |---------------|

Byte 1: Bit7~Bit6 => 00, Normal data packet
                  => 01, Absolute coordination packet
                  => 10, Notify packet
        Bit5 => 1
        Bit4 => when in absolute coordinate mode (valid when EN_PKT_GO is 1):
                0: left button is generated by the on-pad command
                1: left button is generated by the external button
        Bit3 => 1
        Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
        Bit1 => Right Button, 1 is pressed, 0 is not pressed.
        Bit0 => Left Button, 1 is pressed, 0 is not pressed.
Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
Byte 3: Bit7~Bit6 => Don't care
        Bit5~Bit4 => Number of fingers
        Bit3~Bit1 => Reserved
        Bit0 => 1: enter gesture mode; 0: leaving gesture mode
Byte 4: Bit7 => scroll right button
        Bit6 => scroll left button
        Bit5 => scroll up button
        Bit4 => scroll down button
            * Note that if gesture and additional button(Bit4~Bit7)
              happen at the same time, the button information will not
              be sent.
@@ -409,7 +500,8 @@ offset width default r/w name
					0: read only, 1: read/write enable
	(Note that following registers does not require clock gating being
	enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e
	40 41 42 43.)
	40 41 42 43.  In addition to that, this bit must be 1 when gesture
	mode is enabled)

0x31				RW	on-pad command detection
	bit7		0	RW	on-pad command left button down tag
@@ -463,6 +555,10 @@ offset width default r/w name
	absolute coordinates; otherwise, host only receives packets with
	relative coordinate.)

	bit7		0	RW	EN_PS2_F2: PS/2 gesture mode 2nd
					finger packet enable
					0: disable, 1: enable

0x43				RW	on-pad control
	bit0		0	RW	on-pad control enable
					0: disable, 1: enable
+7 −7
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@
#ifndef __ASM_ARCH_EP93XX_KEYPAD_H
#define __ASM_ARCH_EP93XX_KEYPAD_H

struct matrix_keymap_data;

/* flags for the ep93xx_keypad driver */
#define EP93XX_KEYPAD_DISABLE_3_KEY	(1<<0)	/* disable 3-key reset */
#define EP93XX_KEYPAD_DIAG_MODE		(1<<1)	/* diagnostic mode */
@@ -15,15 +17,13 @@

/**
 * struct ep93xx_keypad_platform_data - platform specific device structure
 * @matrix_key_map:		array of keycodes defining the keypad matrix
 * @matrix_key_map_size:	ARRAY_SIZE(matrix_key_map)
 * @keymap_data:	pointer to &matrix_keymap_data
 * @debounce:		debounce start count; terminal count is 0xff
 * @prescale:		row/column counter pre-scaler load value
 * @flags:		see above
 */
struct ep93xx_keypad_platform_data {
	unsigned int	*matrix_key_map;
	int		matrix_key_map_size;
	struct matrix_keymap_data *keymap_data;
	unsigned int	debounce;
	unsigned int	prescale;
	unsigned int	flags;
+16 −13
Original line number Diff line number Diff line
@@ -1185,11 +1185,6 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)

	rep = (down == 2);

#ifdef CONFIG_MAC_EMUMOUSEBTN
	if (mac_hid_mouse_emulate_buttons(1, keycode, down))
		return;
#endif /* CONFIG_MAC_EMUMOUSEBTN */

	if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)
		if (emulate_raw(vc, keycode, !down << 7))
			if (keycode < BTN_MISC && printk_ratelimit())
@@ -1328,6 +1323,21 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type,
	schedule_console_callback();
}

static bool kbd_match(struct input_handler *handler, struct input_dev *dev)
{
	int i;

	if (test_bit(EV_SND, dev->evbit))
		return true;

	if (test_bit(EV_KEY, dev->evbit))
		for (i = KEY_RESERVED; i < BTN_MISC; i++)
			if (test_bit(i, dev->keybit))
				return true;

	return false;
}

/*
 * When a keyboard (or other input device) is found, the kbd_connect
 * function is called. The function then looks at the device, and if it
@@ -1339,14 +1349,6 @@ static int kbd_connect(struct input_handler *handler, struct input_dev *dev,
{
	struct input_handle *handle;
	int error;
	int i;

	for (i = KEY_RESERVED; i < BTN_MISC; i++)
		if (test_bit(i, dev->keybit))
			break;

	if (i == BTN_MISC && !test_bit(EV_SND, dev->evbit))
		return -ENODEV;

	handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
	if (!handle)
@@ -1412,6 +1414,7 @@ MODULE_DEVICE_TABLE(input, kbd_ids);

static struct input_handler kbd_handler = {
	.event		= kbd_event,
	.match		= kbd_match,
	.connect	= kbd_connect,
	.disconnect	= kbd_disconnect,
	.start		= kbd_start,
+2 −0
Original line number Diff line number Diff line
@@ -278,6 +278,8 @@ static int evdev_open(struct inode *inode, struct file *file)
		goto err_free_client;

	file->private_data = client;
	nonseekable_open(inode, file);

	return 0;

 err_free_client:
Loading