Skip to content

Commit

Permalink
Merge branch 'next' into for-linus
Browse files Browse the repository at this point in the history
First round of input updates for 3.14.
  • Loading branch information
Dmitry Torokhov committed Jan 23, 2014
2 parents 8e2f232 + 497ab1f commit 55df811
Show file tree
Hide file tree
Showing 738 changed files with 6,191 additions and 3,460 deletions.
5 changes: 5 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,11 @@ S: Stanford University
S: Stanford, California 94305
S: USA

N: Carlos Chinea
E: carlos.chinea@nokia.com
E: cch.devel@gmail.com
D: Author of HSI Subsystem

N: Randolph Chung
E: tausq@debian.org
D: Linux/PA-RISC hacker
Expand Down
8 changes: 5 additions & 3 deletions Documentation/DocBook/media/v4l/vidioc-expbuf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ range from zero to the maximal number of valid planes for the currently active
format. For the single-planar API, applications must set <structfield> plane
</structfield> to zero. Additional flags may be posted in the <structfield>
flags </structfield> field. Refer to a manual for open() for details.
Currently only O_CLOEXEC is supported. All other fields must be set to zero.
Currently only O_CLOEXEC, O_RDONLY, O_WRONLY, and O_RDWR are supported. All
other fields must be set to zero.
In the case of multi-planar API, every plane is exported separately using
multiple <constant> VIDIOC_EXPBUF </constant> calls. </para>

Expand Down Expand Up @@ -170,8 +171,9 @@ multi-planar API. Otherwise this value must be set to zero. </entry>
<entry>__u32</entry>
<entry><structfield>flags</structfield></entry>
<entry>Flags for the newly created file, currently only <constant>
O_CLOEXEC </constant> is supported, refer to the manual of open() for more
details.</entry>
O_CLOEXEC </constant>, <constant>O_RDONLY</constant>, <constant>O_WRONLY
</constant>, and <constant>O_RDWR</constant> are supported, refer to the manual
of open() for more details.</entry>
</row>
<row>
<entry>__s32</entry>
Expand Down
6 changes: 3 additions & 3 deletions Documentation/assoc_array.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ This points to a number of methods, all of which need to be provided:

(4) Diff the index keys of two objects.

int (*diff_objects)(const void *a, const void *b);
int (*diff_objects)(const void *object, const void *index_key);

Return the bit position at which the index keys of two objects differ or
-1 if they are the same.
Return the bit position at which the index key of the specified object
differs from the given index key or -1 if they are the same.


(5) Free an object.
Expand Down
10 changes: 6 additions & 4 deletions Documentation/device-mapper/cache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,12 @@ E.g.
Invalidation is removing an entry from the cache without writing it
back. Cache blocks can be invalidated via the invalidate_cblocks
message, which takes an arbitrary number of cblock ranges. Each cblock
must be expressed as a decimal value, in the future a variant message
that takes cblock ranges expressed in hexidecimal may be needed to
better support efficient invalidation of larger caches. The cache must
be in passthrough mode when invalidate_cblocks is used.
range's end value is "one past the end", meaning 5-10 expresses a range
of values from 5 to 9. Each cblock must be expressed as a decimal
value, in the future a variant message that takes cblock ranges
expressed in hexidecimal may be needed to better support efficient
invalidation of larger caches. The cache must be in passthrough mode
when invalidate_cblocks is used.

invalidate_cblocks [<cblock>|<cblock begin>-<cblock end>]*

Expand Down
13 changes: 13 additions & 0 deletions Documentation/devicetree/bindings/input/gpio-beeper.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
* GPIO beeper device tree bindings

Register a beeper connected to GPIO pin.

Required properties:
- compatible: Should be "gpio-beeper".
- gpios: From common gpio binding; gpio connection to beeper enable pin.

Example:
beeper: beeper {
compatible = "gpio-beeper";
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
};
41 changes: 41 additions & 0 deletions Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
* Texas Instruments tsc2007 touchscreen controller

Required properties:
- compatible: must be "ti,tsc2007".
- reg: I2C address of the chip.
- ti,x-plate-ohms: X-plate resistance in ohms.

Optional properties:
- gpios: the interrupt gpio the chip is connected to (trough the penirq pin).
The penirq pin goes to low when the panel is touched.
(see GPIO binding[1] for more details).
- interrupt-parent: the phandle for the gpio controller
(see interrupt binding[0]).
- interrupts: (gpio) interrupt to which the chip is connected
(see interrupt binding[0]).
- ti,max-rt: maximum pressure.
- ti,fuzzx: specifies the absolute input fuzz x value.
If set, it will permit noise in the data up to +- the value given to the fuzz
parameter, that is used to filter noise from the event stream.
- ti,fuzzy: specifies the absolute input fuzz y value.
- ti,fuzzz: specifies the absolute input fuzz z value.
- ti,poll-period: how much time to wait (in milliseconds) before reading again the
values from the tsc2007.

[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
[1]: Documentation/devicetree/bindings/gpio/gpio.txt

Example:
&i2c1 {
/* ... */
tsc2007@49 {
compatible = "ti,tsc2007";
reg = <0x49>;
interrupt-parent = <&gpio4>;
interrupts = <0x0 0x8>;
gpios = <&gpio4 0 0>;
ti,x-plate-ohms = <180>;
};

/* ... */
};
27 changes: 27 additions & 0 deletions Documentation/devicetree/bindings/input/twl4030-keypad.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* TWL4030's Keypad Controller device tree bindings

TWL4030's Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column lines.
A key can be placed at each intersection of a unique row and a unique column.
The keypad controller can sense a key-press and key-release and report the
event using a interrupt to the cpu.

This binding is based on the matrix-keymap binding with the following
changes:

* keypad,num-rows and keypad,num-columns are required.

Required SoC Specific Properties:
- compatible: should be one of the following
- "ti,twl4030-keypad": For controllers compatible with twl4030 keypad
controller.
- interrupt: should be one of the following
- <1>: For controllers compatible with twl4030 keypad controller.

Example:
twl_keypad: keypad {
compatible = "ti,twl4030-keypad";
interrupts = <1>;
keypad,num-rows = <8>;
keypad,num-columns = <8>;
};
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Texas Instruments TWL family (twl4030) pwrbutton module

This module is part of the TWL4030. For more details about the whole
chip see Documentation/devicetree/bindings/mfd/twl-familly.txt.

This module provides a simple power button event via an Interrupt.

Required properties:
- compatible: should be one of the following
- "ti,twl4030-pwrbutton": For controllers compatible with twl4030
- interrupts: should be one of the following
- <8>: For controllers compatible with twl4030

Example:

&twl {
twl_pwrbutton: pwrbutton {
compatible = "ti,twl4030-pwrbutton";
interrupts = <8>;
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/net/davinci_emac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides information, what the device node
for the davinci_emac interface contains.

Required properties:
- compatible: "ti,davinci-dm6467-emac";
- compatible: "ti,davinci-dm6467-emac" or "ti,am3517-emac"
- reg: Offset and length of the register set for the device
- ti,davinci-ctrl-reg-offset: offset to control register
- ti,davinci-ctrl-mod-reg-offset: offset to control module register
Expand Down
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/net/smsc-lan91c111.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ Required properties:
Optional properties:
- phy-device : phandle to Ethernet phy
- local-mac-address : Ethernet mac address to use
- reg-io-width : Mask of sizes (in bytes) of the IO accesses that
are supported on the device. Valid value for SMSC LAN91c111 are
1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning
16-bit access only.
6 changes: 3 additions & 3 deletions Documentation/input/gamepad.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ features that you need, first. How each feature is mapped is described below.
Legacy drivers often don't comply to these rules. As we cannot change them
for backwards-compatibility reasons, you need to provide fixup mappings in
user-space yourself. Some of them might also provide module-options that
change the mappings so you can adivce users to set these.
change the mappings so you can advise users to set these.

All new gamepads are supposed to comply with this mapping. Please report any
bugs, if they don't.
Expand Down Expand Up @@ -150,10 +150,10 @@ Menu-Pad:
BTN_START
Many pads also have a third button which is branded or has a special symbol
and meaning. Such buttons are mapped as BTN_MODE. Examples are the Nintendo
"HOME" button, the XBox "X"-button or Sony "P" button.
"HOME" button, the XBox "X"-button or Sony "PS" button.

Rumble:
Rumble is adverticed as FF_RUMBLE.
Rumble is advertised as FF_RUMBLE.

----------------------------------------------------------------------------
Written 2013 by David Herrmann <dh.herrmann@gmail.com>
38 changes: 19 additions & 19 deletions Documentation/input/joystick-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ joystick.

By default, the device is opened in blocking mode.

int fd = open ("/dev/js0", O_RDONLY);
int fd = open ("/dev/input/js0", O_RDONLY);


2. Event Reading
~~~~~~~~~~~~~~~~

struct js_event e;
read (fd, &e, sizeof(struct js_event));
read (fd, &e, sizeof(e));

where js_event is defined as

Expand All @@ -34,8 +34,8 @@ where js_event is defined as
__u8 number; /* axis/button number */
};

If the read is successful, it will return sizeof(struct js_event), unless
you wanted to read more than one event per read as described in section 3.1.
If the read is successful, it will return sizeof(e), unless you wanted to read
more than one event per read as described in section 3.1.


2.1 js_event.type
Expand Down Expand Up @@ -99,9 +99,9 @@ may work well if you handle JS_EVENT_INIT events separately,

if ((js_event.type & ~JS_EVENT_INIT) == JS_EVENT_BUTTON) {
if (js_event.value)
buttons_state |= (1 << js_event.number);
else
buttons_state &= ~(1 << js_event.number);
buttons_state |= (1 << js_event.number);
else
buttons_state &= ~(1 << js_event.number);
}

is much safer since it can't lose sync with the driver. As you would
Expand Down Expand Up @@ -144,14 +144,14 @@ all events on the queue (that is, until you get a -1).
For example,

while (1) {
while (read (fd, &e, sizeof(struct js_event)) > 0) {
process_event (e);
}
/* EAGAIN is returned when the queue is empty */
if (errno != EAGAIN) {
/* error */
}
/* do something interesting with processed events */
while (read (fd, &e, sizeof(e)) > 0) {
process_event (e);
}
/* EAGAIN is returned when the queue is empty */
if (errno != EAGAIN) {
/* error */
}
/* do something interesting with processed events */
}

One reason for emptying the queue is that if it gets full you'll start
Expand Down Expand Up @@ -181,7 +181,7 @@ at a time using the typical read(2) functionality. For that, you would
replace the read above with something like

struct js_event mybuffer[0xff];
int i = read (fd, mybuffer, sizeof(struct mybuffer));
int i = read (fd, mybuffer, sizeof(mybuffer));

In this case, read would return -1 if the queue was empty, or some
other value in which the number of events read would be i /
Expand Down Expand Up @@ -269,9 +269,9 @@ The driver offers backward compatibility, though. Here's a quick summary:
struct JS_DATA_TYPE js;
while (1) {
if (read (fd, &js, JS_RETURN) != JS_RETURN) {
/* error */
}
usleep (1000);
/* error */
}
usleep (1000);
}

As you can figure out from the example, the read returns immediately,
Expand Down
8 changes: 4 additions & 4 deletions Documentation/input/joystick.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ your needs:
For testing the joystick driver functionality, there is the jstest
program in the utilities package. You run it by typing:

jstest /dev/js0
jstest /dev/input/js0

And it should show a line with the joystick values, which update as you
move the stick, and press its buttons. The axes should all be zero when the
Expand All @@ -136,7 +136,7 @@ joystick should be autocalibrated by the driver automagically. However, with
some analog joysticks, that either do not use linear resistors, or if you
want better precision, you can use the jscal program

jscal -c /dev/js0
jscal -c /dev/input/js0

included in the joystick package to set better correction coefficients than
what the driver would choose itself.
Expand All @@ -145,7 +145,7 @@ what the driver would choose itself.
calibration using the jstest command, and if you do, you then can save the
correction coefficients into a file

jscal -p /dev/js0 > /etc/joystick.cal
jscal -p /dev/input/js0 > /etc/joystick.cal

And add a line to your rc script executing that file

Expand Down Expand Up @@ -556,7 +556,7 @@ interface, and "old" for the "0.x" interface. You run it by typing:

5. FAQ
~~~~~~
Q: Running 'jstest /dev/js0' results in "File not found" error. What's the
Q: Running 'jstest /dev/input/js0' results in "File not found" error. What's the
cause?
A: The device files don't exist. Create them (see section 2.2).

Expand Down
18 changes: 12 additions & 6 deletions Documentation/mic/mpssd/mpssd.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type)
int i;
void *dp = get_dp(mic, type);

for (i = mic_aligned_size(struct mic_bootparam); i < PAGE_SIZE;
for (i = sizeof(struct mic_bootparam); i < PAGE_SIZE;
i += mic_total_desc_size(d)) {
d = dp + i;

Expand Down Expand Up @@ -445,8 +445,8 @@ init_vr(struct mic_info *mic, int fd, int type,
__func__, mic->name, vr0->va, vr0->info, vr_size,
vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
mpsslog("magic 0x%x expected 0x%x\n",
vr0->info->magic, MIC_MAGIC + type);
assert(vr0->info->magic == MIC_MAGIC + type);
le32toh(vr0->info->magic), MIC_MAGIC + type);
assert(le32toh(vr0->info->magic) == MIC_MAGIC + type);
if (vr1) {
vr1->va = (struct mic_vring *)
&va[MIC_DEVICE_PAGE_END + vr_size];
Expand All @@ -458,8 +458,8 @@ init_vr(struct mic_info *mic, int fd, int type,
__func__, mic->name, vr1->va, vr1->info, vr_size,
vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
mpsslog("magic 0x%x expected 0x%x\n",
vr1->info->magic, MIC_MAGIC + type + 1);
assert(vr1->info->magic == MIC_MAGIC + type + 1);
le32toh(vr1->info->magic), MIC_MAGIC + type + 1);
assert(le32toh(vr1->info->magic) == MIC_MAGIC + type + 1);
}
done:
return va;
Expand Down Expand Up @@ -520,7 +520,7 @@ static void *
virtio_net(void *arg)
{
static __u8 vnet_hdr[2][sizeof(struct virtio_net_hdr)];
static __u8 vnet_buf[2][MAX_NET_PKT_SIZE] __aligned(64);
static __u8 vnet_buf[2][MAX_NET_PKT_SIZE] __attribute__ ((aligned(64)));
struct iovec vnet_iov[2][2] = {
{ { .iov_base = vnet_hdr[0], .iov_len = sizeof(vnet_hdr[0]) },
{ .iov_base = vnet_buf[0], .iov_len = sizeof(vnet_buf[0]) } },
Expand Down Expand Up @@ -1412,6 +1412,12 @@ mic_config(void *arg)
}

do {
ret = lseek(fd, 0, SEEK_SET);
if (ret < 0) {
mpsslog("%s: Failed to seek to file start '%s': %s\n",
mic->name, pathname, strerror(errno));
goto close_error1;
}
ret = read(fd, value, sizeof(value));
if (ret < 0) {
mpsslog("%s: Failed to read sysfs entry '%s': %s\n",
Expand Down
Loading

0 comments on commit 55df811

Please sign in to comment.