Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180077
b: refs/heads/master
c: 32337f8
h: refs/heads/master
i:
  180075: 3df2dcb
v: v3
  • Loading branch information
Linus Torvalds committed Feb 1, 2010
1 parent 1032362 commit 9ac9761
Show file tree
Hide file tree
Showing 130 changed files with 1,457 additions and 1,800 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94f28da8409c6059135e89ac64a0839993124155
refs/heads/master: 32337f8a7020676b5fd6387def9ccb9060440c5c
48 changes: 40 additions & 8 deletions trunk/Documentation/input/multi-touch-protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,30 @@ set of events/packets.

A set of ABS_MT events with the desired properties is defined. The events
are divided into categories, to allow for partial implementation. The
minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and
ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the
device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size
of the approaching finger. Anisotropy and direction may be specified with
ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. The
ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a
minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which
allows for multiple fingers to be tracked. If the device supports it, the
ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size
of the contact area and approaching finger, respectively.

The TOUCH and WIDTH parameters have a geometrical interpretation; imagine
looking through a window at someone gently holding a finger against the
glass. You will see two regions, one inner region consisting of the part
of the finger actually touching the glass, and one outer region formed by
the perimeter of the finger. The diameter of the inner region is the
ABS_MT_TOUCH_MAJOR, the diameter of the outer region is
ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger harder
against the glass. The inner region will increase, and in general, the
ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than
unity, is related to the finger pressure. For pressure-based devices,
ABS_MT_PRESSURE may be used to provide the pressure on the contact area
instead.

In addition to the MAJOR parameters, the oval shape of the finger can be
described by adding the MINOR parameters, such that MAJOR and MINOR are the
major and minor axis of an ellipse. Finally, the orientation of the oval
shape can be describe with the ORIENTATION parameter.

The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a
finger or a pen or something else. Devices with more granular information
may specify general shapes as blobs, i.e., as a sequence of rectangular
shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices
Expand All @@ -42,11 +60,9 @@ report finger tracking from hardware [5].
Here is what a minimal event sequence for a two-finger touch would look
like:

ABS_MT_TOUCH_MAJOR
ABS_MT_POSITION_X
ABS_MT_POSITION_Y
SYN_MT_REPORT
ABS_MT_TOUCH_MAJOR
ABS_MT_POSITION_X
ABS_MT_POSITION_Y
SYN_MT_REPORT
Expand Down Expand Up @@ -87,6 +103,12 @@ the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates
the notion of pressure. The fingers of the hand and the palm all have
different characteristic widths [1].

ABS_MT_PRESSURE

The pressure, in arbitrary units, on the contact area. May be used instead
of TOUCH and WIDTH for pressure-based devices or any device with a spatial
signal intensity distribution.

ABS_MT_ORIENTATION

The orientation of the ellipse. The value should describe a signed quarter
Expand Down Expand Up @@ -170,6 +192,16 @@ There are a few devices that support trackingID in hardware. User space can
make use of these native identifiers to reduce bandwidth and cpu usage.


Gestures
--------

In the specific application of creating gesture events, the TOUCH and WIDTH
parameters can be used to, e.g., approximate finger pressure or distinguish
between index finger and thumb. With the addition of the MINOR parameters,
one can also distinguish between a sweeping finger and a pointing finger,
and with ORIENTATION, one can detect twisting of fingers.


Notes
-----

Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 33
EXTRAVERSION = -rc5
EXTRAVERSION = -rc6
NAME = Man-Eating Seals of Antiquity

# *DOCUMENTATION*
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/spi/orion_spi.h>
Expand Down Expand Up @@ -53,6 +54,11 @@ static void __init rd88f6192_init(void)
*/
kirkwood_init();

orion_gpio_set_valid(RD88F6192_GPIO_USB_VBUS, 1);
if (gpio_request(RD88F6192_GPIO_USB_VBUS, "USB VBUS") != 0 ||
gpio_direction_output(RD88F6192_GPIO_USB_VBUS, 1) != 0)
pr_err("RD-88F6192-NAS: failed to setup USB VBUS GPIO\n");

kirkwood_ehci_init();
kirkwood_ge00_init(&rd88f6192_ge00_data);
kirkwood_sata_init(&rd88f6192_sata_data);
Expand Down
33 changes: 27 additions & 6 deletions trunk/arch/arm/mach-orion5x/dns323-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/irq.h>
Expand All @@ -32,6 +33,7 @@

#define DNS323_GPIO_LED_RIGHT_AMBER 1
#define DNS323_GPIO_LED_LEFT_AMBER 2
#define DNS323_GPIO_SYSTEM_UP 3
#define DNS323_GPIO_LED_POWER 5
#define DNS323_GPIO_OVERTEMP 6
#define DNS323_GPIO_RTC 7
Expand Down Expand Up @@ -239,7 +241,7 @@ static struct gpio_led dns323_leds[] = {
{
.name = "power:blue",
.gpio = DNS323_GPIO_LED_POWER,
.active_low = 1,
.default_state = LEDS_GPIO_DEFSTATE_ON,
}, {
.name = "right:amber",
.gpio = DNS323_GPIO_LED_RIGHT_AMBER,
Expand Down Expand Up @@ -334,7 +336,7 @@ static struct orion5x_mpp_mode dns323_mv88f5182_mpp_modes[] __initdata = {
{ 0, MPP_UNUSED },
{ 1, MPP_GPIO }, /* right amber LED (sata ch0) */
{ 2, MPP_GPIO }, /* left amber LED (sata ch1) */
{ 3, MPP_UNUSED },
{ 3, MPP_GPIO }, /* system up flag */
{ 4, MPP_GPIO }, /* power button LED */
{ 5, MPP_GPIO }, /* power button LED */
{ 6, MPP_GPIO }, /* GMT G751-2f overtemp */
Expand Down Expand Up @@ -372,13 +374,23 @@ static struct i2c_board_info __initdata dns323_i2c_devices[] = {
},
};

/* DNS-323 specific power off method */
static void dns323_power_off(void)
/* DNS-323 rev. A specific power off method */
static void dns323a_power_off(void)
{
pr_info("%s: triggering power-off...\n", __func__);
gpio_set_value(DNS323_GPIO_POWER_OFF, 1);
}

/* DNS-323 rev B specific power off method */
static void dns323b_power_off(void)
{
pr_info("%s: triggering power-off...\n", __func__);
/* Pin has to be changed to 1 and back to 0 to do actual power off. */
gpio_set_value(DNS323_GPIO_POWER_OFF, 1);
mdelay(100);
gpio_set_value(DNS323_GPIO_POWER_OFF, 0);
}

static void __init dns323_init(void)
{
/* Setup basic Orion functions. Need to be called early. */
Expand Down Expand Up @@ -424,11 +436,20 @@ static void __init dns323_init(void)
if (dns323_dev_id() == MV88F5182_DEV_ID)
orion5x_sata_init(&dns323_sata_data);

/* register dns323 specific power-off method */
/* The 5182 has flag to indicate the system is up. Without this flag
* set, power LED will flash and cannot be controlled via leds-gpio.
*/
if (dns323_dev_id() == MV88F5182_DEV_ID)
gpio_set_value(DNS323_GPIO_SYSTEM_UP, 1);

/* Register dns323 specific power-off method */
if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
pr_err("DNS323: failed to setup power-off GPIO\n");
pm_power_off = dns323_power_off;
if (dns323_dev_id() == MV88F5182_DEV_ID)
pm_power_off = dns323b_power_off;
else
pm_power_off = dns323a_power_off;
}

/* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
Expand Down
79 changes: 79 additions & 0 deletions trunk/arch/arm/mach-orion5x/wrt350n-v2-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h>
#include <linux/ethtool.h>
#include <linux/leds.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <net/dsa.h>
#include <asm/mach-types.h>
#include <asm/gpio.h>
Expand All @@ -24,6 +27,80 @@
#include "common.h"
#include "mpp.h"

/*
* LEDs attached to GPIO
*/
static struct gpio_led wrt350n_v2_led_pins[] = {
{
.name = "wrt350nv2:green:power",
.gpio = 0,
.active_low = 1,
}, {
.name = "wrt350nv2:green:security",
.gpio = 1,
.active_low = 1,
}, {
.name = "wrt350nv2:orange:power",
.gpio = 5,
.active_low = 1,
}, {
.name = "wrt350nv2:green:usb",
.gpio = 6,
.active_low = 1,
}, {
.name = "wrt350nv2:green:wireless",
.gpio = 7,
.active_low = 1,
},
};

static struct gpio_led_platform_data wrt350n_v2_led_data = {
.leds = wrt350n_v2_led_pins,
.num_leds = ARRAY_SIZE(wrt350n_v2_led_pins),
};

static struct platform_device wrt350n_v2_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &wrt350n_v2_led_data,
},
};

/*
* Buttons attached to GPIO
*/
static struct gpio_keys_button wrt350n_v2_buttons[] = {
{
.code = KEY_RESTART,
.gpio = 3,
.desc = "Reset Button",
.active_low = 1,
}, {
.code = KEY_WLAN,
.gpio = 2,
.desc = "WPS Button",
.active_low = 1,
},
};

static struct gpio_keys_platform_data wrt350n_v2_button_data = {
.buttons = wrt350n_v2_buttons,
.nbuttons = ARRAY_SIZE(wrt350n_v2_buttons),
};

static struct platform_device wrt350n_v2_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &wrt350n_v2_button_data,
},
};

/*
* General setup
*/
static struct orion5x_mpp_mode wrt350n_v2_mpp_modes[] __initdata = {
{ 0, MPP_GPIO }, /* Power LED green (0=on) */
{ 1, MPP_GPIO }, /* Security LED (0=on) */
Expand Down Expand Up @@ -140,6 +217,8 @@ static void __init wrt350n_v2_init(void)
orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE,
WRT350N_V2_NOR_BOOT_SIZE);
platform_device_register(&wrt350n_v2_nor_flash);
platform_device_register(&wrt350n_v2_leds);
platform_device_register(&wrt350n_v2_button_device);
}

static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ static struct pxaficp_platform_data corgi_ficp_platform_data = {
* USB Device Controller
*/
static struct pxa2xx_udc_mach_info udc_info __initdata = {
.gpio_vbus = -1,
/* no connect GPIO; corgi can't tell connection status */
.gpio_pullup = CORGI_GPIO_USB_PULLUP,
};
Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@
#define GPIO86_nSDCS2 MFP_CFG_OUT(GPIO86, AF0, DRIVE_HIGH)
#define GPIO87_nSDCS3 MFP_CFG_OUT(GPIO87, AF0, DRIVE_HIGH)
#define GPIO88_RDnWR MFP_CFG_OUT(GPIO88, AF0, DRIVE_HIGH)
#define GPIO89_nACRESET MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH)

/* USB */
#define GPIO9_USB_RCV MFP_CFG_IN(GPIO9, AF1)
Expand All @@ -186,6 +185,9 @@
#define GPIO30_ASSP_TXD MFP_CFG_OUT(GPIO30, AF3, DRIVE_LOW)
#define GPIO31_ASSP_SFRM_IN MFP_CFG_IN(GPIO31, AF1)
#define GPIO31_ASSP_SFRM_OUT MFP_CFG_OUT(GPIO31, AF3, DRIVE_LOW)
#endif

/* AC97 */
#define GPIO89_AC97_nRESET MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH)
#endif /* CONFIG_CPU_PXA26x */

#endif /* __ASM_ARCH_MFP_PXA25X_H */
14 changes: 10 additions & 4 deletions trunk/arch/arm/mach-pxa/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
saved_icmr[i] = _ICMR(irq);
_ICMR(irq) = 0;
}
for (i = 0; i < pxa_internal_irq_nr; i++)
saved_ipr[i] = IPR(i);

if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
for (i = 0; i < pxa_internal_irq_nr; i++)
saved_ipr[i] = IPR(i);
}

return 0;
}
Expand All @@ -174,12 +177,15 @@ static int pxa_irq_resume(struct sys_device *dev)
{
int i, irq = PXA_IRQ(0);

if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
for (i = 0; i < pxa_internal_irq_nr; i++)
IPR(i) = saved_ipr[i];
}

for (i = 0; irq < PXA_IRQ(pxa_internal_irq_nr); i++, irq += 32) {
_ICMR(irq) = saved_icmr[i];
_ICLR(irq) = 0;
}
for (i = 0; i < pxa_internal_irq_nr; i++)
IPR(i) = saved_ipr[i];

ICCR = 1;
return 0;
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/plat-orion/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ static void __init orion_pcie_setup_wins(void __iomem *base,
size += cs->size;
}

/*
* Round up 'size' to the nearest power of two.
*/
if ((size & (size - 1)) != 0)
size = 1 << fls(size);

/*
* Setup BAR[1] to all DRAM banks.
*/
Expand Down
Loading

0 comments on commit 9ac9761

Please sign in to comment.